From cdf66aeddc534e02639c11b8bcd89c38af23a141 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Fri, 30 Jan 2004 16:06:22 +0000 Subject: [PATCH] *** empty log message *** --- includes/SquidUpdate.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 includes/SquidUpdate.php 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); +} +} + +?> -- 2.20.1