r108590 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108589‎ | r108590 | r108591 >
Date:01:58, 11 January 2012
Author:kaldari
Status:ok
Tags:
Comment:
some helpful comments
Modified paths:
  • /trunk/extensions/CentralNotice/TemplatePager.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/TemplatePager.php
@@ -1,5 +1,8 @@
22 <?php
33
 4+/**
 5+ * Provides pagination functionality for viewing banner lists in the CentralNotice admin interface.
 6+ */
47 class TemplatePager extends ReverseChronologicalPager {
58 var $onRemoveChange, $viewPage, $special;
69 var $editable;
@@ -18,8 +21,11 @@
1922 $this->viewPage = SpecialPage::getTitleFor( 'NoticeTemplate', 'view' );
2023 }
2124
 25+ /**
 26+ * Set the database query to retrieve all the banners in the database
 27+ * @return array of query settings
 28+ */
2229 function getQueryInfo() {
23 - // Return all the banners in the database
2430 return array(
2531 'tables' => 'cn_templates',
2632 'fields' => array( 'tmp_name', 'tmp_id' ),
@@ -27,7 +33,8 @@
2834 }
2935
3036 /**
31 - * Sort the banner list by tmp_id
 37+ * Sort the banner list by tmp_id (generally equals reverse chronological)
 38+ * @return string
3239 */
3340 function getIndexField() {
3441 $dbr = wfGetDB( DB_SLAVE );
@@ -36,6 +43,8 @@
3744
3845 /**
3946 * Generate the content of each table row (1 row = 1 banner)
 47+ * @param $row object: database row
 48+ * @return string HTML
4049 */
4150 function formatRow( $row ) {
4251
@@ -81,6 +90,7 @@
8291
8392 /**
8493 * Specify table headers
 94+ * @return string HTML
8595 */
8696 function getStartBody() {
8797 $htmlOut = '';
@@ -100,6 +110,7 @@
101111
102112 /**
103113 * Close table and add Submit button
 114+ * @return string HTML
104115 */
105116 function getEndBody() {
106117 global $wgUser;

Status & tagging log