From f01eec6cae92549ea49e32601642b634666158e2 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Thu, 20 Aug 2015 12:51:12 -0500 Subject: [PATCH] Minor - Fix code spacing --- .../lib/formvalidator/Element/HtmlEditor.php | 6 +- .../lib/formvalidator/FormValidator.class.php | 2 +- main/inc/lib/userportal.lib.php | 41 ++++----- main/install/install.lib.php | 84 +++++++++---------- main/newscorm/learnpath.class.php | 3 +- .../default/auth/courses_categories.php | 13 +-- 6 files changed, 75 insertions(+), 74 deletions(-) diff --git a/main/inc/lib/formvalidator/Element/HtmlEditor.php b/main/inc/lib/formvalidator/Element/HtmlEditor.php index 196e02ee0b..aee11e252c 100644 --- a/main/inc/lib/formvalidator/Element/HtmlEditor.php +++ b/main/inc/lib/formvalidator/Element/HtmlEditor.php @@ -72,7 +72,7 @@ class HtmlEditor extends HTML_QuickForm_textarea } else { $styleCss = $this->editor->getConfigAttribute('style'); - if ($styleCss){ + if ($styleCss) { $style = true; } else { $style = false; @@ -93,13 +93,13 @@ class HtmlEditor extends HTML_QuickForm_textarea /** * @return string */ - public function buildEditor($style=false) + public function buildEditor($style = false) { $result = ''; if ($this->editor) { $this->editor->value = $this->getValue(); $this->editor->setName($this->getName()); - if($style==true){ + if ($style == true) { $result = $this->editor->createHtmlStyle(); } else { $result = $this->editor->createHtml(); diff --git a/main/inc/lib/formvalidator/FormValidator.class.php b/main/inc/lib/formvalidator/FormValidator.class.php index 3c1a1e02f1..b71d85d080 100755 --- a/main/inc/lib/formvalidator/FormValidator.class.php +++ b/main/inc/lib/formvalidator/FormValidator.class.php @@ -761,7 +761,7 @@ EOT; /** @var HtmlEditor $element */ $element = $this->getElement($name); - if ($style){ + if ($style) { $config['style'] = true; } if ($fullPage) { diff --git a/main/inc/lib/userportal.lib.php b/main/inc/lib/userportal.lib.php index de5ddf880e..476ecaeccc 100755 --- a/main/inc/lib/userportal.lib.php +++ b/main/inc/lib/userportal.lib.php @@ -681,29 +681,29 @@ class IndexManager * @todo use the template system */ function show_right_block($title, $content, $id = null, $params = null, $idAccordion = null, $idCollpase = null) { - if (!empty($idAccordion)){ + if (!empty($idAccordion)) { $html = null; - $html .= '
'; - $html .= '
'; - $html .= ''; - $html .= '
'; - $html .= '
'.$content.'
'; - $html .= '
'; + $html .= '
' . PHP_EOL; + $html .= '
' . PHP_EOL; + $html .= '' . PHP_EOL; + $html .= '
' . PHP_EOL; + $html .= '
'.$content.'
' . PHP_EOL; + $html .= '
' . PHP_EOL; - }else{ + } else { if (!empty($id)) { $params['id'] = $id; } $params['class'] = 'panel panel-default'; $html = null; if (!empty($title)) { - $html.= '
'.$title.'
'; + $html .= '
'.$title.'
' . PHP_EOL; } - $html.= '
'.$content.'
'; + $html.= '
'.$content.'
' . PHP_EOL; $html = Display::div($html, $params); - } + } return $html; } @@ -851,13 +851,14 @@ class IndexManager $profile_content .= '
  • '.Display::return_icon('edit-profile.png',get_lang('EditProfile'),null,ICON_SIZE_SMALL).get_lang('EditProfile').'
  • '; $profile_content .= ''; - $html = self::show_right_block(get_lang('Profile'), - $profile_content, - 'profile_block', - null, - 'profile', - 'profileCollapse' - ); + $html = self::show_right_block( + get_lang('Profile'), + $profile_content, + 'profile_block', + null, + 'profile', + 'profileCollapse' + ); return $html; } diff --git a/main/install/install.lib.php b/main/install/install.lib.php index 7a6f9784ee..bbcffdd00e 100755 --- a/main/install/install.lib.php +++ b/main/install/install.lib.php @@ -1451,12 +1451,12 @@ function display_database_settings_form( 'panel-heading')); $panelBody = Display::div($content, array('class' => 'panel-body')); $panelParent = Display::div($panelTitle . $panelBody, array('id' => $id, 'class' => 'panel panel-'.$style)); @@ -1484,13 +1484,13 @@ function display_configuration_parameter( $displayWhenUpdate = 'true' ) { $html = '
    '; - $html.= ''; + $html .= ''; if ($installType == INSTALL_TYPE_UPDATE && $displayWhenUpdate) { - $html.= '' . $parameterValue; + $html .= '' . $parameterValue; } else { - $html.= '
    '."
    "; + $html .= '
    '."
    "; } - $html.= "
    "; + $html .= ""; return $html; } @@ -1606,72 +1606,72 @@ function display_configuration_settings_form( $html .= '
    - -
    '; - if ($installType == 'update') { - $html .= ''. $encryptPassForm; - } else { + +
    '; + if ($installType == 'update') { + $html .= ''. $encryptPassForm; + } else { - $html .= '
    + $html .= '
    '; - $html .= '
    '; - } - $html .= '
    '; + $html .= '
    '; + } + $html .= '
    '; $html .= '
    - +
    '; - if ($installType == 'update'){ - $html .= ''. $allowSelfReg ? get_lang('Yes') : get_lang('No'); - } else { - $html .= '
    '; - $html .= ''; - $html .= ''; - $html .= '
    '; - } + if ($installType == 'update') { + $html .= ''. $allowSelfReg ? get_lang('Yes') : get_lang('No'); + } else { + $html .= '
    '; + $html .= ''; + $html .= ''; $html .= '
    '; - $html .= '
    '; + } + $html .= '
    '; + $html .= ''; $html .= '
    '; $html .= '
    '; - if ($installType == 'update'){ - $html .= ''. $allowSelfRegProf? get_lang('Yes') : get_lang('No'); - } else { - $html .= '
    + if ($installType == 'update'){ + $html .= ''. $allowSelfRegProf? get_lang('Yes') : get_lang('No'); + } else { + $html .= '
    '; - $html .= '
    '; - } -$html .= '
    + $html .= '
    '; + } + $html .= '
    '; - echo panel($html, get_lang('Platform'), 'platform'); + echo panel($html, get_lang('Platform'), 'platform'); ?>
    diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 89f63f9e68..4c43d429a9 100755 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -7601,8 +7601,7 @@ class learnpath $renderer = $form->defaultRenderer(); $renderer->setElementTemplate(' {label}{element}', 'content_lp'); $form->addElement('html', '
    '); - $form->addHtmlEditor('content_lp', null, null, true, $editor_config, $style=true); - //$form->addElement('html_editor', 'content_lp', '', null, $editor_config); + $form->addHtmlEditor('content_lp', null, null, true, $editor_config, true); $form->addElement('html', '
    '); $defaults['content_lp'] = $content; } diff --git a/main/template/default/auth/courses_categories.php b/main/template/default/auth/courses_categories.php index dcf92ce136..9971d81822 100755 --- a/main/template/default/auth/courses_categories.php +++ b/main/template/default/auth/courses_categories.php @@ -109,7 +109,7 @@ $code = isset($code) ? $code : null;

    - +
    @@ -423,13 +423,14 @@ function return_thumbnail($course, $icon_title) * @param $course */ function return_title($course) -{ $html = ''; +{ + $html = ''; $linkCourse = api_get_course_url($course['code']); $title = cut($course['title'], 70); $ajax_url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=add_course_vote'; $teachers = CourseManager::get_teacher_list_from_course_code_to_string($course['code']); $rating = Display::return_rating_system('star_'.$course['real_id'], $ajax_url.'&course_id='.$course['real_id'], $course['point_info']); - $html .= '

    ' . cut($title, 60) . '

    '; + $html .= '

    ' . cut($title, 60) . '

    '; $html .= '
    '.$teachers.'
    '; $html .= '
    '. $rating . '
    '; return $html; @@ -499,4 +500,4 @@ function return_unregister_button($course, $stok, $search_term, $code) $html = ' '.get_lang('Unsubscribe').''; return $html; -} \ No newline at end of file +}