From cecb985bee3bdd252e1b8dc0bd500b37cd52be01 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 16 May 2007 20:58:53 +0000 Subject: Aktualisierung auf MediaWiki 1.10.0 Plugins angepasst und verbessert kleine Korrekturen am Design --- includes/api/ApiBase.php | 9 ++++-- includes/api/ApiFeedWatchlist.php | 6 ++-- includes/api/ApiFormatBase.php | 9 ++++-- includes/api/ApiFormatJson.php | 8 +++-- includes/api/ApiFormatJson_json.php | 51 ++++++++++++++++-------------- includes/api/ApiFormatPhp.php | 8 +++-- includes/api/ApiFormatWddx.php | 8 +++-- includes/api/ApiFormatXml.php | 8 +++-- includes/api/ApiFormatYaml.php | 8 +++-- includes/api/ApiFormatYaml_spyc.php | 13 ++++---- includes/api/ApiHelp.php | 8 +++-- includes/api/ApiLogin.php | 6 ++-- includes/api/ApiMain.php | 9 +++--- includes/api/ApiOpenSearch.php | 8 +++-- includes/api/ApiPageSet.php | 16 ++++++---- includes/api/ApiQuery.php | 10 +++--- includes/api/ApiQueryAllpages.php | 8 +++-- includes/api/ApiQueryBacklinks.php | 10 +++--- includes/api/ApiQueryBase.php | 9 ++++-- includes/api/ApiQueryInfo.php | 6 ++-- includes/api/ApiQueryLogEvents.php | 8 +++-- includes/api/ApiQueryRecentChanges.php | 10 +++--- includes/api/ApiQueryRevisions.php | 8 +++-- includes/api/ApiQuerySiteinfo.php | 8 +++-- includes/api/ApiQueryUserContributions.php | 8 +++-- includes/api/ApiQueryWatchlist.php | 6 ++-- includes/api/ApiResult.php | 8 +++-- 27 files changed, 166 insertions(+), 108 deletions(-) (limited to 'includes/api') diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 1a9c1e3d..c4218825 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -1,6 +1,5 @@ \ No newline at end of file +?> diff --git a/includes/api/ApiFeedWatchlist.php b/includes/api/ApiFeedWatchlist.php index 7d1c1519..7918ee0e 100644 --- a/includes/api/ApiFeedWatchlist.php +++ b/includes/api/ApiFeedWatchlist.php @@ -1,6 +1,5 @@ diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php index 338a6c07..192c51a7 100644 --- a/includes/api/ApiFormatBase.php +++ b/includes/api/ApiFormatBase.php @@ -1,6 +1,5 @@ diff --git a/includes/api/ApiFormatJson.php b/includes/api/ApiFormatJson.php index 45c735c8..dd1847c4 100644 --- a/includes/api/ApiFormatJson.php +++ b/includes/api/ApiFormatJson.php @@ -1,6 +1,5 @@ \ No newline at end of file +?> diff --git a/includes/api/ApiFormatJson_json.php b/includes/api/ApiFormatJson_json.php index 375de7eb..2cd87930 100644 --- a/includes/api/ApiFormatJson_json.php +++ b/includes/api/ApiFormatJson_json.php @@ -45,15 +45,14 @@ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * -* @category -* @package Services_JSON +* @addtogroup API * @author Michal Migurski * @author Matt Knapp * @author Brett Stimmerman * @copyright 2005 Michal Migurski * @version CVS: $Id: JSON.php,v 1.30 2006/03/08 16:10:20 migurski Exp $ * @license http://www.opensource.org/licenses/bsd-license.php -* @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198 +* @see http://pear.php.net/pepr/pepr-proposal-show.php?id=198 */ /** @@ -92,26 +91,28 @@ define('SERVICES_JSON_LOOSE_TYPE', 16); define('SERVICES_JSON_SUPPRESS_ERRORS', 32); /** -* Converts to and from JSON format. -* -* Brief example of use: -* -* -* // create a new instance of Services_JSON -* $json = new Services_JSON(); -* -* // convert a complexe value to JSON notation, and send it to the browser -* $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4))); -* $output = $json->encode($value); -* -* print($output); -* // prints: ["foo","bar",[1,2,"baz"],[3,[4]]] -* -* // accept incoming POST data, assumed to be in JSON notation -* $input = file_get_contents('php://input', 1000000); -* $value = $json->decode($input); -* -*/ + * Converts to and from JSON format. + * + * Brief example of use: + * + * + * // create a new instance of Services_JSON + * $json = new Services_JSON(); + * + * // convert a complexe value to JSON notation, and send it to the browser + * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4))); + * $output = $json->encode($value); + * + * print($output); + * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]] + * + * // accept incoming POST data, assumed to be in JSON notation + * $input = file_get_contents('php://input', 1000000); + * $value = $json->decode($input); + * + * + * @addtogroup API + */ class Services_JSON { /** @@ -813,6 +814,9 @@ class Services_JSON if (class_exists('PEAR_Error')) { + /** + * @addtogroup API + */ class Services_JSON_Error extends PEAR_Error { function Services_JSON_Error($message = 'unknown error', $code = null, @@ -826,6 +830,7 @@ if (class_exists('PEAR_Error')) { /** * @todo Ultimately, this class shall be descended from PEAR_Error + * @addtogroup API */ class Services_JSON_Error { diff --git a/includes/api/ApiFormatPhp.php b/includes/api/ApiFormatPhp.php index 938ba032..add63362 100644 --- a/includes/api/ApiFormatPhp.php +++ b/includes/api/ApiFormatPhp.php @@ -1,6 +1,5 @@ \ No newline at end of file +?> diff --git a/includes/api/ApiFormatWddx.php b/includes/api/ApiFormatWddx.php index e97b996c..bc720490 100644 --- a/includes/api/ApiFormatWddx.php +++ b/includes/api/ApiFormatWddx.php @@ -1,6 +1,5 @@ \ No newline at end of file +?> diff --git a/includes/api/ApiFormatXml.php b/includes/api/ApiFormatXml.php index 2326ba42..7d54b441 100644 --- a/includes/api/ApiFormatXml.php +++ b/includes/api/ApiFormatXml.php @@ -1,6 +1,5 @@ \ No newline at end of file +?> diff --git a/includes/api/ApiFormatYaml.php b/includes/api/ApiFormatYaml.php index 2371903f..0107eb2b 100644 --- a/includes/api/ApiFormatYaml.php +++ b/includes/api/ApiFormatYaml.php @@ -1,6 +1,5 @@ \ No newline at end of file +?> diff --git a/includes/api/ApiFormatYaml_spyc.php b/includes/api/ApiFormatYaml_spyc.php index 1ec8af48..a67bbb22 100644 --- a/includes/api/ApiFormatYaml_spyc.php +++ b/includes/api/ApiFormatYaml_spyc.php @@ -3,15 +3,14 @@ * Spyc -- A Simple PHP YAML Class * @version 0.2.3 -- 2006-02-04 * @author Chris Wanstrath - * @link http://spyc.sourceforge.net/ + * @see http://spyc.sourceforge.net/ * @copyright Copyright 2005-2006 Chris Wanstrath * @license http://www.opensource.org/licenses/mit-license.php MIT License - * @package Spyc */ /** * A node, used by Spyc for parsing YAML. - * @package Spyc + * @addtogroup API */ class YAMLNode { /**#@+ @@ -20,7 +19,7 @@ */ var $parent; var $id; - /**#@+*/ + /**#@-*/ /** * @access public * @var mixed @@ -59,7 +58,7 @@ * $parser = new Spyc; * $array = $parser->load($file); * - * @package Spyc + * @addtogroup API */ class Spyc { @@ -340,7 +339,7 @@ var $_isInline; var $_dumpIndent; var $_dumpWordWrap; - /**#@+*/ + /**#@-*/ /**** Private Methods ****/ @@ -858,4 +857,4 @@ return $ret; } } -?> \ No newline at end of file +?> diff --git a/includes/api/ApiHelp.php b/includes/api/ApiHelp.php index 33fb67fd..7c5144fd 100644 --- a/includes/api/ApiHelp.php +++ b/includes/api/ApiHelp.php @@ -1,6 +1,5 @@ \ No newline at end of file +?> diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php index d9697dc3..147d37a1 100644 --- a/includes/api/ApiLogin.php +++ b/includes/api/ApiLogin.php @@ -1,6 +1,5 @@ diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 606f022b..9a6b0f83 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -1,6 +1,5 @@ \ No newline at end of file +?> diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index 4728a9f8..dea87b88 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -1,6 +1,5 @@ page_id or 0 when missing @@ -308,7 +310,7 @@ class ApiPageSet extends ApiQueryBase { if($linkBatch->isEmpty()) return; - $db = & $this->getDB(); + $db = $this->getDB(); $set = $linkBatch->constructSet('page', $db); // Get pageIDs data from the `page` table @@ -331,7 +333,7 @@ class ApiPageSet extends ApiQueryBase { 'page_id' => $pageids ); - $db = & $this->getDB(); + $db = $this->getDB(); // Get pageIDs data from the `page` table $this->profileDBIn(); @@ -406,7 +408,7 @@ class ApiPageSet extends ApiQueryBase { if(empty($revids)) return; - $db = & $this->getDB(); + $db = $this->getDB(); $pageids = array(); $remaining = array_flip($revids); @@ -438,7 +440,7 @@ class ApiPageSet extends ApiQueryBase { private function resolvePendingRedirects() { if($this->mResolveRedirects) { - $db = & $this->getDB(); + $db = $this->getDB(); $pageFlds = $this->getPageTableFields(); // Repeat until all redirects have been resolved @@ -470,7 +472,7 @@ class ApiPageSet extends ApiQueryBase { private function getRedirectTargets() { $linkBatch = new LinkBatch(); - $db = & $this->getDB(); + $db = $this->getDB(); // find redirect targets for all redirect pages $this->profileDBIn(); @@ -592,7 +594,7 @@ class ApiPageSet extends ApiQueryBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiPageSet.php 17929 2006-11-25 17:11:58Z tstarling $'; + return __CLASS__ . ': $Id: ApiPageSet.php 21402 2007-04-20 08:55:14Z nickj $'; } } ?> diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index e7b7f351..6ee05085 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -1,6 +1,5 @@ mAllowedGenerators = array_merge($this->mListModuleNames, $this->mPropModuleNames); } - public function & getDB() { + public function getDB() { if (!isset ($this->mSlaveDB)) { $this->profileDBIn(); - $this->mSlaveDB = & wfGetDB(DB_SLAVE); + $this->mSlaveDB = wfGetDB(DB_SLAVE); $this->profileDBOut(); } return $this->mSlaveDB; @@ -370,7 +372,7 @@ class ApiQuery extends ApiBase { public function getVersion() { $psModule = new ApiPageSet($this); $vers = array (); - $vers[] = __CLASS__ . ': $Id: ApiQuery.php 17374 2006-11-03 06:53:47Z yurik $'; + $vers[] = __CLASS__ . ': $Id: ApiQuery.php 21402 2007-04-20 08:55:14Z nickj $'; $vers[] = $psModule->getVersion(); return $vers; } diff --git a/includes/api/ApiQueryAllpages.php b/includes/api/ApiQueryAllpages.php index 9c076e65..494f7707 100644 --- a/includes/api/ApiQueryAllpages.php +++ b/includes/api/ApiQueryAllpages.php @@ -1,6 +1,5 @@ getModuleProfileName() . '-getDB'); - $db = & $this->getDB(); + $db = $this->getDB(); wfProfileOut($this->getModuleProfileName() . '-getDB'); wfProfileIn($this->getModuleProfileName() . '-parseParams'); @@ -167,7 +169,7 @@ class ApiQueryAllpages extends ApiQueryGeneratorBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiQueryAllpages.php 17880 2006-11-23 08:25:56Z nickj $'; + return __CLASS__ . ': $Id: ApiQueryAllpages.php 21402 2007-04-20 08:55:14Z nickj $'; } } ?> diff --git a/includes/api/ApiQueryBacklinks.php b/includes/api/ApiQueryBacklinks.php index 413068f8..1a6783a9 100644 --- a/includes/api/ApiQueryBacklinks.php +++ b/includes/api/ApiQueryBacklinks.php @@ -1,6 +1,5 @@ addWhereFld('page_is_redirect', 0); - $db = & $this->getDB(); + $db = $this->getDB(); if (!is_null($continue)) { $plfrm = intval($this->contID); if ($this->contLevel == 0) { @@ -352,7 +354,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiQueryBacklinks.php 17880 2006-11-23 08:25:56Z nickj $'; + return __CLASS__ . ': $Id: ApiQueryBacklinks.php 21402 2007-04-20 08:55:14Z nickj $'; } } -?> \ No newline at end of file +?> diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index ae4edf98..da07bb6c 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -1,6 +1,5 @@ diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 243f96fa..d9f23758 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -1,6 +1,5 @@ extractRequestParams()); - $db = & $this->getDB(); + $db = $this->getDB(); list($tbl_logging, $tbl_page, $tbl_user) = $db->tableNamesN('logging', 'page', 'user'); @@ -167,7 +169,7 @@ class ApiQueryLogEvents extends ApiQueryBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiQueryLogEvents.php 17952 2006-11-27 08:36:57Z nickj $'; + return __CLASS__ . ': $Id: ApiQueryLogEvents.php 21402 2007-04-20 08:55:14Z nickj $'; } } ?> diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index 38f51b05..25f7ff3e 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -1,6 +1,5 @@ getDB(); + $db = $this->getDB(); $res = $this->select(__METHOD__); while ($row = $db->fetchObject($res)) { if (++ $count > $limit) { @@ -181,7 +183,7 @@ class ApiQueryRecentChanges extends ApiQueryBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiQueryRecentChanges.php 17880 2006-11-23 08:25:56Z nickj $'; + return __CLASS__ . ': $Id: ApiQueryRecentChanges.php 21402 2007-04-20 08:55:14Z nickj $'; } } -?> \ No newline at end of file +?> diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index e92b92c9..fc5f6241 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -1,6 +1,5 @@ select(__METHOD__); - $db = & $this->getDB(); + $db = $this->getDB(); while ($row = $db->fetchObject($res)) { if (++ $count > $limit) { @@ -262,7 +264,7 @@ class ApiQueryRevisions extends ApiQueryBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiQueryRevisions.php 19434 2007-01-18 02:04:11Z brion $'; + return __CLASS__ . ': $Id: ApiQueryRevisions.php 21402 2007-04-20 08:55:14Z nickj $'; } } ?> diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 9e8c11ff..fa185c97 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -1,6 +1,5 @@ \ No newline at end of file +?> diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php index 4f63cadb..05bfbb20 100644 --- a/includes/api/ApiQueryUserContributions.php +++ b/includes/api/ApiQueryUserContributions.php @@ -1,6 +1,5 @@ extractRequestParams()); //Get a database instance - $db = & $this->getDB(); + $db = $this->getDB(); if (is_null($user)) $this->dieUsage("User parameter may not be empty", 'param_user'); @@ -169,7 +171,7 @@ class ApiQueryContributions extends ApiQueryBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiQueryUserContributions.php 17952 2006-11-27 08:36:57Z nickj $'; + return __CLASS__ . ': $Id: ApiQueryUserContributions.php 21402 2007-04-20 08:55:14Z nickj $'; } } ?> diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index 67564d62..73c31abb 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -1,6 +1,5 @@ diff --git a/includes/api/ApiResult.php b/includes/api/ApiResult.php index c9bfcfb9..79fd34a1 100644 --- a/includes/api/ApiResult.php +++ b/includes/api/ApiResult.php @@ -1,6 +1,5 @@ \ No newline at end of file +?> -- cgit v1.2.2