http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90577
Revision: 90577
Author: nikerabbit
Date: 2011-06-22 08:38:37 +0000 (Wed, 22 Jun 2011)
Log Message:
-----------
Moved TPException to its own file (following one class per file pattern)
Modified Paths:
--------------
trunk/extensions/Translate/_autoload.php
trunk/extensions/Translate/tag/TranslatablePage.php
Added Paths:
-----------
trunk/extensions/Translate/tag/TPException.php
Modified: trunk/extensions/Translate/_autoload.php
===================================================================
--- trunk/extensions/Translate/_autoload.php 2011-06-22 08:34:27 UTC (rev
90576)
+++ trunk/extensions/Translate/_autoload.php 2011-06-22 08:38:37 UTC (rev
90577)
@@ -144,7 +144,7 @@
*/
$wgAutoloadClasses['PageTranslationHooks'] = $dir .
'tag/PageTranslationHooks.php';
$wgAutoloadClasses['TranslatablePage'] = $dir . 'tag/TranslatablePage.php';
-$wgAutoloadClasses['TPException'] = $dir . 'tag/TranslatablePage.php';
+$wgAutoloadClasses['TPException'] = $dir . 'tag/TPException.php';
$wgAutoloadClasses['TPParse'] = $dir . 'tag/TPParse.php';
$wgAutoloadClasses['TPSection'] = $dir . 'tag/TPSection.php';
$wgAutoloadClasses['SpecialPageTranslation'] = $dir .
'tag/SpecialPageTranslation.php';
Added: trunk/extensions/Translate/tag/TPException.php
===================================================================
--- trunk/extensions/Translate/tag/TPException.php
(rev 0)
+++ trunk/extensions/Translate/tag/TPException.php 2011-06-22 08:38:37 UTC
(rev 90577)
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Translatable page parse exception.
+ *
+ * @file
+ * @author Niklas Laxström
+ * @copyright Copyright © 2009-2011 Niklas Laxström
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
2.0 or later
+ */
+
+/**
+ * Class to signal syntax errors in translatable pages.
+ * @ingroup PageTranslation
+ */
+class TPException extends MWException {
+ protected $msg = null;
+
+ /**
+ * @param $msg \string Message key.
+ */
+ public function __construct( $msg ) {
+ $this->msg = $msg;
+ parent::__construct( call_user_func_array( 'wfMsg', $msg ) );
+ }
+
+ /**
+ * @return \string A localised error message.
+ */
+ public function getMsg() {
+ return $this->msg;
+ }
+}
Property changes on: trunk/extensions/Translate/tag/TPException.php
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/extensions/Translate/tag/TranslatablePage.php
===================================================================
--- trunk/extensions/Translate/tag/TranslatablePage.php 2011-06-22 08:34:27 UTC
(rev 90576)
+++ trunk/extensions/Translate/tag/TranslatablePage.php 2011-06-22 08:38:37 UTC
(rev 90577)
@@ -4,7 +4,7 @@
*
* @file
* @author Niklas Laxström
- * @copyright Copyright © 2009-2010 Niklas Laxström
+ * @copyright Copyright © 2009-2011 Niklas Laxström
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
2.0 or later
*/
@@ -782,26 +782,3 @@
return $results;
}
}
-
-/**
- * Class to signal syntax errors in translatable pages.
- * @ingroup PageTranslation
- */
-class TPException extends MWException {
- protected $msg = null;
-
- /**
- * @param $msg \string Message key.
- */
- public function __construct( $msg ) {
- $this->msg = $msg;
- parent::__construct( call_user_func_array( 'wfMsg', $msg ) );
- }
-
- /**
- * @return \string A localised error message.
- */
- public function getMsg() {
- return $this->msg;
- }
-}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs