From: Gabriel Wicke Date: Fri, 30 Jan 2004 16:06:22 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: 1.3.0beta1~1068 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=cdf66aeddc534e02639c11b8bcd89c38af23a141;p=lhc%2Fweb%2Fwiklou.git *** empty log message *** --- diff --git a/includes/SquidUpdate.php b/includes/SquidUpdate.php new file mode 100644 index 0000000000..0c1e8b5886 --- /dev/null +++ b/includes/SquidUpdate.php @@ -0,0 +1,34 @@ +title = $title; + $this->urlArr = $urlArr; + } + + + function doUpdate() + { + if (count( $this->urlArr ) == 0) { // newly created Article + global $wgInternalServer; + /* prepare the list of urls to purge */ + $id= $this->title->getArticleID(); + $sql = "SELECT l_from FROM links WHERE l_to={$id}" ; + $res = wfQuery ( $sql, DB_READ ) ; + while ( $BL = wfFetchObject ( $res ) ) + { + $t = Title::newFromDBkey( $BL->l_from) ; + $this->urlArr[] = $wgInternalServer.wfLocalUrl( $t->getPrefixedURL() ); + } + wfFreeResult ( $res ) ; + + } + + wfPurgeSquidServers($this->urlArr); +} +} + +?>