From: addshore Date: Wed, 3 Feb 2016 15:49:29 +0000 (+0100) Subject: Use LinkTarget in Revision::newFromTitle X-Git-Tag: 1.31.0-rc.0~8011^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=93547747e367fb3e735dc7e5fd7eb672c8d077c9;p=lhc%2Fweb%2Fwiklou.git Use LinkTarget in Revision::newFromTitle Change-Id: Ib1c58c30106d535daa736feb17e9b9b76c1cf10e --- diff --git a/includes/Revision.php b/includes/Revision.php index f4f6dcad46..e76d19ef78 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -101,22 +101,22 @@ class Revision implements IDBAccessObject { /** * Load either the current, or a specified, revision - * that's attached to a given title. If not attached - * to that title, will return null. + * that's attached to a given link target. If not attached + * to that link target, will return null. * * $flags include: * Revision::READ_LATEST : Select the data from the master * Revision::READ_LOCKING : Select & lock the data from the master * - * @param Title $title + * @param LinkTarget $linkTarget * @param int $id (optional) * @param int $flags Bitfield (optional) * @return Revision|null */ - public static function newFromTitle( $title, $id = 0, $flags = 0 ) { + public static function newFromTitle( LinkTarget $linkTarget, $id = 0, $flags = 0 ) { $conds = array( - 'page_namespace' => $title->getNamespace(), - 'page_title' => $title->getDBkey() + 'page_namespace' => $linkTarget->getNamespace(), + 'page_title' => $linkTarget->getDBkey() ); if ( $id ) { // Use the specified ID