r94869 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94868‎ | r94869 | r94870 >
Date:06:04, 18 August 2011
Author:nad
Status:deferred
Tags:
Comment:
if sortable set but not to "yes" use it as an id attribute for sortable persistence
Modified paths:
  • /trunk/extensions/RecordAdmin/RecordAdmin.php (modified) (history)
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -307,8 +307,9 @@
308308 if( $groupby ) $groupby = self::split( $groupby, ',' );
309309
310310 $type = $this->type;
311 - $sortable = $sortable ? ' sortable' : '';
312 - $br = $sortable ? '<br />' : '';
 311+ $id = ($sortable && $sortable != 'yes') ? " id=\"$sortable\"" : "";
 312+ $sortable = $sortable ? " sortable" : "";
 313+ $br = $sortable ? "<br />" : "";
313314 $format = $wgRequest->getText( 'export' );
314315
315316 # If exporting as pdf, ensure the parser renders full URL's
@@ -321,7 +322,7 @@
322323 }
323324
324325 # Table header (col0-3 class atts are for backward compatibility, only use named from now on)
325 - $table = "<table class='recordadmin$sortable $type-record'>\n<tr>";
 326+ $table = "<table$id class='recordadmin$sortable $type-record'>\n<tr>";
326327 $th = array(
327328 'select' => "<th class='col-select'>" . wfMsg( 'recordadmin-select' ) . "$br</th>",
328329 'title' => "<th class='col0 col-title'>" . wfMsg( 'recordadmin-title', $type ) . "$br</th>",
Index: trunk/extensions/RecordAdmin/RecordAdmin.php
@@ -10,7 +10,7 @@
1111 * @author Siebrand Mazeland
1212 * @licence GNU General Public Licence 2.0 or later
1313 */
14 -define( 'RECORDADMIN_VERSION', '1.3.3, 2011-08-18' );
 14+define( 'RECORDADMIN_VERSION', '1.3.4, 2011-08-18' );
1515
1616 $wgRecordAdminExtPath = preg_replace( "|^.*(/extensions/.*$)|", "$wgScriptPath$1", dirname( __FILE__ ) );
1717

Status & tagging log