return ( $sources > 0 );
}
+ /**
+ * Determines whether cascading protection sources have already been loaded from
+ * the database.
+ *
+ * @param bool $getPages True to check if the pages are loaded, or false to check
+ * if the status is loaded.
+ * @return bool Whether or not the specified information has been loaded
+ * @since 1.23
+ */
+ public function areCascadeProtectionSourcesLoaded( $getPages = true ) {
+ return $getPages ? isset( $this->mCascadeSources ) : isset( $this->mHasCascadingRestrictions );
+ }
+
/**
* Cascading protection: Get the source of any cascading restrictions on this page.
*
return array( $sources, $pagerestrictions );
}
+ /**
+ * Accessor for mRestrictionsLoaded
+ *
+ * @return bool Whether or not the page's restrictions have already been
+ * loaded from the database
+ * @since 1.23
+ */
+ public function areRestrictionsLoaded() {
+ return $this->mRestrictionsLoaded;
+ }
+
/**
* Accessor/initialisation for mRestrictions
*
: array();
}
+ /**
+ * Accessor/initialisation for mRestrictions
+ *
+ * @return Array of Arrays of Strings the first level indexed by
+ * action, the second level containing the names of the groups
+ * allowed to perform each action
+ * @since 1.23
+ */
+ public function getAllRestrictions() {
+ if ( !$this->mRestrictionsLoaded ) {
+ $this->loadRestrictions();
+ }
+ return $this->mRestrictions;
+ }
+
/**
* Get the expiry time for the restriction against a given action
*
}
}
+ // If we are looking at a css/js user subpage, purge the action=raw.
+ if ( $this->isJsSubpage() ) {
+ $urls[] = $this->getInternalUrl( 'action=raw&ctype=text/javascript' );
+ } elseif ( $this->isCssSubpage() ) {
+ $urls[] = $this->getInternalUrl( 'action=raw&ctype=text/css' );
+ }
+
wfRunHooks( 'TitleSquidURLs', array( $this, &$urls ) );
return $urls;
}