Revision: 46166
Author:   nad
Date:     2009-01-24 20:44:11 +0000 (Sat, 24 Jan 2009)

Log Message:
-----------
replace non-word characters in css classes with dash

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

Modified: trunk/extensions/RecordAdmin/RecordAdmin_body.php
===================================================================
--- trunk/extensions/RecordAdmin/RecordAdmin_body.php   2009-01-24 20:34:45 UTC 
(rev 46165)
+++ trunk/extensions/RecordAdmin/RecordAdmin_body.php   2009-01-24 20:44:11 UTC 
(rev 46166)
@@ -261,7 +261,10 @@
                        'actions' => "<th class='col1'>" . wfMsg( 
'recordadmin-actions' ) . "$br</th>",
                        'created' => "<th class='col2'>" . wfMsg( 
'recordadmin-created' ) . "$br</th>"
                );
-               foreach ( array_keys($this->types) as $col ) $th[$col] = "<th 
class='col$col'>$col$br</th>";
+               foreach ( array_keys($this->types) as $col ) {
+                       $class = 'col'.preg_replace('|\W|', '-', $col);
+                       $th[$col] = "<th class='$class'>$col$br</th>";
+               }
                foreach ( $cols ? $cols : array_keys($th) as $col ) $table .= 
$th[$col]."\n";
                $table .= "</tr>\n";
 
@@ -281,7 +284,8 @@
                        );
                        foreach ( array_keys( $this->types ) as $col ) {
                                $v = isset( $r[$col] ) ? $r[$col] : '&nbsp;';
-                               $row[$col] = "<td class='col$col'>$v</td>";
+                               $class = 'col'.preg_replace('|\W|', '-', $col);
+                               $row[$col] = "<td class='$class'>$v</td>";
                        }
                        foreach ($cols ? $cols : array_keys($th) as $col) 
$table .= $row[$col]."\n";
                        



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

Reply via email to