) {
$wgOut->addWikiText( wfMsg('usercssjs'));
$wgOut->addHTML( '<pre>'.htmlspecialchars($this->mContent)."\n</pre>" );
- } else if( $wgEnableParserCache && intval($wgUser->getOption( "stubthreshold" )) == 0 ){
+ } else if( $wgEnableParserCache && intval($wgUser->getOption( "stubthreshold" )) == 0 && empty( $oldid ) ){
$wgOut->addWikiText( $text, true, $this );
} else {
$wgOut->addWikiText( $text );
return $text;
}
- function updateArticle( $text, $summary, $minor, $watchthis, $forceBot = false )
+ function updateArticle( $text, $summary, $minor, $watchthis, $forceBot = false, $sectionanchor = "" )
{
global $wgOut, $wgUser, $wgLinkCache;
global $wgDBtransactions, $wgMwRedir;
$u->doUpdate();
}
- $this->showArticle( $text, wfMsg( "updated" ) );
+ $this->showArticle( $text, wfMsg( "updated" ), $sectionanchor );
return true;
}
# After we've either updated or inserted the article, update
# the link tables and redirect to the new page.
- function showArticle( $text, $subtitle )
+ function showArticle( $text, $subtitle , $sectionanchor = '' )
{
global $wgOut, $wgUser, $wgLinkCache;
global $wgMwRedir;
$r = "redirect=no";
else
$r = "";
- $wgOut->redirect( $this->mTitle->getFullURL( $r ) );
+ $wgOut->redirect( $this->mTitle->getFullURL( $r ).$sectionanchor );
}
# Add this page to my watchlist
$sql = "DELETE FROM brokenlinks WHERE bl_from={$id}";
wfQuery( $sql, DB_WRITE, $fname );
+ $sql = "DELETE FROM categorylinks WHERE cl_from={$id}";
+ wfQuery( $sql, DB_WRITE, $fname );
+
$log = new LogPage( wfMsg( "dellogpage" ), wfMsg( "dellogpagetext" ) );
$art = $this->mTitle->getPrefixedText();
$log->addEntry( wfMsg( "deletedarticle", $art ), $reason );
return false;
}
}
+
+ function getTouched() {
+ return $this->mTouched;
+ }
/* static */ function incViewCount( $id )
{
# This is called on page move and undelete, as well as edit
/* static */ function onArticleCreate($title_obj){
- global $wgEnablePersistentLC, $wgEnableParserCache, $wgUseSquid, $wgDeferredUpdateList;
+ global $wgEnablePersistentLC, $wgUseSquid, $wgDeferredUpdateList;
$titles = $title_obj->getBrokenLinksTo();
if ( $wgEnablePersistentLC ) {
LinkCache::linksccClearBrokenLinksTo( $title_obj->getPrefixedDBkey() );
}
-
- # Clear parser cache (not really used)
- if ( $wgEnableParserCache ) {
- OutputPage::parsercacheClearBrokenLinksTo( $title_obj->getPrefixedDBkey() );
- }
}
/* static */ function onArticleDelete($title_obj){
- global $wgEnablePersistentLC, $wgEnableParserCache;
+ global $wgEnablePersistentLC;
if ( $wgEnablePersistentLC ) {
LinkCache::linksccClearLinksTo( $title_obj->getArticleID() );
}
- if ( $wgEnableParserCache ) {
- OutputPage::parsercacheClearLinksTo( $title_obj->getArticleID() );
- }
}
/* static */ function onArticleEdit($title_obj){
- global $wgEnablePersistentLC, $wgEnableParserCache;
+ global $wgEnablePersistentLC;
if ( $wgEnablePersistentLC ) {
LinkCache::linksccClearPage( $title_obj->getArticleID() );
}
- if ( $wgEnableParserCache ) {
- OutputPage::parsercacheClearPage( $title_obj->getArticleID(), $title_obj->getNamespace() );
- }
}
}