*/
class MagicWord {
/**#@+
- * @access private
+ * @private
*/
var $mId, $mSynonyms, $mCaseSensitive, $mRegex;
var $mRegexStart, $mBaseRegex, $mVariableRegex;
/**
* Preliminary initialisation
- * @access private
+ * @private
*/
function initRegex() {
#$variableClass = Title::legalChars();
/**
* Used in matchAndRemove()
- * @access private
+ * @private
**/
function pregRemoveAndRecord( $match ) {
global $wgMagicFound;
}
/**
- * @access private
+ * @private
*/
function rdfSetup() {
global $wgOut, $_SERVER;
}
/**
- * @access private
+ * @private
*/
function dcPrologue($url) {
global $wgOutputEncoding;
}
/**
- * @access private
+ * @private
*/
function dcEpilogue() {
print "
}
/**
- * @access private
+ * @private
*/
function dcBasics($article) {
global $wgContLanguageCode, $wgSitename;
}
/**
- * @access private
+ * @private
*/
function ccPrologue() {
global $wgOutputEncoding;
}
/**
- * @access private
+ * @private
*/
function ccSubPrologue($type, $url) {
$url = htmlspecialchars( $url );
}
/**
- * @access private
+ * @private
*/
function ccSubEpilogue($type) {
echo " </cc:{$type}>\n";
}
/**
- * @access private
+ * @private
*/
function ccLicense($terms) {
}
/**
- * @access private
+ * @private
*/
function ccTerm($term, $name) {
print " <cc:{$term} rdf:resource=\"http://web.resource.org/cc/{$name}\" />\n";
}
/**
- * @access private
+ * @private
*/
function ccEpilogue() {
echo "</rdf:RDF>\n";
}
/**
- * @access private
+ * @private
*/
function dcElement($name, $value) {
$value = htmlspecialchars( $value );
}
/**
- * @access private
+ * @private
*/
function dcDate($timestamp) {
return substr($timestamp, 0, 4) . '-'
}
/**
- * @access private
+ * @private
*/
function dcReallyFullUrl($title) {
return $title->getFullURL();
}
/**
- * @access private
+ * @private
*/
function dcPageOrString($name, $page, $str) {
$nt = Title::newFromText($page);
}
/**
- * @access private
+ * @private
*/
function dcPage($name, $title) {
dcUrl($name, dcReallyFullUrl($title));
}
/**
- * @access private
+ * @private
*/
function dcUrl($name, $url) {
$url = htmlspecialchars( $url );
}
/**
- * @access private
+ * @private
*/
function dcPerson($name, $id, $user_name='', $user_real_name='') {
global $wgContLang;
/**
* Takes an arg, for future enhancement with different rights for
* different pages.
- * @access private
+ * @private
*/
function dcRights($article) {
}
/**
- * @access private
+ * @private
*/
function ccGetTerms($url) {
global $wgLicenseTerms;
}
/**
- * @access private
+ * @private
*/
function getKnownLicenses() {
/**
* Definitions of the NS_ constants are in Defines.php
- * @access private
+ * @private
*/
$wgCanonicalNamespaceNames = array(
NS_MEDIA => 'Media',
* @static
* @param string $term
* @return Title
- * @access private
+ * @private
*/
function getNearMatch( $term ) {
# Exact match? No need to look further.
* active database backend, and return a configured instance.
*
* @return SearchEngine
- * @access private
+ * @private
*/
function create() {
global $wgDBtype, $wgSearchType;
/**
* Return a partial WHERE clause to exclude redirects, if so set
* @return string
- * @access private
+ * @private
*/
function queryRedirect() {
if( $this->showRedirects ) {
/**
* Return a partial WHERE clause to limit the search to the given namespaces
* @return string
- * @access private
+ * @private
*/
function queryNamespaces() {
$namespaces = implode( ',', $this->namespaces );
/**
* Return a LIMIT clause to limit results on the query.
* @return string
- * @access private
+ * @private
*/
function queryLimit() {
return $this->db->limitResult( '', $this->limit, $this->offset );
* Does not do anything for generic search engine
* subclasses may define this though
* @return string
- * @access private
+ * @private
*/
function queryRanking( $filteredTerm, $fulltext ) {
return '';
* The guts shoulds be constructed in queryMain()
* @param string $filteredTerm
* @param bool $fulltext
- * @access private
+ * @private
*/
function getQuery( $filteredTerm, $fulltext ) {
return $this->queryMain( $filteredTerm, $fulltext ) . ' ' .
* @param string $filteredTerm
* @param bool $fulltext
* @return string
- * @access private
+ * @private
*/
function queryMain( $filteredTerm, $fulltext ) {
$match = $this->parseQuery( $filteredTerm, $fulltext );
/**
* Default per-revision callback, performs the import.
* @param WikiRevision $revision
- * @access private
+ * @private
*/
function importRevision( &$revision ) {
$dbw =& wfGetDB( DB_MASTER );
/**
* Alternate per-revision callback, for debugging.
* @param WikiRevision $revision
- * @access private
+ * @private
*/
function debugRevisionHandler( &$revision ) {
$this->debug( "Got revision:" );
/**
* Notify the callback function when a new <page> is reached.
* @param Title $title
- * @access private
+ * @private
*/
function pageCallback( $title ) {
if( is_callable( $this->mPageCallback ) ) {
/**
* Basic setup and applies the limiting factors from the WebRequest object.
* @param WebRequest $request
- * @access private
+ * @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)
- * @access private
+ * @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
- * @access private
+ * @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
- * @access private
+ * @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
- * @access private
+ * @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
- * @access private
+ * @private
*/
function getQuery() {
$logging = $this->db->tableName( "logging" );
/**
* @param Object $s a single row from the result set
* @return string Formatted HTML list item
- * @access private
+ * @private
*/
function logLine( $s ) {
global $wgLang;
/**
* @param OutputPage &$out where to send output
- * @access private
+ * @private
*/
function showHeader( &$out ) {
$type = $this->reader->queryType();
/**
* @param OutputPage &$out where to send output
- * @access private
+ * @private
*/
function showOptions( &$out ) {
global $wgScript;
/**
* @return string Formatted HTML
- * @access private
+ * @private
*/
function getTypeMenu() {
$out = "<select name='type'>\n";
/**
* @return string Formatted HTML
- * @access private
+ * @private
*/
function getUserInput() {
$user = htmlspecialchars( $this->reader->queryUser() );
/**
* @return string Formatted HTML
- * @access private
+ * @private
*/
function getTitleInput() {
$title = htmlspecialchars( $this->reader->queryTitle() );
/**
* @param OutputPage &$out where to send output
- * @access private
+ * @private
*/
function showPrevNext( &$out ) {
global $wgContLang,$wgRequest;
* @param int $limit Number of entries to display
* @param Title $from Display from this article ID
* @param string $dir 'next' or 'prev', whether $fromTitle is the start or end of the list
- * @access private
+ * @private
*/
function showIndirectLinks( $level, $target, $limit, $from = 0, $dir = 'next' ) {
global $wgOut;
*/
/**#@+
- * @access private
+ * @private
*/
var $mTextform; # Text form (spaces not underscores) of the main part
/**
* Constructor
- * @access private
+ * @private
*/
/* private */ function Title() {
$this->mInterwiki = $this->mUrlform =
* Can $wgUser perform $action this page?
* @param string $action action that permission needs to be checked for
* @return boolean
- * @access private
+ * @private
*/
function userCan($action) {
$fname = 'Title::userCan';
*
* @param string $name the text
* @return string the prefixed text
- * @access private
+ * @private
*/
/* private */ function prefix( $name ) {
global $wgContLang;
* namespace prefixes, sets the other forms, and canonicalizes
* everything.
* @return bool true on success
- * @access private
+ * @private
*/
/* private */ function secureAndSplit() {
global $wgContLang, $wgLocalInterwiki, $wgCapitalLinks;
*
* @param Title &$nt the page to move to, which should currently
* be a redirect
- * @access private
+ * @private
*/
function moveOverExistingRedirect( &$nt, $reason = '' ) {
global $wgUseSquid, $wgMwRedir;
/**
* Move page to non-existing title.
* @param Title &$nt the new Title
- * @access private
+ * @private
*/
function moveToNewTitle( &$nt, $reason = '' ) {
global $wgUseSquid;
*
* @param string $v the language code of the variant
* @return string the code of the fallback language or false if there is no fallback
- * @access private
+ * @private
*/
function getVariantFallback($v) {
return $this->mVariantFallbacks[$v];
* @param string $text the text to be converted
* @param string $toVariant the target language code
* @return string the converted text
- * @access private
+ * @private
*/
function autoConvert($text, $toVariant=false) {
$fname="LanguageConverter::autoConvert";
*
* @param string $text the text to be converted
* @return array of string
- * @access private
+ * @private
*/
function autoConvertToAllVariants($text) {
$fname="LanguageConverter::autoConvertToAllVariants";
* parse the manually marked conversion rule
* @param string $rule the text of the rule
* @return array of the translation in each variant
- * @access private
+ * @private
*/
function parseManualRule($rules, $flags=array()) {
/**
* a write lock to the cache
*
- * @access private
+ * @private
*/
function lockCache() {
global $wgMemc;
/**
* unlock cache
*
- * @access private
+ * @private
*/
function unlockCache() {
global $wgMemc;
* Load default conversion tables
* This method must be implemented in derived class
*
- * @access private
+ * @private
*/
function loadDefaultTables() {
$name = get_class($this);
/**
* load conversion tables either from the cache or the disk
- * @access private
+ * @private
*/
function loadTables($fromcache=true) {
global $wgMemc;
/**
* Reload the conversion tables
*
- * @access private
+ * @private
*/
function reloadTables() {
if($this->mTables)
* to make the tables more manageable, subpages are allowed
* and will be parsed recursively if $recursive=true
*
- * @access private
+ * @private
*/
function parseCachedTable($code, $subpage='', $recursive=true) {
global $wgMessageCache;
/**
* hook to refresh the cache of conversion tables when
* MediaWiki:conversiontable* is updated
- * @access private
+ * @private
*/
function OnArticleSaveComplete($article, $user, $text, $summary, $isminor, $iswatch, $section) {
$titleobj = $article->getTitle();
NS_CATEGORY_TALK => 'Kategooria_arutelu'
) + $wgNamespaceNamesEn;
-/* private */ $wgSkinNamesEt = array(
+/* @private */ $wgSkinNamesEt = array(
'standard' => "Standard",
'nostalgia' => "Nostalgia",
'cologneblue' => "Kölni sinine",
);
-/* private */ $wgDateFormatsEt = array(
+/* @private */ $wgDateFormatsEt = array(
'Eelistus puudub',
'15.01.2001, kell 16.12',
'15. jaanuar 2001, kell 16.12',
);
-/* private */ $wgQuickbarSettingsEt = array(
+/* @private */ $wgQuickbarSettingsEt = array(
"Ei_ole", "Püsivalt_vasakul", "Püsivalt paremal", "Ujuvalt vasakul"
);
#Lisasin eestimaised poed, aga võõramaiseid ei julenud kustutada.
-/* private */ $wgBookstoreListEt = array(
+/* @private */ $wgBookstoreListEt = array(
"Apollo" => "http://www.apollo.ee/search.php?keyword=$1&search=OTSI",
"minu Raamat" => "http://www.raamat.ee/advanced_search_result.php?keywords=$1",
"Raamatukoi" => "http://www.raamatukoi.ee/cgi-bin/index?valik=otsing&paring=$1",
);
-/* private */ $wgMagicWordsEt = array(
+/* @private */ $wgMagicWordsEt = array(
# ID CASE SYNONYMS
MAG_REDIRECT => array( 0, '#redirect', "#suuna" ),
MAG_NOTOC => array( 0, '__NOTOC__' ),
* @subpackage Language
*/
/**
- * @access private
+ * @private
*/
$wgNamespaceNamesLi = array(
NS_MEDIA => 'Media',