dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b64d8b4
)
unused variables as per #3692
author
Antoine Musso
<hashar@users.mediawiki.org>
Mon, 1 May 2006 10:53:59 +0000
(10:53 +0000)
committer
Antoine Musso
<hashar@users.mediawiki.org>
Mon, 1 May 2006 10:53:59 +0000
(10:53 +0000)
17 files changed:
config/index.php
patch
|
blob
|
history
includes/Article.php
patch
|
blob
|
history
includes/CategoryPage.php
patch
|
blob
|
history
includes/ChangesList.php
patch
|
blob
|
history
includes/Database.php
patch
|
blob
|
history
includes/Exif.php
patch
|
blob
|
history
includes/GlobalFunctions.php
patch
|
blob
|
history
includes/HTMLForm.php
patch
|
blob
|
history
includes/Image.php
patch
|
blob
|
history
includes/JobQueue.php
patch
|
blob
|
history
includes/LogPage.php
patch
|
blob
|
history
includes/ParserXML.php
patch
|
blob
|
history
includes/Sanitizer.php
patch
|
blob
|
history
includes/normal/UtfNormal.php
patch
|
blob
|
history
maintenance/refreshLinks.inc
patch
|
blob
|
history
skins/CologneBlue.php
patch
|
blob
|
history
skins/Standard.php
patch
|
blob
|
history
diff --git
a/config/index.php
b/config/index.php
index
135127b
..
71eceb5
100644
(file)
--- a/
config/index.php
+++ b/
config/index.php
@@
-1332,7
+1332,7
@@
function aField( &$conf, $field, $text, $type = "text", $value = "" ) {
$xtype = "";
}
$xtype = "";
}
-
if(!(isset($id)) or ($id == "") )
$id = $field;
+ $id = $field;
$nolabel = ($type == "radio") || ($type == "hidden");
if ($type == 'radio')
$nolabel = ($type == "radio") || ($type == "hidden");
if ($type == 'radio')
@@
-1418,6
+1418,7
@@
function get_db_version() {
return mysql_get_server_info( $wgDatabase->mConn );
else if ($conf->DBtype == 'oracle')
return oci_server_version($wgDatabase->mConn);
return mysql_get_server_info( $wgDatabase->mConn );
else if ($conf->DBtype == 'oracle')
return oci_server_version($wgDatabase->mConn);
+ else return 'unknown';
}
# Test a memcached server
}
# Test a memcached server
diff --git
a/includes/Article.php
b/includes/Article.php
index
9e2c9d0
..
52ecca4
100644
(file)
--- a/
includes/Article.php
+++ b/
includes/Article.php
@@
-355,8
+355,6
@@
class Article {
# Query variables :P
$oldid = $this->getOldID();
# Query variables :P
$oldid = $this->getOldID();
- $fname = 'Article::loadContent';
-
# Pre-fill content with error message so that if something
# fails we'll have something telling us what we intended.
# Pre-fill content with error message so that if something
# fails we'll have something telling us what we intended.
@@
-692,7
+690,7
@@
class Article {
}
/**
}
/**
- * @todo Document
+ * @todo Document
, fixme $offset never used.
* @param $limit Integer: default 0.
* @param $offset Integer: default 0.
*/
* @param $limit Integer: default 0.
* @param $offset Integer: default 0.
*/
@@
-899,6
+897,7
@@
class Article {
$wgOut->setSubtitle( wfMsgHtml( 'redirectpagesub' ) );
}
$targetUrl = $rt->escapeLocalURL();
$wgOut->setSubtitle( wfMsgHtml( 'redirectpagesub' ) );
}
$targetUrl = $rt->escapeLocalURL();
+ #Â fixme unused $titleText :
$titleText = htmlspecialchars( $rt->getPrefixedText() );
$link = $sk->makeLinkObj( $rt );
$titleText = htmlspecialchars( $rt->getPrefixedText() );
$link = $sk->makeLinkObj( $rt );
@@
-1273,10
+1272,6
@@
class Article {
wfProfileOut( $fname );
}
wfProfileOut( $fname );
}
- function getTextOfLastEditWithSectionReplacedOrAdded($section, $text, $summary = '', $edittime = NULL) {
- $this->replaceSection( $section, $text, $summary, $edittime );
- }
-
/**
* @return string Complete article text, or null if error
*/
/**
* @return string Complete article text, or null if error
*/
@@
-1395,7
+1390,6
@@
class Article {
}
$isminor = $minor && $wgUser->isAllowed('minoredit');
}
$isminor = $minor && $wgUser->isAllowed('minoredit');
- $redir = (int)$this->isRedirect( $text );
$text = $this->preSaveTransform( $text );
$dbw =& wfGetDB( DB_MASTER );
$text = $this->preSaveTransform( $text );
$dbw =& wfGetDB( DB_MASTER );
@@
-1529,6
+1523,7
@@
class Article {
/**
* After we've either updated or inserted the article, update
* the link tables and redirect to the new page.
/**
* After we've either updated or inserted the article, update
* the link tables and redirect to the new page.
+ * @todo FIXME some function arguments never used
*/
function showArticle( $text, $subtitle , $sectionanchor = '', $me2, $now, $summary, $oldid ) {
global $wgOut;
*/
function showArticle( $text, $subtitle , $sectionanchor = '', $me2, $now, $summary, $oldid ) {
global $wgOut;
@@
-2484,6
+2479,7
@@
class Article {
'comment' => $comment,
'minor_edit' => $minor ? 1 : 0,
) );
'comment' => $comment,
'minor_edit' => $minor ? 1 : 0,
) );
+ # fixme : $revisionId never used
$revisionId = $revision->insertOn( $dbw );
$this->updateRevisionOn( $dbw, $revision );
$dbw->commit();
$revisionId = $revision->insertOn( $dbw );
$this->updateRevisionOn( $dbw, $revision );
$dbw->commit();
diff --git
a/includes/CategoryPage.php
b/includes/CategoryPage.php
index
69756dc
..
ed9bc00
100644
(file)
--- a/
includes/CategoryPage.php
+++ b/
includes/CategoryPage.php
@@
-49,7
+49,6
@@
class CategoryPage extends Article {
function closeShowCategory() {
global $wgOut, $wgRequest;
function closeShowCategory() {
global $wgOut, $wgRequest;
- $pageConditions = array();
$from = $wgRequest->getVal( 'from' );
$until = $wgRequest->getVal( 'until' );
$wgOut->addHTML( $this->doCategoryMagic( $from, $until ) );
$from = $wgRequest->getVal( 'from' );
$until = $wgRequest->getVal( 'until' );
$wgOut->addHTML( $this->doCategoryMagic( $from, $until ) );
@@
-72,7
+71,6
@@
class CategoryPage extends Article {
$articles_start_char = array();
$children = array();
$children_start_char = array();
$articles_start_char = array();
$children = array();
$children_start_char = array();
- $data = array();
if( $wgCategoryMagicGallery ) {
$ig = new ImageGallery();
}
if( $wgCategoryMagicGallery ) {
$ig = new ImageGallery();
}
diff --git
a/includes/ChangesList.php
b/includes/ChangesList.php
index
ab30a13
..
59c410f
100644
(file)
--- a/
includes/ChangesList.php
+++ b/
includes/ChangesList.php
@@
-330,7
+330,6
@@
class EnhancedChangesList extends ChangesList {
$rc->numberofWatchingusers = $baseRC->numberofWatchingusers;
# Make "cur" and "diff" links
$rc->numberofWatchingusers = $baseRC->numberofWatchingusers;
# Make "cur" and "diff" links
- $titleObj = $rc->getTitle();
if( $rc->unpatrolled ) {
$rcIdQuery = "&rcid={$rc_id}";
} else {
if( $rc->unpatrolled ) {
$rcIdQuery = "&rcid={$rc_id}";
} else {
diff --git
a/includes/Database.php
b/includes/Database.php
index
133f4a1
..
8376f06
100644
(file)
--- a/
includes/Database.php
+++ b/
includes/Database.php
@@
-541,7
+541,6
@@
class Database {
* @return string executable SQL
*/
function fillPrepared( $preparedQuery, $args ) {
* @return string executable SQL
*/
function fillPrepared( $preparedQuery, $args ) {
- $n = 0;
reset( $args );
$this->preparedArgs =& $args;
return preg_replace_callback( '/(\\\\[?!&]|[?!&])/',
reset( $args );
$this->preparedArgs =& $args;
return preg_replace_callback( '/(\\\\[?!&]|[?!&])/',
diff --git
a/includes/Exif.php
b/includes/Exif.php
index
e7a3f9c
..
1009688
100644
(file)
--- a/
includes/Exif.php
+++ b/
includes/Exif.php
@@
-366,7
+366,7
@@
class Exif {
/**
* @todo document
*/
/**
* @todo document
*/
- function makeFormattedData(
$data = null
) {
+ function makeFormattedData( ) {
$format = new FormatExif( $this->getFilteredData() );
$this->mFormattedExifData = $format->getFormattedData();
}
$format = new FormatExif( $this->getFilteredData() );
$this->mFormattedExifData = $format->getFormattedData();
}
diff --git
a/includes/GlobalFunctions.php
b/includes/GlobalFunctions.php
index
5502d9c
..
d30dd97
100644
(file)
--- a/
includes/GlobalFunctions.php
+++ b/
includes/GlobalFunctions.php
@@
-1303,6
+1303,7
@@
define('TS_ORACLE', 6);
*/
function wfTimestamp($outputtype=TS_UNIX,$ts=0) {
$uts = 0;
*/
function wfTimestamp($outputtype=TS_UNIX,$ts=0) {
$uts = 0;
+ $da = array();
if ($ts==0) {
$uts=time();
} elseif (preg_match("/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/",$ts,$da)) {
if ($ts==0) {
$uts=time();
} elseif (preg_match("/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/",$ts,$da)) {
diff --git
a/includes/HTMLForm.php
b/includes/HTMLForm.php
index
1529a73
..
a5f987f
100644
(file)
--- a/
includes/HTMLForm.php
+++ b/
includes/HTMLForm.php
@@
-99,7
+99,7
@@
class HTMLForm {
if ( $this->mRequest->wasPosted() ) {
$arr = $this->mRequest->getArray( $varname );
if ( is_array( $arr ) ) {
if ( $this->mRequest->wasPosted() ) {
$arr = $this->mRequest->getArray( $varname );
if ( is_array( $arr ) ) {
- foreach ( $_POST[$varname] as $index
=>
$element ) {
+ foreach ( $_POST[$varname] as $index
=>
$element ) {
$s .= htmlspecialchars( $element )."\n";
}
}
$s .= htmlspecialchars( $element )."\n";
}
}
diff --git
a/includes/Image.php
b/includes/Image.php
index
013cdba
..
88ffbeb
100644
(file)
--- a/
includes/Image.php
+++ b/
includes/Image.php
@@
-95,10
+95,9
@@
class Image
* Get the memcached keys
* Returns an array, first element is the local cache key, second is the shared cache key, if there is one
*/
* Get the memcached keys
* Returns an array, first element is the local cache key, second is the shared cache key, if there is one
*/
- function getCacheKeys(
$shared = false
) {
+ function getCacheKeys( ) {
global $wgDBname, $wgUseSharedUploads, $wgSharedUploadDBname, $wgCacheSharedUploads;
global $wgDBname, $wgUseSharedUploads, $wgSharedUploadDBname, $wgCacheSharedUploads;
- $foundCached = false;
$hashedName = md5($this->name);
$keys = array( "$wgDBname:Image:$hashedName" );
if ( $wgUseSharedUploads && $wgSharedUploadDBname && $wgCacheSharedUploads ) {
$hashedName = md5($this->name);
$keys = array( "$wgDBname:Image:$hashedName" );
if ( $wgUseSharedUploads && $wgSharedUploadDBname && $wgCacheSharedUploads ) {
diff --git
a/includes/JobQueue.php
b/includes/JobQueue.php
index
c9b2146
..
d589d8c
100644
(file)
--- a/
includes/JobQueue.php
+++ b/
includes/JobQueue.php
@@
-164,7
+164,8
@@
class Job {
global $wgParser;
$fname = 'Job::refreshLinks';
wfProfileIn( $fname );
global $wgParser;
$fname = 'Job::refreshLinks';
wfProfileIn( $fname );
-
+
+ # FIXME: $dbw never used.
$dbw =& wfGetDB( DB_MASTER );
$linkCache =& LinkCache::singleton();
$dbw =& wfGetDB( DB_MASTER );
$linkCache =& LinkCache::singleton();
diff --git
a/includes/LogPage.php
b/includes/LogPage.php
index
66df19f
..
5741e0c
100644
(file)
--- a/
includes/LogPage.php
+++ b/
includes/LogPage.php
@@
-50,7
+50,7
@@
class LogPage {
}
function saveContent() {
}
function saveContent() {
- if( wfReadOnly() ) return;
+ if( wfReadOnly() ) return
false
;
global $wgUser;
$fname = 'LogPage::saveContent';
global $wgUser;
$fname = 'LogPage::saveContent';
diff --git
a/includes/ParserXML.php
b/includes/ParserXML.php
index
00eedd2
..
e7b64f6
100644
(file)
--- a/
includes/ParserXML.php
+++ b/
includes/ParserXML.php
@@
-32,6
+32,7
@@
class element {
/**
* This finds the ATTRS element and returns the ATTR sub-children as a single string
/**
* This finds the ATTRS element and returns the ATTR sub-children as a single string
+ * @todo FIXME $parser always empty when calling makeXHTML()
*/
function getSourceAttrs() {
$ret = '';
*/
function getSourceAttrs() {
$ret = '';
@@
-110,7
+111,7
@@
class element {
# foreach ( array_keys ( $this->children ) AS $x )
# $this->fixLinkTails ( $parser , $x ) ;
# foreach ( array_keys ( $this->children ) AS $x )
# $this->fixLinkTails ( $parser , $x ) ;
- foreach ($this->children as $
key => $
child) {
+ foreach ($this->children as $child) {
if (is_string($child)) {
$ret .= $child;
} elseif ($child->name != 'ATTRS') {
if (is_string($child)) {
$ret .= $child;
} elseif ($child->name != 'ATTRS') {
@@
-522,7
+523,7
@@
class xml2php {
*/
class ParserXML extends Parser {
/**#@+
*/
class ParserXML extends Parser {
/**#@+
- * @
access
private
+ * @private
*/
# Persistent:
var $mTagHooks, $mListType;
*/
# Persistent:
var $mTagHooks, $mListType;
@@
-544,7
+545,7
@@
class ParserXML extends Parser {
/**
* Constructor
*
/**
* Constructor
*
- * @
access
public
+ * @public
*/
function ParserXML() {
$this->mTemplates = array ();
*/
function ParserXML() {
$this->mTemplates = array ();
@@
-556,7
+557,7
@@
class ParserXML extends Parser {
/**
* Clear Parser state
*
/**
* Clear Parser state
*
- * @
access
private
+ * @private
*/
function clearState() {
$this->mOutput = new ParserOutput;
*/
function clearState() {
$this->mOutput = new ParserOutput;
diff --git
a/includes/Sanitizer.php
b/includes/Sanitizer.php
index
45277d5
..
6b63e62
100644
(file)
--- a/
includes/Sanitizer.php
+++ b/
includes/Sanitizer.php
@@
-338,7
+338,7
@@
class Sanitizer {
'h2', 'h3', 'h4', 'h5', 'h6', 'cite', 'code', 'em', 's',
'strike', 'strong', 'tt', 'var', 'div', 'center',
'blockquote', 'ol', 'ul', 'dl', 'table', 'caption', 'pre',
'h2', 'h3', 'h4', 'h5', 'h6', 'cite', 'code', 'em', 's',
'strike', 'strong', 'tt', 'var', 'div', 'center',
'blockquote', 'ol', 'ul', 'dl', 'table', 'caption', 'pre',
- 'ruby', 'rt' , 'rb' , 'rp', 'p', 'span'
+ 'ruby', 'rt' , 'rb' , 'rp', 'p', 'span'
, 'u'
);
$htmlsingle = array(
'br', 'hr', 'li', 'dt', 'dd'
);
$htmlsingle = array(
'br', 'hr', 'li', 'dt', 'dd'
@@
-365,7
+365,6
@@
class Sanitizer {
# Remove HTML comments
$text = Sanitizer::removeHTMLcomments( $text );
# Remove HTML comments
$text = Sanitizer::removeHTMLcomments( $text );
-
$bits = explode( '<', $text );
$text = array_shift( $bits );
if(!$wgUseTidy) {
$bits = explode( '<', $text );
$text = array_shift( $bits );
if(!$wgUseTidy) {
diff --git
a/includes/normal/UtfNormal.php
b/includes/normal/UtfNormal.php
index
c79609a
..
d864199
100644
(file)
--- a/
includes/normal/UtfNormal.php
+++ b/
includes/normal/UtfNormal.php
@@
-215,9
+215,10
@@
class UtfNormal {
/**
* Load the basic composition data if necessary
/**
* Load the basic composition data if necessary
- * @
access
private
+ * @private
*/
function loadData() {
*/
function loadData() {
+ # fixme : are $utfCanonicalComp, $utfCanonicalDecomp really used?
global $utfCombiningClass, $utfCanonicalComp, $utfCanonicalDecomp;
if( !isset( $utfCombiningClass ) ) {
require_once( 'UtfNormalData.inc' );
global $utfCombiningClass, $utfCanonicalComp, $utfCanonicalDecomp;
if( !isset( $utfCombiningClass ) ) {
require_once( 'UtfNormalData.inc' );
@@
-486,7
+487,7
@@
class UtfNormal {
/**
* @param string $string
* @return string
/**
* @param string $string
* @return string
- * @
access
private
+ * @private
*/
function NFC( $string ) {
return UtfNormal::fastCompose( UtfNormal::NFD( $string ) );
*/
function NFC( $string ) {
return UtfNormal::fastCompose( UtfNormal::NFD( $string ) );
@@
-495,7
+496,7
@@
class UtfNormal {
/**
* @param string $string
* @return string
/**
* @param string $string
* @return string
- * @
access
private
+ * @private
*/
function NFD( $string ) {
UtfNormal::loadData();
*/
function NFD( $string ) {
UtfNormal::loadData();
@@
-507,7
+508,7
@@
class UtfNormal {
/**
* @param string $string
* @return string
/**
* @param string $string
* @return string
- * @
access
private
+ * @private
*/
function NFKC( $string ) {
return UtfNormal::fastCompose( UtfNormal::NFKD( $string ) );
*/
function NFKC( $string ) {
return UtfNormal::fastCompose( UtfNormal::NFKD( $string ) );
@@
-516,7
+517,7
@@
class UtfNormal {
/**
* @param string $string
* @return string
/**
* @param string $string
* @return string
- * @
access
private
+ * @private
*/
function NFKD( $string ) {
global $utfCompatibilityDecomp;
*/
function NFKD( $string ) {
global $utfCompatibilityDecomp;
@@
-532,7
+533,7
@@
class UtfNormal {
* Perform decomposition of a UTF-8 string into either D or KD form
* (depending on which decomposition map is passed to us).
* Input is assumed to be *valid* UTF-8. Invalid code will break.
* Perform decomposition of a UTF-8 string into either D or KD form
* (depending on which decomposition map is passed to us).
* Input is assumed to be *valid* UTF-8. Invalid code will break.
- * @
access
private
+ * @private
* @param string $string Valid UTF-8 string
* @param array $map hash of expanded decomposition map
* @return string a UTF-8 string decomposed, not yet normalized (needs sorting)
* @param string $string Valid UTF-8 string
* @param array $map hash of expanded decomposition map
* @return string a UTF-8 string decomposed, not yet normalized (needs sorting)
@@
-593,7
+594,7
@@
class UtfNormal {
/**
* Sorts combining characters into canonical order. This is the
* final step in creating decomposed normal forms D and KD.
/**
* Sorts combining characters into canonical order. This is the
* final step in creating decomposed normal forms D and KD.
- * @
access
private
+ * @private
* @param string $string a valid, decomposed UTF-8 string. Input is not validated.
* @return string a UTF-8 string with combining characters sorted in canonical order
*/
* @param string $string a valid, decomposed UTF-8 string. Input is not validated.
* @return string a UTF-8 string with combining characters sorted in canonical order
*/
@@
-642,7
+643,7
@@
class UtfNormal {
/**
* Produces canonically composed sequences, i.e. normal form C or KC.
*
/**
* Produces canonically composed sequences, i.e. normal form C or KC.
*
- * @
access
private
+ * @private
* @param string $string a valid UTF-8 string in sorted normal form D or KD. Input is not validated.
* @return string a UTF-8 string with canonical precomposed characters used where possible
*/
* @param string $string a valid UTF-8 string in sorted normal form D or KD. Input is not validated.
* @return string a UTF-8 string with canonical precomposed characters used where possible
*/
diff --git
a/maintenance/refreshLinks.inc
b/maintenance/refreshLinks.inc
index
4780d8e
..
34ea629
100644
(file)
--- a/
maintenance/refreshLinks.inc
+++ b/
maintenance/refreshLinks.inc
@@
-14,7
+14,6
@@
function refreshLinks( $start, $newOnly = false, $maxLag = false, $end = 0 ) {
$fname = 'refreshLinks';
$dbr =& wfGetDB( DB_SLAVE );
$fname = 'refreshLinks';
$dbr =& wfGetDB( DB_SLAVE );
- $dbw =& wfGetDB( DB_MASTER );
$start = intval( $start );
# Don't generate TeX PNGs (lack of a sensible current directory causes errors anyway)
$start = intval( $start );
# Don't generate TeX PNGs (lack of a sensible current directory causes errors anyway)
@@
-63,8
+62,6
@@
function refreshLinks( $start, $newOnly = false, $maxLag = false, $end = 0 ) {
}
fixLinksFromArticle( $id );
}
}
fixLinksFromArticle( $id );
}
-
-
}
}
}
}
diff --git
a/skins/CologneBlue.php
b/skins/CologneBlue.php
index
969526d
..
9cb3ef3
100644
(file)
--- a/
skins/CologneBlue.php
+++ b/
skins/CologneBlue.php
@@
-25,7
+25,6
@@
class SkinCologneBlue extends Skin {
}
function doBeforeContent() {
}
function doBeforeContent() {
- global $wgOut, $wgTitle;
$s = "";
$qb = $this->qbSetting();
$s = "";
$qb = $this->qbSetting();
@@
-99,7
+98,7
@@
class SkinCologneBlue extends Skin {
}
function doGetUserStyles() {
}
function doGetUserStyles() {
- global $wgOut
, $wgStyleSheetPath
;
+ global $wgOut;
$s = parent::doGetUserStyles();
$qb = $this->qbSetting();
$s = parent::doGetUserStyles();
$qb = $this->qbSetting();
@@
-165,8
+164,6
@@
class SkinCologneBlue extends Skin {
}
}
}
}
-
-
return $s;
}
return $s;
}
diff --git
a/skins/Standard.php
b/skins/Standard.php
index
d269db5
..
0d209bd
100644
(file)
--- a/
skins/Standard.php
+++ b/
skins/Standard.php
@@
-90,7
+90,7
@@
class SkinStandard extends Skin {
}
function doAfterContent() {
}
function doAfterContent() {
- global $wg
User, $wgOut, $wg
ContLang;
+ global $wgContLang;
$fname = 'SkinStandard::doAfterContent';
wfProfileIn( $fname );
wfProfileIn( $fname.'-1' );
$fname = 'SkinStandard::doAfterContent';
wfProfileIn( $fname );
wfProfileIn( $fname.'-1' );