# Page links
$existing = $this->getExistingLinks();
- $this->incrTableUpdate( 'pagelinks', 'pl', $this->getLinkDeletions( $existing ),
+ $this->incrTableUpdate( 'pagelinks', 'pl', $this->getLinkDeletions( $existing ),
$this->getLinkInsertions( $existing ) );
# Template links
function invalidateCategories( $cats ) {
$fname = 'LinksUpdate::invalidateCategories';
if ( count( $cats ) ) {
- $this->mDb->update( 'page', array( 'page_touched' => $this->mDb->timestamp() ),
+ $this->mDb->update( 'page', array( 'page_touched' => $this->mDb->timestamp() ),
array(
'page_namespace' => NS_CATEGORY,
'page_title IN (' . $this->mDb->makeList( array_keys( $cats ) ) . ')'
- ), $fname
+ ), $fname
);
}
}
/**
* Make a WHERE clause from a 2-d NS/dbkey array
- *
+ *
* @param array $arr 2-d array indexed by namespace and DB key
* @param string $prefix Field name prefix, without the underscore
*/
function getLinkInsertions( $existing = array() ) {
$arr = array();
foreach( $this->mLinks as $ns => $dbkeys ) {
- # array_diff_key() was introduced in PHP 5.1, there is a compatibility function
+ # array_diff_key() was introduced in PHP 5.1, there is a compatibility function
# in GlobalFunctions.php
$diffs = isset( $existing[$ns] ) ? array_diff_key( $dbkeys, $existing[$ns] ) : $dbkeys;
foreach ( $diffs as $dbk => $id ) {
$arr[] = array(
'pl_from' => $this->mId,
'pl_namespace' => $ns,
- 'pl_title' => $dbk
+ 'pl_title' => $dbk
);
}
}
$arr[] = array(
'tl_from' => $this->mId,
'tl_namespace' => $ns,
- 'tl_title' => $dbk
+ 'tl_title' => $dbk
);
}
}
/**
* Get an array of category insertions
- * @param array $existing Array mapping existing category names to sort keys. If both
+ * @param array $existing Array mapping existing category names to sort keys. If both
* match a link in $this, the link will be omitted from the output
* @access private
*/
*/
function getExistingLinks() {
$fname = 'LinksUpdate::getExistingLinks';
- $res = $this->mDb->select( 'pagelinks', array( 'pl_namespace', 'pl_title' ),
+ $res = $this->mDb->select( 'pagelinks', array( 'pl_namespace', 'pl_title' ),
array( 'pl_from' => $this->mId ), $fname, $this->mOptions );
$arr = array();
while ( $row = $this->mDb->fetchObject( $res ) ) {
*/
function getExistingTemplates() {
$fname = 'LinksUpdate::getExistingTemplates';
- $res = $this->mDb->select( 'templatelinks', array( 'tl_namespace', 'tl_title' ),
+ $res = $this->mDb->select( 'templatelinks', array( 'tl_namespace', 'tl_title' ),
array( 'tl_from' => $this->mId ), $fname, $this->mOptions );
$arr = array();
while ( $row = $this->mDb->fetchObject( $res ) ) {
*/
function getExistingImages() {
$fname = 'LinksUpdate::getExistingImages';
- $res = $this->mDb->select( 'imagelinks', array( 'il_to' ),
+ $res = $this->mDb->select( 'imagelinks', array( 'il_to' ),
array( 'il_from' => $this->mId ), $fname, $this->mOptions );
$arr = array();
while ( $row = $this->mDb->fetchObject( $res ) ) {