}
- /*
+ /**
* UI entry point for page deletion
*/
public function delete() {
FeedUtils::checkPurge( $timekey, $key );
- /*
- * Bumping around loading up diffs can be pretty slow, so where
- * possible we want to cache the feed output so the next visitor
- * gets it quick too.
- */
+ /**
+ * Bumping around loading up diffs can be pretty slow, so where
+ * possible we want to cache the feed output so the next visitor
+ * gets it quick too.
+ */
$cachedFeed = $this->loadFromCache( $lastmod, $timekey, $key );
if( is_string( $cachedFeed ) ) {
wfDebug( "RC: Outputting cached feed\n" );
$feedLastmod = $messageMemc->get( $timekey );
if( ( $wgFeedCacheTimeout > 0 ) && $feedLastmod ) {
- /*
- * If the cached feed was rendered very recently, we may
- * go ahead and use it even if there have been edits made
- * since it was rendered. This keeps a swarm of requests
- * from being too bad on a super-frequently edited wiki.
- */
+ /**
+ * If the cached feed was rendered very recently, we may
+ * go ahead and use it even if there have been edits made
+ * since it was rendered. This keeps a swarm of requests
+ * from being too bad on a super-frequently edited wiki.
+ */
$feedAge = time() - wfTimestamp( TS_UNIX, $feedLastmod );
$feedLastmodUnix = wfTimestamp( TS_UNIX, $feedLastmod );
return $extraPath;
}
- /*
+ /**
* Find the path name of first element in the array.
* If the array is empty, this will return the \@extra interstitial element.
* If the specified path is not found or is not an array, it will return false.
return '';
}
- /*
+ /**
* Check if a page was deleted while the user was editing it, before submit.
* Note that we rely on the logging table, which hasn't been always there,
* but that doesn't matter, because this only applies to brand new
$wgOut->addHTML( "</div><!-- editButtons -->\n</div><!-- editOptions -->\n" );
}
- /*
+ /**
* Show an edit conflict. textbox1 is already shown in showEditForm().
* If you want to use another entry point to this function, be careful.
*/
private static $extensionLoaded = false;
/** Initializes the MimeMagic object. This is called by MimeMagic::singleton().
- *
- * This constructor parses the mime.types and mime.info files and build internal mappings.
- */
+ *
+ * This constructor parses the mime.types and mime.info files and build internal mappings.
+ */
function __construct() {
- /*
+ /**
* --- load mime.types ---
*/
}
}
- /*
- * --- load mime.info ---
- */
+ /**
+ * --- load mime.info ---
+ */
global $wgMimeInfoFile;
if ( $wgMimeInfoFile == 'includes/mime.info' ) {
return "image/webp";
}
- /*
+ /**
* Look for PHP. Check for this before HTML/XML... Warning: this is a
* heuristic, and won't match a file with a lot of non-PHP before. It
* will also match text files which could be PHP. :)
return 'application/x-php';
}
- /*
+ /**
* look for XML formats (XHTML and SVG)
*/
$xml = new XmlTypeCheck( $file );
}
}
- /*
+ /**
* look for shell scripts
*/
$script_type = null;
# Not a public wiki, so no shortcut
$useShortcut = false;
} elseif ( !empty( $wgRevokePermissions ) ) {
- /*
+ /**
* Iterate through each group with permissions being revoked (key not included since we don't care
* what the group name is), then check if the read permission is being revoked. If it is, then
* we don't use the shortcut below since the user might not be able to read, even though anon
return $s;
}
- /*
+ /**
* Build a concatenation list to feed into a SQL query
*
* @return string
*/
abstract function getMainLB( $wiki = false );
- /*
+ /**
* Create a new load balancer for external storage. The resulting object will be
* untracked, not chronology-protected, and the caller is responsible for
* cleaning it up.
*/
abstract function newExternalLB( $cluster, $wiki = false );
- /*
+ /**
* Get a cached (tracked) load balancer for external storage
*
* @param $cluster String: external storage cluster, or false for core
function getRepoName() {
return $this->repo ? $this->repo->getName() : 'unknown';
}
+
/*
* Returns the repository
*/
return false;
}
- /*
+ /**
* Find many files at once.
* @param $items An array of titles, or an array of findFile() options with
* the "title" option giving the title. Example:
}
}
- /*
+ /**
* Return the imageurl from cache if possible
*
* If the url has been requested today, get it from cache
$this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-sqlite-name-help' ) );
}
- /*
+ /**
* Safe wrapper for PHP's realpath() that fails gracefully if it's unable to canonicalize the path.
*/
private static function realpath( $path ) {
return array( 'png', 'image/png' );
}
- /*
+ /**
* Get width and height from the bmp header.
*/
function getImageSize( $image, $filename ) {
*/
abstract function getParamMap();
- /*
+ /**
* Validate a thumbnail parameter at parse time.
* Return true to accept the parameter, and false to reject it.
* If you return false, the parser will do something quiet and forgiving.
}
}
- /*
+ /**
* Transform an SVG file to PNG
* This function can be called outside of thumbnail contexts
* @param string $srcPath
wfRestoreWarnings();
}
- /*
+ /**
* @return Array with the known metadata
*/
public function getMetadata() {
return $this->metadata;
}
- /*
+ /**
* Read the SVG
*/
public function read() {
return true;
}
- /*
+ /**
* Read a textelement from an element
*
* @param String $name of the element that we are reading from
$this->reader->next();
}
- /*
+ /**
* Filter all children, looking for animate elements
*
* @param String $name of the element that we are reading from
wfDebug( "SVGReader WARN: $data\n" );
}
- /*
+ /**
* Parse the attributes of an SVG element
*
* The parser has to be in the start element of <svg>
protected $items;
- /*
+ /**
* These are various mode constants.
* they are used to figure out what to do
* with an element when its encountered.
*/
abstract public function set( $key, $value, $exptime = 0 );
- /*
+ /**
* Delete an item.
* @param $key string
* @param $time int Amount of time to delay the operation (mostly memcached-specific)
return '';
return wfUrlencode( $t->getSubjectNsText() );
}
- /*
+
+ /**
* Functions to get and normalize pagenames, corresponding to the magic words
* of the same names
- */
+ */
static function pagename( $parser, $title = null ) {
$t = Title::newFromText( $title );
if ( is_null( $t ) )
return new PostgresSearchResultSet( $resultSet, $this->searchTerms );
}
-
- /*
+ /**
* Transform the user's search string into a better form for tsearch2
* Returns an SQL fragment consisting of quoted text to search for.
- */
+ */
function parseQuery( $term ) {
wfDebug( "parseQuery received: $term \n" );