X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FRevision.php;h=18cd94e5af66382c3d6c17d3f0e9c45f6761cfe2;hb=e0f1be027b69e666ea315cd98795146a55fcabe9;hp=4bdce87eab1293ddcaed4e5fd88d0bf9fe745d8a;hpb=c8ddc2ab37639803ff5987b57179e4967d33063d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Revision.php b/includes/Revision.php index 4bdce87eab..18cd94e5af 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -383,7 +383,7 @@ class Revision implements IDBAccessObject { } /** - * Return the value of a select() page conds array for the paeg table. + * Return the value of a select() page conds array for the page table. * This will assure that the revision(s) are not orphaned from live pages. * @since 1.19 * @return Array @@ -558,7 +558,6 @@ class Revision implements IDBAccessObject { // Build a new revision to be saved... global $wgUser; // ugh - # if we have a content object, use it to set the model and type if ( !empty( $row['content'] ) ) { //@todo: when is that set? test with external store setup! check out insertOn() [dk] @@ -889,7 +888,7 @@ class Revision implements IDBAccessObject { } /** - * @param $field int one of DELETED_* bitfield constants + * @param int $field one of DELETED_* bitfield constants * * @return Boolean */ @@ -1095,7 +1094,7 @@ class Revision implements IDBAccessObject { /** * Get previous revision for this title * - * @return Revision or null + * @return Revision|null */ public function getPrevious() { if( $this->getTitle() ) { @@ -1153,8 +1152,8 @@ class Revision implements IDBAccessObject { * field must be included * * @param $row Object: the text data - * @param $prefix String: table prefix (default 'old_') - * @param $wiki String|false: the name of the wiki to load the revision text from + * @param string $prefix table prefix (default 'old_') + * @param string|false $wiki the name of the wiki to load the revision text from * (same as the the wiki $row was loaded from) or false to indicate the local * wiki (this is the default). Otherwise, it must be a symbolic wiki database * identifier as understood by the LoadBalancer class. @@ -1327,7 +1326,7 @@ class Revision implements IDBAccessObject { if ( $wgContentHandlerUseDB ) { //NOTE: Store null for the default model and format, to save space. - //XXX: Makes the DB sensitive to changed defaults. Make this behaviour optional? Only in miser mode? + //XXX: Makes the DB sensitive to changed defaults. Make this behavior optional? Only in miser mode? $model = $this->getContentModel(); $format = $this->getContentFormat(); @@ -1341,8 +1340,8 @@ class Revision implements IDBAccessObject { $defaultModel = ContentHandler::getDefaultModelFor( $title ); $defaultFormat = ContentHandler::getForModelID( $defaultModel )->getDefaultFormat(); - $row[ 'rev_content_model' ] = ( $model === $defaultModel ) ? null : $model; - $row[ 'rev_content_format' ] = ( $format === $defaultFormat ) ? null : $format; + $row['rev_content_model'] = ( $model === $defaultModel ) ? null : $model; + $row['rev_content_format'] = ( $format === $defaultFormat ) ? null : $format; } $dbw->insert( 'revision', $row, __METHOD__ ); @@ -1480,7 +1479,7 @@ class Revision implements IDBAccessObject { * * @param $dbw DatabaseBase * @param $pageId Integer: ID number of the page to read from - * @param $summary String: revision's summary + * @param string $summary revision's summary * @param $minor Boolean: whether the revision should be considered as minor * @return Revision|null on error */ @@ -1518,8 +1517,8 @@ class Revision implements IDBAccessObject { ); if ( $wgContentHandlerUseDB ) { - $row[ 'content_model' ] = $current->rev_content_model; - $row[ 'content_format' ] = $current->rev_content_format; + $row['content_model'] = $current->rev_content_model; + $row['content_format'] = $current->rev_content_format; } $revision = new Revision( $row ); @@ -1587,7 +1586,7 @@ class Revision implements IDBAccessObject { */ static function getTimestampFromId( $title, $id ) { $dbr = wfGetDB( DB_SLAVE ); - // Casting fix for DB2 + // Casting fix for databases that can't take '' for rev_id if ( $id == '' ) { $id = 0; }