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:
5cf9d6e
)
Fix comment (Title::newFromTitle -> Title::newFromName) and mark Title::nameOf()...
author
Alexandre Emsenhuber
<ialex@users.mediawiki.org>
Sun, 27 Jul 2008 18:09:22 +0000
(18:09 +0000)
committer
Alexandre Emsenhuber
<ialex@users.mediawiki.org>
Sun, 27 Jul 2008 18:09:22 +0000
(18:09 +0000)
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
71a601c
..
9c546a7
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-4,21
+4,22
@@
* @file
*/
* @file
*/
-/** */
if ( !class_exists( 'UtfNormal' ) ) {
require_once( dirname(__FILE__) . '/normal/UtfNormal.php' );
}
define ( 'GAID_FOR_UPDATE', 1 );
if ( !class_exists( 'UtfNormal' ) ) {
require_once( dirname(__FILE__) . '/normal/UtfNormal.php' );
}
define ( 'GAID_FOR_UPDATE', 1 );
-# Title::newFromTitle maintains a cache to avoid
-# expensive re-normalization of commonly used titles.
-
#
On a batch operation this can become a memory leak
-# if not bounded. After hitting this many titles,
-# reset the cache.
+/**
+ * Title::newFromText maintains a cache to avoid expensive re-normalization of
+
* commonly used titles.
On a batch operation this can become a memory leak
+ * if not bounded. After hitting this many titles reset the cache.
+ */
define( 'MW_TITLECACHE_MAX', 1000 );
define( 'MW_TITLECACHE_MAX', 1000 );
-# Constants for pr_cascade bitfield
+/**
+ * Constants for pr_cascade bitfield
+ */
define( 'CASCADE', 1 );
/**
define( 'CASCADE', 1 );
/**
@@
-325,17
+326,14
@@
class Title {
* @param int $id the page_id of the article
* @return Title an object representing the article, or NULL
* if no such article was found
* @param int $id the page_id of the article
* @return Title an object representing the article, or NULL
* if no such article was found
- * @static
- * @access public
*/
*/
- function nameOf( $id ) {
- $fname = 'Title::nameOf';
+ public static function nameOf( $id ) {
$dbr = wfGetDB( DB_SLAVE );
$dbr = wfGetDB( DB_SLAVE );
- $s = $dbr->selectRow( 'page', array( 'page_namespace','page_title' ), array( 'page_id' => $id ),
$fname
);
+ $s = $dbr->selectRow( 'page', array( 'page_namespace','page_title' ), array( 'page_id' => $id ),
__METHOD__
);
if ( $s === false ) { return NULL; }
if ( $s === false ) { return NULL; }
- $n =
Title
::makeName( $s->page_namespace, $s->page_title );
+ $n =
self
::makeName( $s->page_namespace, $s->page_title );
return $n;
}
return $n;
}