X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryWatchlistRaw.php;h=38b17fcdedd743c387353a45f302d730dc3f28ec;hb=0220b4375c25775c4b0611becd53b78be158cfb9;hp=5e96dd5336b88c5fce755230e423d34bd97d6cb3;hpb=5563add9c5b173d065d02a6bc1e2e9456786a4ce;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryWatchlistRaw.php b/includes/api/ApiQueryWatchlistRaw.php index 5e96dd5336..38b17fcded 100644 --- a/includes/api/ApiQueryWatchlistRaw.php +++ b/includes/api/ApiQueryWatchlistRaw.php @@ -76,7 +76,7 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase { "original value returned by the previous query", "_badcontinue" ); } $ns = intval( $cont[0] ); - $title = $this->getDB()->addQuotes( $this->titleToKey( $cont[1] ) ); + $title = $this->getDB()->addQuotes( $cont[1] ); $op = $params['dir'] == 'ascending' ? '>' : '<'; $this->addWhere( "wl_namespace $op $ns OR " . @@ -103,8 +103,7 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase { foreach ( $res as $row ) { if ( ++$count > $params['limit'] ) { // We've reached the one extra which shows that there are additional pages to be had. Stop here... - $this->setContinueEnumParameter( 'continue', $row->wl_namespace . '|' . - $this->keyToTitle( $row->wl_title ) ); + $this->setContinueEnumParameter( 'continue', $row->wl_namespace . '|' . $row->wl_title ); break; } $t = Title::makeTitle( $row->wl_namespace, $row->wl_title ); @@ -118,8 +117,7 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase { } $fit = $this->getResult()->addValue( $this->getModuleName(), null, $vals ); if ( !$fit ) { - $this->setContinueEnumParameter( 'continue', $row->wl_namespace . '|' . - $this->keyToTitle( $row->wl_title ) ); + $this->setContinueEnumParameter( 'continue', $row->wl_namespace . '|' . $row->wl_title ); break; } } else { @@ -192,6 +190,21 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase { ); } + public function getResultProperties() { + return array( + '' => array( + 'ns' => 'namespace', + 'title' => 'string' + ), + 'changed' => array( + 'changed' => array( + ApiBase::PROP_TYPE => 'timestamp', + ApiBase::PROP_NULLABLE => true + ) + ) + ); + } + public function getDescription() { return "Get all pages on the logged in user's watchlist"; }