Revision: 46030
Author:   nad
Date:     2009-01-22 20:21:02 +0000 (Thu, 22 Jan 2009)

Log Message:
-----------
allows specification of cols to render

Modified Paths:
--------------
    trunk/extensions/RecordAdmin/RecordAdmin_body.php

Modified: trunk/extensions/RecordAdmin/RecordAdmin_body.php
===================================================================
--- trunk/extensions/RecordAdmin/RecordAdmin_body.php   2009-01-22 20:02:36 UTC 
(rev 46029)
+++ trunk/extensions/RecordAdmin/RecordAdmin_body.php   2009-01-22 20:21:02 UTC 
(rev 46030)
@@ -448,23 +448,25 @@
         */
        function expandMagic(&$parser, $type) {
                $parser->mOutput->mCacheTime = -1;
-               $filter = array();
-               $title  = '';
-               $invert = false;
+               $filter  = array();
+               $title   = '';
+               $invert  = false;
                $orderby = false;
+               $cols    = false;
                foreach (func_get_args() as $arg) if (!is_object($arg)) {
                        if (preg_match("/^(.+?)\\s*=\\s*(.+)$/", $arg, $match)) 
{
                                list(, $k, $v) = $match;
                                if ($k == 'title') $title = $v;
-                               elseif ($k == 'invert') $invert = $v;
+                               elseif ($k == 'invert')  $invert  = $v;
                                elseif ($k == 'orderby') $orderby = $v;
+                               elseif ($k == 'cols')    $cols    = 
preg_split('/\s*,\s*/', $v);
                                else $filter[$match[1]] = $match[2];
                        }
                }
                $this->preProcessForm($type);
                $this->examineForm();
                $records = $this->getRecords($type, $filter, $title, $invert);
-               $table = $this->renderRecords($records, $orderby, $cols = 
false);
+               $table = $this->renderRecords($records, $orderby, $cols);
                return array(
                        $table,
                        'noparse' => true,



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to