https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113118
Revision: 113118
Author: kaldari
Date: 2012-03-06 01:24:10 +0000 (Tue, 06 Mar 2012)
Log Message:
-----------
adding file and function comments, setting license to MIT
Modified Paths:
--------------
trunk/extensions/PageTriage/PageTriage.php
trunk/extensions/PageTriage/SpecialPageTriageList.php
Modified: trunk/extensions/PageTriage/PageTriage.php
===================================================================
--- trunk/extensions/PageTriage/PageTriage.php 2012-03-06 01:16:56 UTC (rev
113117)
+++ trunk/extensions/PageTriage/PageTriage.php 2012-03-06 01:24:10 UTC (rev
113118)
@@ -1,5 +1,29 @@
<?php
+/**
+ * MediaWiki PageTriage extension
+ * http://www.mediawiki.org/wiki/Extension:PageTriage
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * This program is distributed WITHOUT ANY WARRANTY.
+ */
+/**
+ * This file loads everything needed for the PageTriage extension to function.
+ *
+ * @file
+ * @ingroup Extensions
+ * @author Ryan Kaldari
+ */
+
# Alert the user that this is not a valid entry point to MediaWiki if they try
to access the special pages file directly.
if ( !defined( 'MEDIAWIKI' ) ) {
echo <<<EOT
Modified: trunk/extensions/PageTriage/SpecialPageTriageList.php
===================================================================
--- trunk/extensions/PageTriage/SpecialPageTriageList.php 2012-03-06
01:16:56 UTC (rev 113117)
+++ trunk/extensions/PageTriage/SpecialPageTriageList.php 2012-03-06
01:24:10 UTC (rev 113118)
@@ -1,19 +1,33 @@
<?php
-
+/**
+ * This file defines the SpecialPageTriageList class which handles the
functionality for the
+ * PageTriage list view (Special:PageTriageList).
+ *
+ * @file
+ * @ingroup Extensions
+ * @author Ryan Kaldari
+ */
class SpecialPageTriageList extends SpecialPage {
-
+
+ /**
+ * Initialize the special page.
+ */
public function __construct() {
- // Register special page
parent::__construct( 'PageTriageList' );
}
+ /**
+ * Define what happens when the special page is loaded by the user.
+ * @param $sub string The subpage, if any
+ */
public function execute( $sub ) {
global $wgOut;
-
- // Begin output
- $this->setHeaders();
+ // Output the title of the page
+ $wgOut->setPageTitle( wfMessage( 'pagetriagelist' ) );
+ // Output the list (or something)
+ $wgOut->addHtml( 'Hello World!' );
}
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs