GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Get MediaWiki
  • Get extensions
  • Tech blog
  • Contribute
  • User help
  • FAQ
  • Technical manual
  • Support desk
  • Communication
  • Developer portal
  • Code statistics
  • Community portal
  • Recent changes

This view

  • Original page
  • New address

GeezerVison is showing www.mediawiki.org — Wikia code/includes/ProtectionForm.php - MediaWiki

< Wikia code | includes
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on the information here being up-to-date.

The information shown below refers to the now unmaintained 1.16 MediaWiki release. The current stable release number is 1.46.2.
--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\includes\ProtectionForm.php	2011-07-18 22:31:27.980468800 +0100
+++ D:\Programming\SVN\wikia\trunk\includes\ProtectionForm.php	2011-08-17 15:28:46.342773400 +0100
@@ -487,8 +487,13 @@
 		}
 
 		if ( !$this->disabled ) {
-			$out .= Xml::closeElement( 'form' ) .
-				$this->buildCleanupScript();
+			$out .= Xml::closeElement( 'form' );
+
+			/* Wikia change begin - @author: Macbre */
+			/* Add a script to $wgOut instead of emiting it directly to HTML (BugId:7178) */
+			global $wgHooks;
+			$wgHooks['SkinAfterBottomScripts'][] = array($this, 'onSkinAfterBottomScripts');
+			/* Wikia change end */
 		}
 
 		return $out;
@@ -546,10 +551,13 @@
 	}
 
 	function buildScript() {
-		global $wgStylePath, $wgStyleVersion;
-		return Xml::tags( 'script', array(
-			'type' => 'text/javascript',
-			'src' => $wgStylePath . "/common/protect.js?$wgStyleVersion.1" ), '' );
+		/* Wikia change begin - @author: Macbre */
+		/* Add a script to $wgOut instead of emiting it directly to HTML (BugId:7178) */
+		global $wgOut;
+		$wgOut->addScriptFile('protect.js');
+
+		return '';
+		/* Wikia change end */
 	}
 
 	function buildCleanupScript() {
@@ -574,6 +582,14 @@
 		return Xml::tags( 'script', array( 'type' => 'text/javascript' ), $script );
 	}
 
+	/* Wikia change begin - @author: Macbre */
+	/* Add a script to $wgOut instead of emiting it directly to HTML (BugId:7178) */
+	function onSkinAfterBottomScripts($skin, &$bottomScriptText) {
+		$bottomScriptText .= $this->buildCleanupScript();
+		return true;
+	}
+	/* Wikia change end */
+
 	/**
 	 * @param OutputPage $out
 	 * @access private
Retrieved from "https://www.mediawiki.org/w/index.php?title=Wikia_code/includes/ProtectionForm.php&oldid=4961063"
Categories:
  • Pages kept for historical interest
  • Wikia code diffs
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.