Autodiscovery <link> for RSS feed. Added helper functions for query stuff:
[mediawiki.git] / includes / SquidUpdate.php
blob27ee985a3b554aeec6fd840104480aefd1a0bd9b
1 <?php
2 # See deferred.doc
4 class SquidUpdate {
5 var $title, $urlArr;
7 function SquidUpdate( $title, $urlArr = Array() ) {
8 $this->title = $title;
9 $this->urlArr = $urlArr;
13 function doUpdate() {
14 if( count( $this->urlArr ) == 0) {
15 # newly created Article
16 # prepare the list of urls to purge
17 $id= $this->title->getArticleID();
18 $sql = "SELECT cur_namespace,cur_title FROM links,cur WHERE l_to={$id} AND l_from=cur_id" ;
19 $res = wfQuery( $sql, DB_READ );
20 while( $row = wfFetchObject ( $res ) ) {
21 $t = Title::MakeTitle( $row->cur_namespace, $row->cur_title );
22 $this->urlArr[] = $t->getInternalURL();
24 wfFreeResult( $res );
27 wfPurgeSquidServers( $this->urlArr );