/** Global singleton instance of MimeMagic. This is initialized on demand,
* please always use the wfGetMimeMagic() function to get the instance.
*
-* @private
+* @access private
*/
$wgMimeMagic= NULL;
/**
* Update a table by doing a delete query then an insert query
- * @private
+ * @access private
*/
function incrTableUpdate( $table, $prefix, $deletions, $insertions ) {
$fname = 'LinksUpdate::incrTableUpdate';
/**
* Get an array of pagelinks insertions for passing to the DB
* Skips the titles specified by the 2-D array $existing
- * @private
+ * @access private
*/
function getLinkInsertions( $existing = array() ) {
$arr = array();
/**
* Get an array of template insertions. Like getLinkInsertions()
- * @private
+ * @access private
*/
function getTemplateInsertions( $existing = array() ) {
$arr = array();
/**
* Get an array of image insertions
* Skips the names specified in $existing
- * @private
+ * @access private
*/
function getImageInsertions( $existing = array() ) {
$arr = array();
* Get an array of category insertions
* @param array $existing Array mapping existing category names to sort keys. If both
* match a link in $this, the link will be omitted from the output
- * @private
+ * @access private
*/
function getCategoryInsertions( $existing = array() ) {
$diffs = array_diff_assoc( $this->mCategories, $existing );
/**
* Given an array of existing links, returns those links which are not in $this
* and thus should be deleted.
- * @private
+ * @access private
*/
function getLinkDeletions( $existing ) {
$del = array();
/**
* Given an array of existing templates, returns those templates which are not in $this
* and thus should be deleted.
- * @private
+ * @access private
*/
function getTemplateDeletions( $existing ) {
$del = array();
/**
* Given an array of existing images, returns those images which are not in $this
* and thus should be deleted.
- * @private
+ * @access private
*/
function getImageDeletions( $existing ) {
return array_diff_key( $existing, $this->mImages );
/**
* Given an array of existing categories, returns those categories which are not in $this
* and thus should be deleted.
- * @private
+ * @access private
*/
function getCategoryDeletions( $existing ) {
return array_diff_assoc( $existing, $this->mCategories );
/**
* Get an array of existing links, as a 2-D array
- * @private
+ * @access private
*/
function getExistingLinks() {
$fname = 'LinksUpdate::getExistingLinks';
/**
* Get an array of existing templates, as a 2-D array
- * @private
+ * @access private
*/
function getExistingTemplates() {
$fname = 'LinksUpdate::getExistingTemplates';
/**
* Get an array of existing images, image names in the keys
- * @private
+ * @access private
*/
function getExistingImages() {
$fname = 'LinksUpdate::getExistingImages';
/**
* Get an array of existing categories, with the name in the key and sort key in the value.
- * @private
+ * @access private
*/
function getExistingCategories() {
$fname = 'LinksUpdate::getExistingCategories';
* Open a connection to the server given by the specified index
* Index must be an actual index into the array
* Returns success
- * @private
+ * @access private
*/
function openConnection( $i, $fail = false ) {
$fname = 'LoadBalancer::openConnection';
/**
* Test if the specified index represents an open connection
- * @private
+ * @access private
*/
function isOpen( $index ) {
if( !is_integer( $index ) ) {
/**
* Really opens a connection
- * @private
+ * @access private
*/
function reallyOpenConnection( &$server ) {
if( !is_array( $server ) ) {
/**
* Preliminary initialisation
- * @private
+ * @access private
*/
function initRegex() {
#$variableClass = Title::legalChars();
/**
* Used in matchAndRemove()
- * @private
+ * @access private
**/
function pregRemoveAndRecord( $match ) {
global $wgMagicFound;
}
/**
- * @private
+ * @access private
*/
function rdfSetup() {
global $wgOut, $_SERVER;
}
/**
- * @private
+ * @access private
*/
function dcPrologue($url) {
global $wgOutputEncoding;
}
/**
- * @private
+ * @access private
*/
function dcEpilogue() {
print "
}
/**
- * @private
+ * @access private
*/
function dcBasics($article) {
global $wgContLanguageCode, $wgSitename;
}
/**
- * @private
+ * @access private
*/
function ccPrologue() {
global $wgOutputEncoding;
}
/**
- * @private
+ * @access private
*/
function ccSubPrologue($type, $url) {
$url = htmlspecialchars( $url );
}
/**
- * @private
+ * @access private
*/
function ccSubEpilogue($type) {
echo " </cc:{$type}>\n";
}
/**
- * @private
+ * @access private
*/
function ccLicense($terms) {
}
/**
- * @private
+ * @access private
*/
function ccTerm($term, $name) {
print " <cc:{$term} rdf:resource=\"http://web.resource.org/cc/{$name}\" />\n";
}
/**
- * @private
+ * @access private
*/
function ccEpilogue() {
echo "</rdf:RDF>\n";
}
/**
- * @private
+ * @access private
*/
function dcElement($name, $value) {
$value = htmlspecialchars( $value );
}
/**
- * @private
+ * @access private
*/
function dcDate($timestamp) {
return substr($timestamp, 0, 4) . '-'
}
/**
- * @private
+ * @access private
*/
function dcReallyFullUrl($title) {
return $title->getFullURL();
}
/**
- * @private
+ * @access private
*/
function dcPageOrString($name, $page, $str) {
$nt = Title::newFromText($page);
}
/**
- * @private
+ * @access private
*/
function dcPage($name, $title) {
dcUrl($name, dcReallyFullUrl($title));
}
/**
- * @private
+ * @access private
*/
function dcUrl($name, $url) {
$url = htmlspecialchars( $url );
}
/**
- * @private
+ * @access private
*/
function dcPerson($name, $id, $user_name='', $user_real_name='') {
global $wgContLang;
/**
* Takes an arg, for future enhancement with different rights for
* different pages.
- * @private
+ * @access private
*/
function dcRights($article) {
}
/**
- * @private
+ * @access private
*/
function ccGetTerms($url) {
global $wgLicenseTerms;
}
/**
- * @private
+ * @access private
*/
function getKnownLicenses() {
* @param bool $useExt switch for allowing to use the file extension to guess the mime type. true by default.
*
* @return string the mime type of $file
- * @private
+ * @access private
*/
function detectMimeType( $file, $useExt=true ) {
$fname = 'MimeMagic::detectMimeType';
* distinguish them from mime types.
*
* This funktion relies on the mapping defined by $this->mMediaTypes
- * @private
+ * @access private
*/
function findMediaType($extMime) {
/**
* Definitions of the NS_ constants are in Defines.php
- * @private
+ * @access private
*/
$wgCanonicalNamespaceNames = array(
NS_MEDIA => 'Media',
}
/**
- * @private
+ * @access private
* @return string
*/
function headElement() {
/**
* Get various statistics from the database
- * @private
+ * @access private
*/
function wfLoadSiteStats() {
global $wgNumberOfArticles, $wgTotalViews, $wgTotalEdits;
/**
* Generate strings used for xml 'id' names
* @return string
- * @private
+ * @access private
*/
function getNameSpaceKey () {
switch ($this->mTitle->getNamespace()) {
/**
* Basic setup and applies the limiting factors from the WebRequest object.
* @param WebRequest $request
- * @private
+ * @access private
*/
function setupQuery( $request ) {
$page = $this->db->tableName( 'page' );
/**
* Set the log reader to return only entries of the given type.
* @param string $type A log type ('upload', 'delete', etc)
- * @private
+ * @access private
*/
function limitType( $type ) {
if( empty( $type ) ) {
/**
* Set the log reader to return only entries by the given user.
* @param string $name (In)valid user name
- * @private
+ * @access private
*/
function limitUser( $name ) {
if ( $name == '' )
* Set the log reader to return only entries affecting the given page.
* (For the block and rights logs, this is a user page.)
* @param string $page Title name as text
- * @private
+ * @access private
*/
function limitTitle( $page ) {
$title = Title::newFromText( $page );
* Set the log reader to return only entries in a given time range.
* @param string $time Timestamp of one endpoint
* @param string $direction either ">=" or "<=" operators
- * @private
+ * @access private
*/
function limitTime( $time, $direction ) {
# Direction should be a comparison operator
/**
* Build an SQL query from all the set parameters.
* @return string the SQL query
- * @private
+ * @access private
*/
function getQuery() {
$logging = $this->db->tableName( "logging" );
/**
* @param Object $s a single row from the result set
* @return string Formatted HTML list item
- * @private
+ * @access private
*/
function logLine( $s ) {
global $wgLang;
/**
* @param OutputPage &$out where to send output
- * @private
+ * @access private
*/
function showHeader( &$out ) {
$type = $this->reader->queryType();
/**
* @param OutputPage &$out where to send output
- * @private
+ * @access private
*/
function showOptions( &$out ) {
global $wgScript;
/**
* @return string Formatted HTML
- * @private
+ * @access private
*/
function getTypeMenu() {
$out = "<select name='type'>\n";
/**
* @return string Formatted HTML
- * @private
+ * @access private
*/
function getUserInput() {
$user = htmlspecialchars( $this->reader->queryUser() );
/**
* @return string Formatted HTML
- * @private
+ * @access private
*/
function getTitleInput() {
$title = htmlspecialchars( $this->reader->queryTitle() );
/**
* @param OutputPage &$out where to send output
- * @private
+ * @access private
*/
function showPrevNext( &$out ) {
global $wgContLang,$wgRequest;
/**
* Create a WatchedItem object with the given user and title
* @todo document
- * @private
+ * @access private
*/
function &fromUserTitle( &$user, &$title ) {
$wl = new WatchedItem;
* used for undoing the evil that is magic_quotes_gpc.
* @param array &$arr will be modified
* @return array the original array
- * @private
+ * @access private
*/
function &fix_magic_quotes( &$arr ) {
foreach( $arr as $key => $val ) {
* through fix_magic_quotes to strip out the stupid slashes.
* WARNING: This should only be done once! Running a second
* time could damage the values.
- * @private
+ * @access private
*/
function checkMagicQuotes() {
if ( get_magic_quotes_gpc() ) {
* Recursively normalizes UTF-8 strings in the given array.
* @param array $data string or array
* @return cleaned-up version of the given
- * @private
+ * @access private
*/
function normalizeUnicode( $data ) {
if( is_array( $data ) ) {
* @param string $name
* @param mixed $default
* @return mixed
- * @private
+ * @access private
*/
function getGPCVal( $arr, $name, $default ) {
if( isset( $arr[$name] ) ) {
/**
* Compute the sidebar
- * @private
+ * @access private
*/
function quickBar()
{