X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryAllLinks.php;h=fc23caa4d5fea0b114abad520e8e2a3a7f9c3691;hb=4691389fa46f79cbeaf2daffda407cf7daa66fd4;hp=057dbb2ad503e2961a467c75b92222d72700cd1c;hpb=16ef3e79c4c52aa6b74563b7eadcfc9792e7a4c4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryAllLinks.php b/includes/api/ApiQueryAllLinks.php index 057dbb2ad5..fc23caa4d5 100644 --- a/includes/api/ApiQueryAllLinks.php +++ b/includes/api/ApiQueryAllLinks.php @@ -140,7 +140,7 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase { } else { $this->dieContinueUsageIf( count( $continueArr ) != 2 ); $continueTitle = $db->addQuotes( $continueArr[0] ); - $continueFrom = intval( $continueArr[1] ); + $continueFrom = (int)$continueArr[1]; $this->addWhere( "{$pfx}{$fieldTitle} $op $continueTitle OR " . "({$pfx}{$fieldTitle} = $continueTitle AND " . @@ -150,10 +150,10 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase { } // 'continue' always overrides 'from' - $from = ( $continue || $params['from'] === null ? null : - $this->titlePartToKey( $params['from'], $namespace ) ); - $to = ( $params['to'] === null ? null : - $this->titlePartToKey( $params['to'], $namespace ) ); + $from = $continue || $params['from'] === null ? null : + $this->titlePartToKey( $params['from'], $namespace ); + $to = $params['to'] === null ? null : + $this->titlePartToKey( $params['to'], $namespace ); $this->addWhereRange( $pfx . $fieldTitle, 'newer', $from, $to ); if ( isset( $params['prefix'] ) ) { @@ -204,7 +204,7 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase { ApiResult::META_TYPE => 'assoc', ]; if ( $fld_ids ) { - $vals['fromid'] = intval( $row->pl_from ); + $vals['fromid'] = (int)$row->pl_from; } if ( $fld_title ) { $title = Title::makeTitle( $namespace, $row->pl_title );