From: Brion Vibber Date: Wed, 26 Nov 2003 00:12:29 +0000 (+0000) Subject: Fix failed imagelinks updates X-Git-Tag: 1.1.0~82 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_modifier.php?a=commitdiff_plain;h=7d01e5bb97f6adfbd57862def613b003343edbaf;p=lhc%2Fweb%2Fwiklou.git Fix failed imagelinks updates --- diff --git a/includes/LinksUpdate.php b/includes/LinksUpdate.php index 547aa515b6..360680fc45 100644 --- a/includes/LinksUpdate.php +++ b/includes/LinksUpdate.php @@ -126,6 +126,7 @@ class LinksUpdate { foreach( $add as $iname => $val ) { # FIXME: Change all this to avoid unnecessary duplication $nt = Title::makeTitle( $image, $iname ); + if( !$nt ) continue; $nt->invalidateCache(); $iname = wfStrencode( $iname ); diff --git a/includes/Title.php b/includes/Title.php index 75fb418f8c..7c840b983b 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -359,7 +359,7 @@ class Title { $ns = $this->getNamespace(); $ti = wfStrencode( $this->getDBkey() ); $sql = "UPDATE cur SET cur_touched='$now' WHERE cur_namespace=$ns AND cur_title='$ti'"; - return wfQuery( $sql, "Title::invalidateCache" ); + return wfQuery( $sql, DB_WRITE, "Title::invalidateCache" ); } /* private */ function prefix( $name )