* @todo document (e.g. one-sentence top-level class description).
*/
class LinksUpdate extends SqlDataUpdate {
-
// @todo make members protected, but make sure extensions don't break
- public $mId, //!< Page ID of the article linked from
- $mTitle, //!< Title object of the article linked from
- $mParserOutput, //!< Parser output
- $mLinks, //!< Map of title strings to IDs for the links in the document
- $mImages, //!< DB keys of the images used, in the array key only
- $mTemplates, //!< Map of title strings to IDs for the template references, including broken ones
- $mExternals, //!< URLs of external links, array key only
- $mCategories, //!< Map of category names to sort keys
- $mInterlangs, //!< Map of language codes to titles
- $mProperties, //!< Map of arbitrary name to value
- $mDb, //!< Database connection reference
- $mOptions, //!< SELECT options to be used (array)
- $mRecursive; //!< Whether to queue jobs for recursive updates
+ public $mId, //!< Page ID of the article linked from
+ $mTitle, //!< Title object of the article linked from
+ $mParserOutput, //!< Parser output
+ $mLinks, //!< Map of title strings to IDs for the links in the document
+ $mImages, //!< DB keys of the images used, in the array key only
+ $mTemplates, //!< Map of title strings to IDs for the template references, including broken ones
+ $mExternals, //!< URLs of external links, array key only
+ $mCategories, //!< Map of category names to sort keys
+ $mInterlangs, //!< Map of language codes to titles
+ $mProperties, //!< Map of arbitrary name to value
+ $mDb, //!< Database connection reference
+ $mOptions, //!< SELECT options to be used (array)
+ $mRecursive; //!< Whether to queue jobs for recursive updates
/**
* @var null|array Added links if calculated.
);
}
}
+
return $arr;
}
);
}
}
+
return $arr;
}
'il_to' => $iname
);
}
+
return $arr;
}
);
}
}
+
return $arr;
}
'cl_type' => $type,
);
}
+
return $arr;
}
'll_title' => $title
);
}
+
return $arr;
}
'pp_value' => $value,
);
}
+
return $arr;
}
);
}
}
+
return $arr;
}
$del[$ns] = $existing[$ns];
}
}
+
return $del;
}
$del[$ns] = $existing[$ns];
}
}
+
return $del;
}
$del[$prefix] = $existing[$prefix];
}
}
+
return $del;
}
}
$arr[$row->pl_namespace][$row->pl_title] = 1;
}
+
return $arr;
}
}
$arr[$row->tl_namespace][$row->tl_title] = 1;
}
+
return $arr;
}
foreach ( $res as $row ) {
$arr[$row->il_to] = 1;
}
+
return $arr;
}
foreach ( $res as $row ) {
$arr[$row->el_to] = 1;
}
+
return $arr;
}
foreach ( $res as $row ) {
$arr[$row->cl_to] = $row->cl_sortkey_prefix;
}
+
return $arr;
}
foreach ( $res as $row ) {
$arr[$row->ll_lang] = $row->ll_title;
}
+
return $arr;
}
}
$arr[$row->iwl_prefix][$row->iwl_title] = 1;
}
+
return $arr;
}
foreach ( $res as $row ) {
$arr[$row->pp_propname] = $row->pp_value;
}
+
return $arr;
}
}
$result = array();
foreach ( $this->linkInsertions as $insertion ) {
- $result[] = Title::makeTitle( $insertion[ 'pl_namespace' ], $insertion[ 'pl_title' ] );
+ $result[] = Title::makeTitle( $insertion['pl_namespace'], $insertion['pl_title'] );
}
+
return $result;
}
$result[] = Title::makeTitle( $ns, $title );
}
}
+
return $result;
}
}
* Update object handling the cleanup of links tables after a page was deleted.
**/
class LinksDeletionUpdate extends SqlDataUpdate {
-
- protected $mPage; //!< WikiPage the wikipage that was deleted
+ protected $mPage; //!< WikiPage the wikipage that was deleted
/**
* Constructor
|| !$dbw->lock( $lockKey, __METHOD__, 1 ) // 1 sec timeout
) {
$this->doUpdatePendingDeltas();
+
return;
}
$pd = $this->getPendingDeltas();
array( 'ss_row_id' => 1 ),
__METHOD__
);
+
return $activeUsers;
}
$pending = array();
foreach ( array( 'ss_total_views', 'ss_total_edits',
- 'ss_good_articles', 'ss_total_pages', 'ss_users', 'ss_images' ) as $type )
- {
+ 'ss_good_articles', 'ss_total_pages', 'ss_users', 'ss_images' ) as $type
+ ) {
// Get pending increments and pending decrements
$pending[$type]['+'] = (int)$wgMemc->get( $this->getTypeCacheKey( $type, '+' ) );
$pending[$type]['-'] = (int)$wgMemc->get( $this->getTypeCacheKey( $type, '-' ) );
}
}
}
-
* @ingroup Cache
*/
class SquidUpdate {
-
/**
* Collection of URLs to purge.
* @var array
}
wfProfileOut( __METHOD__ );
+
return new SquidUpdate( $blurlArr );
}
break;
}
}
+
return new SquidUpdate( $urlArr );
}
*/
public static function newSimplePurge( Title $title ) {
$urlArr = $title->getSquidURLs();
+
return new SquidUpdate( $urlArr );
}
// pfsockopen doesn't work because we need set_sock_opt
$conn = socket_create( AF_INET, SOCK_DGRAM, SOL_UDP );
- if ( ! $conn ) {
+ if ( !$conn ) {
$errstr = socket_strerror( socket_last_error() );
wfDebugLog( 'squid', __METHOD__ .
": Error opening UDP socket: $errstr\n" );
wfProfileOut( __METHOD__ );
+
return;
}
return $routing;
}
}
+
return false;
}
}