From 896da3edfc2b34106a0a00774725797529273200 Mon Sep 17 00:00:00 2001 From: Nick Jenkins Date: Wed, 10 Oct 2007 00:15:51 +0000 Subject: [PATCH] eol style + full stop tweak --- includes/api/ApiExpandTemplates.php | 186 +++++++++++++-------------- includes/api/ApiRender.php | 188 ++++++++++++++-------------- includes/filerepo/File.php | 2 +- 3 files changed, 188 insertions(+), 188 deletions(-) diff --git a/includes/api/ApiExpandTemplates.php b/includes/api/ApiExpandTemplates.php index 5cfb8024de..1d5d75074f 100644 --- a/includes/api/ApiExpandTemplates.php +++ b/includes/api/ApiExpandTemplates.php @@ -1,93 +1,93 @@ -@gmail.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * http://www.gnu.org/copyleft/gpl.html - */ - -if (!defined('MEDIAWIKI')) { - // Eclipse helper - will be ignored in production - require_once ("ApiBase.php"); -} - -/** - * @addtogroup API - */ -class ApiExpandTemplates extends ApiBase { - - public function __construct($main, $action) { - parent :: __construct($main, $action); - } - - public function execute() { - // Get parameters - $params = $this->extractRequestParams(); - $text = $params['text']; - $title = $params['title']; - $retval = ''; - - //Create title for parser - $title_obj = Title :: newFromText($params['title']); - if(!$title_obj) - $title_obj = Title :: newFromText("API"); // Default title is "API". For example, ExpandTemplates uses "ExpendTemplates" for it - - // Parse text - global $wgParser; - $retval = $wgParser->preprocess( $text, $title_obj, new ParserOptions() ); - - // Return result - $result = $this->getResult(); - $retval_array = array(); - $result->setContent( $retval_array, $retval ); - $result->addValue( null, 'expandtemplates', $retval_array ); - } - - protected function getAllowedParams() { - return array ( - 'title' => array( - ApiBase :: PARAM_DFLT => 'API', - ), - 'text' => null - ); - } - - protected function getParamDescription() { - return array ( - 'text' => 'Wikitext to convert', - 'title' => 'Title of page', - ); - } - - protected function getDescription() { - return 'This module expand all templates in wikitext'; - } - - protected function getExamples() { - return array ( - 'api.php?action=expandtemplates&text={{Project:Sandbox}}' - ); - } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } -} - +@gmail.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * http://www.gnu.org/copyleft/gpl.html + */ + +if (!defined('MEDIAWIKI')) { + // Eclipse helper - will be ignored in production + require_once ("ApiBase.php"); +} + +/** + * @addtogroup API + */ +class ApiExpandTemplates extends ApiBase { + + public function __construct($main, $action) { + parent :: __construct($main, $action); + } + + public function execute() { + // Get parameters + $params = $this->extractRequestParams(); + $text = $params['text']; + $title = $params['title']; + $retval = ''; + + //Create title for parser + $title_obj = Title :: newFromText($params['title']); + if(!$title_obj) + $title_obj = Title :: newFromText("API"); // Default title is "API". For example, ExpandTemplates uses "ExpendTemplates" for it + + // Parse text + global $wgParser; + $retval = $wgParser->preprocess( $text, $title_obj, new ParserOptions() ); + + // Return result + $result = $this->getResult(); + $retval_array = array(); + $result->setContent( $retval_array, $retval ); + $result->addValue( null, 'expandtemplates', $retval_array ); + } + + protected function getAllowedParams() { + return array ( + 'title' => array( + ApiBase :: PARAM_DFLT => 'API', + ), + 'text' => null + ); + } + + protected function getParamDescription() { + return array ( + 'text' => 'Wikitext to convert', + 'title' => 'Title of page', + ); + } + + protected function getDescription() { + return 'This module expand all templates in wikitext'; + } + + protected function getExamples() { + return array ( + 'api.php?action=expandtemplates&text={{Project:Sandbox}}' + ); + } + + public function getVersion() { + return __CLASS__ . ': $Id$'; + } +} + diff --git a/includes/api/ApiRender.php b/includes/api/ApiRender.php index ecb9967e85..933beb2951 100644 --- a/includes/api/ApiRender.php +++ b/includes/api/ApiRender.php @@ -1,94 +1,94 @@ -@gmail.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * http://www.gnu.org/copyleft/gpl.html - */ - -if (!defined('MEDIAWIKI')) { - // Eclipse helper - will be ignored in production - require_once ("ApiBase.php"); -} - -/** - * @addtogroup API - */ -class ApiRender extends ApiBase { - - public function __construct($main, $action) { - parent :: __construct($main, $action); - } - - public function execute() { - // Get parameters - $params = $this->extractRequestParams(); - $text = $params['text']; - $title = $params['title']; - $retval = ''; - - //Create title for parser - $title_obj = Title :: newFromText($params['title']); - if(!$title_obj) - $title_obj = Title :: newFromText("API"); // Default title is "API". For example, ExpandTemplates uses "ExpendTemplates" for it - - // Parse text - global $wgParser; - $p_result = $wgParser->parse( $text, $title_obj, new ParserOptions() ); - $retval = $p_result->getText(); - - // Return result - $result = $this->getResult(); - $retval_array = array(); - $result->setContent( $retval_array, $retval ); - $result->addValue( null, 'render', $retval_array ); - } - - protected function getAllowedParams() { - return array ( - 'title' => array( - ApiBase :: PARAM_DFLT => 'API', - ), - 'text' => null - ); - } - - protected function getParamDescription() { - return array ( - 'text' => 'Wikitext to render', - 'title' => 'Title of page', - ); - } - - protected function getDescription() { - return 'This module allows to get rendered wikitext'; - } - - protected function getExamples() { - return array ( - 'api.php?action=render&text={{Project:Sandbox}}' - ); - } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } -} - +@gmail.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * http://www.gnu.org/copyleft/gpl.html + */ + +if (!defined('MEDIAWIKI')) { + // Eclipse helper - will be ignored in production + require_once ("ApiBase.php"); +} + +/** + * @addtogroup API + */ +class ApiRender extends ApiBase { + + public function __construct($main, $action) { + parent :: __construct($main, $action); + } + + public function execute() { + // Get parameters + $params = $this->extractRequestParams(); + $text = $params['text']; + $title = $params['title']; + $retval = ''; + + //Create title for parser + $title_obj = Title :: newFromText($params['title']); + if(!$title_obj) + $title_obj = Title :: newFromText("API"); // Default title is "API". For example, ExpandTemplates uses "ExpendTemplates" for it + + // Parse text + global $wgParser; + $p_result = $wgParser->parse( $text, $title_obj, new ParserOptions() ); + $retval = $p_result->getText(); + + // Return result + $result = $this->getResult(); + $retval_array = array(); + $result->setContent( $retval_array, $retval ); + $result->addValue( null, 'render', $retval_array ); + } + + protected function getAllowedParams() { + return array ( + 'title' => array( + ApiBase :: PARAM_DFLT => 'API', + ), + 'text' => null + ); + } + + protected function getParamDescription() { + return array ( + 'text' => 'Wikitext to render', + 'title' => 'Title of page', + ); + } + + protected function getDescription() { + return 'This module allows to get rendered wikitext'; + } + + protected function getExamples() { + return array ( + 'api.php?action=render&text={{Project:Sandbox}}' + ); + } + + public function getVersion() { + return __CLASS__ . ': $Id$'; + } +} + diff --git a/includes/filerepo/File.php b/includes/filerepo/File.php index fbf4d25135..7e222a0846 100644 --- a/includes/filerepo/File.php +++ b/includes/filerepo/File.php @@ -1029,7 +1029,7 @@ abstract class File { } /** - * Get an associative array containing information about a file in the local filesystem\ + * Get an associative array containing information about a file in the local filesystem. * * @param string $path Absolute local filesystem path * @param mixed $ext The file extension, or true to extract it from the filename. -- 2.20.1