Browse Source

Format code

jmontoyaa 8 years ago
parent
commit
1278002b91

+ 6 - 6
main/course_description/edit.php

@@ -73,12 +73,12 @@ $form = new FormValidator(
 	'index.php?action=edit&id='.$original_id.'&description_type='.$description_type.'&'.api_get_cidreq()
 	'index.php?action=edit&id='.$original_id.'&description_type='.$description_type.'&'.api_get_cidreq()
 );
 );
 
 
-$form->addElement('header','',$header);
+$form->addElement('header', $header);
 $form->addElement('hidden', 'id', $original_id);
 $form->addElement('hidden', 'id', $original_id);
-$form->addElement('hidden', 'description_type',$description_type);
+$form->addElement('hidden', 'description_type', $description_type);
-$form->addElement('hidden', 'sec_token',$token);
+$form->addElement('hidden', 'sec_token', $token);
-$form->addText('title', get_lang('Title'), true, array('size'=>'50'));
+$form->addText('title', get_lang('Title'), true, array('size' => '50'));
-$form->applyFilter('title','html_filter');
+$form->applyFilter('title', 'html_filter');
 $form->addHtmlEditor(
 $form->addHtmlEditor(
 	'contentDescription',
 	'contentDescription',
 	get_lang('Content'),
 	get_lang('Content'),
@@ -97,7 +97,7 @@ if (!empty($description_title)) {
     $default['title'] = Security::remove_XSS($description_title);
     $default['title'] = Security::remove_XSS($description_title);
 }
 }
 if (!empty($description_content)) {
 if (!empty($description_content)) {
-    $default['contentDescription'] = Security::remove_XSS($description_content,COURSEMANAGERLOWSECURITY);
+    $default['contentDescription'] = Security::remove_XSS($description_content, COURSEMANAGERLOWSECURITY);
 }
 }
 $default['description_type'] = $description_type;
 $default['description_type'] = $description_type;
 
 

+ 3 - 2
main/inc/lib/formvalidator/FormValidator.class.php

@@ -840,6 +840,7 @@ EOT;
 
 
         /** @var HtmlEditor $element */
         /** @var HtmlEditor $element */
         $element = $this->getElement($name);
         $element = $this->getElement($name);
+
         if ($style) {
         if ($style) {
             $config['style'] = true;
             $config['style'] = true;
         }
         }
@@ -953,8 +954,8 @@ EOT;
     /**
     /**
      * This function has been created for avoiding changes directly within QuickForm class.
      * This function has been created for avoiding changes directly within QuickForm class.
      * When we use it, the element is threated as 'required' to be dealt during validation.
      * When we use it, the element is threated as 'required' to be dealt during validation.
-     * @param array $element					The array of elements
+     * @param array $element The array of elements
-     * @param string $message					The message displayed
+     * @param string $message The message displayed
      */
      */
     public function add_multiple_required_rule($elements, $message)
     public function add_multiple_required_rule($elements, $message)
     {
     {

+ 1 - 1
src/Chamilo/CoreBundle/Component/Editor/CkEditor/CkEditor.php

@@ -64,7 +64,7 @@ class CkEditor extends Editor
             }
             }
             $style = '<link href="'.$cssFile.'" rel="stylesheet" media="screen" type="text/css" />';
             $style = '<link href="'.$cssFile.'" rel="stylesheet" media="screen" type="text/css" />';
         }
         }
-        
+
         $html = '<textarea id="'.$this->getName().'" name="'.$this->getName().'" class="ckeditor">
         $html = '<textarea id="'.$this->getName().'" name="'.$this->getName().'" class="ckeditor">
                  '.$style.$this->value.'
                  '.$style.$this->value.'
                  </textarea>';
                  </textarea>';

+ 7 - 6
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Documents.php

@@ -10,7 +10,7 @@ namespace Chamilo\CoreBundle\Component\Editor\CkEditor\Toolbar;
  */
  */
 class Documents extends Basic
 class Documents extends Basic
 {
 {
-    public $plugins = array();
+    public $plugins = [];
 
 
     /**
     /**
      * Get the toolbar config
      * Get the toolbar config
@@ -19,7 +19,8 @@ class Documents extends Basic
     public function getConfig()
     public function getConfig()
     {
     {
         $config = array();
         $config = array();
-        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+
+        if (api_get_setting('more_buttons_maximized_mode') !== 'true') {
             $config['toolbar'] = $this->getNormalToolbar();
             $config['toolbar'] = $this->getNormalToolbar();
         } else {
         } else {
             $config['toolbar_minToolbar'] = $this->getMinimizedToolbar();
             $config['toolbar_minToolbar'] = $this->getMinimizedToolbar();
@@ -38,7 +39,7 @@ class Documents extends Basic
     {
     {
         $plugins = array();
         $plugins = array();
 
 
-        if (api_get_setting('show_glossary_in_documents') == 'ismanual') {
+        if (api_get_setting('show_glossary_in_documents') === 'ismanual') {
             $plugins[] = 'glossary';
             $plugins[] = 'glossary';
         }
         }
 
 
@@ -75,14 +76,14 @@ class Documents extends Basic
                 'NumberedList',
                 'NumberedList',
                 'BulletedList',
                 'BulletedList',
                 '-',
                 '-',
-                api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : '',
+                api_get_setting('allow_spellcheck') === 'true' ? 'Scayt' : '',
                 'Source'
                 'Source'
             ],
             ],
             '/',
             '/',
             ['Styles', 'Format', 'Font', 'FontSize'],
             ['Styles', 'Format', 'Font', 'FontSize'],
             ['Bold', 'Italic', 'Underline'],
             ['Bold', 'Italic', 'Underline'],
             ['JustifyLeft', 'JustifyCenter', 'JustifyRight'],
             ['JustifyLeft', 'JustifyCenter', 'JustifyRight'],
-            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : ['']
+            api_get_setting('enabled_wiris') === 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : ['']
         ];
         ];
     }
     }
 
 
@@ -119,7 +120,7 @@ class Documents extends Basic
                 'BGColor',
                 'BGColor',
                 'Source',
                 'Source',
             ],
             ],
-            api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
+            api_get_setting('enabled_wiris') === 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
             ['Toolbarswitch']
             ['Toolbarswitch']
         ];
         ];
     }
     }