Revert from 107187 to 107186 for bug24430 patch, it causes layout issue
authorBenny Situ <bsitu@users.mediawiki.org>
Wed, 25 Jan 2012 18:26:46 +0000 (18:26 +0000)
committerBenny Situ <bsitu@users.mediawiki.org>
Wed, 25 Jan 2012 18:26:46 +0000 (18:26 +0000)
includes/DefaultSettings.php
includes/EditPage.php
includes/OutputPage.php
includes/Preferences.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialUpload.php

index d8af9eb..6d588f7 100644 (file)
@@ -3192,6 +3192,7 @@ $wgReservedUsernames = array(
  */
 $wgDefaultUserOptions = array(
        'ccmeonemails'            => 0,
+       'cols'                    => 80,
        'date'                    => 'default',
        'diffonly'                => 0,
        'disablemail'             => 0,
index 50ae024..29aaee8 100644 (file)
@@ -2240,6 +2240,7 @@ HTML
                $attribs = $customAttribs + array(
                        'accesskey' => ',',
                        'id'   => $name,
+                       'cols' => $wgUser->getIntOption( 'cols' ),
                        'rows' => $wgUser->getIntOption( 'rows' ),
                        'style' => '' // avoid php notices when appending preferences (appending allows customAttribs['style'] to still work
                );
index 54f6f33..70a8c53 100644 (file)
@@ -2248,6 +2248,7 @@ class OutputPage extends ContextSource {
                        $params = array(
                                'id'   => 'wpTextbox1',
                                'name' => 'wpTextbox1',
+                               'cols' => $this->getUser()->getOption( 'cols' ),
                                'rows' => $this->getUser()->getOption( 'rows' ),
                                'readonly' => 'readonly',
                                'lang' => $pageLang->getHtmlCode(),
index a42c384..3fe6a8c 100644 (file)
@@ -29,6 +29,7 @@ class Preferences {
        static $defaultPreferences = null;
        static $saveFilters = array(
                        'timecorrection' => array( 'Preferences', 'filterTimezoneInput' ),
+                       'cols' => array( 'Preferences', 'filterIntval' ),
                        'rows' => array( 'Preferences', 'filterIntval' ),
                        'rclimit' => array( 'Preferences', 'filterIntval' ),
                        'wllimit' => array( 'Preferences', 'filterIntval' ),
@@ -688,7 +689,13 @@ class Preferences {
                global $wgUseExternalEditor, $wgAllowUserCssPrefs;
 
                ## Editing #####################################
-               
+               $defaultPreferences['cols'] = array(
+                       'type' => 'int',
+                       'label-message' => 'columns',
+                       'section' => 'editing/textboxsize',
+                       'min' => 4,
+                       'max' => 1000,
+               );
                $defaultPreferences['rows'] = array(
                        'type' => 'int',
                        'label-message' => 'rows',
index 87ce43d..9ed20f3 100644 (file)
@@ -847,6 +847,7 @@ class SpecialUndelete extends SpecialPage {
                $out->addHTML(
                        Xml::element( 'textarea', array(
                                        'readonly' => 'readonly',
+                                       'cols' => intval( $user->getOption( 'cols' ) ),
                                        'rows' => intval( $user->getOption( 'rows' ) ) ),
                                $rev->getText( Revision::FOR_THIS_USER, $user ) . "\n" ) .
                        Xml::openElement( 'div' ) .
index a3e700a..3711a6a 100644 (file)
@@ -962,6 +962,7 @@ class UploadForm extends HTMLForm {
                                        ? 'filereuploadsummary'
                                        : 'fileuploadsummary',
                                'default' => $this->mComment,
+                               'cols' => intval( $this->getUser()->getOption( 'cols' ) ),
                                'rows' => 8,
                        )
                );