Browse Source

Minor - flint fixes

Julio Montoya 5 years ago
parent
commit
0994222e07
2 changed files with 6 additions and 8 deletions
  1. 5 7
      main/admin/settings.lib.php
  2. 1 1
      main/auth/inscription.php

+ 5 - 7
main/admin/settings.lib.php

@@ -1130,11 +1130,10 @@ function addEditTemplate()
     );
 
     // Setting the form elements: the form to upload an image to be used with the template.
-    if(empty($template->getImage())){
+    if (empty($template->getImage())) {
         $form->addElement('file', 'template_image', get_lang('Image'), '');
     }
 
-
     // Setting the form elements: a little bit information about the template image.
     $form->addElement('static', 'file_comment', '', get_lang('TemplateImageComment100x70'));
 
@@ -1161,7 +1160,7 @@ function addEditTemplate()
                     .'" alt="'.get_lang('TemplatePreview')
                     .'"/>'
             );
-            $form->addCheckBox('delete_image',null, get_lang('DeletePicture'));
+            $form->addCheckBox('delete_image', null, get_lang('DeletePicture'));
         } else {
             $form->addElement(
                 'static',
@@ -1178,7 +1177,7 @@ function addEditTemplate()
     $form->addButtonSave(get_lang('Ok'), 'submit');
 
     // Setting the rules: the required fields.
-    if(empty($template->getImage())) {
+    if (empty($template->getImage())) {
         $form->addRule(
             'template_image',
             get_lang('ThisFieldIsRequired'),
@@ -1196,7 +1195,7 @@ function addEditTemplate()
             // Exporting the values.
             $values = $form->exportValues();
             $isDelete = null;
-            if(isset($values['delete_image'])){
+            if (isset($values['delete_image'])) {
                 $isDelete = $values['delete_image'];
             }
 
@@ -1228,7 +1227,6 @@ function addEditTemplate()
                 }
             }
 
-
             // Store the information in the database (as insert or as update).
             //$bootstrap = api_get_css(api_get_path(WEB_PUBLIC_PATH).'assets/bootstrap/dist/css/bootstrap.min.css');
             $viewport = '<meta name="viewport" content="width=device-width, initial-scale=1.0">';
@@ -1260,7 +1258,7 @@ function addEditTemplate()
                     ->setContent(Security::remove_XSS($templateContent, COURSEMANAGERLOWSECURITY));
 
                 if ($isDelete) {
-                    $filePath = api_get_path(SYS_APP_PATH) . 'home/default_platform_document/template_thumb/' . $template->getImage();
+                    $filePath = api_get_path(SYS_APP_PATH).'home/default_platform_document/template_thumb/'.$template->getImage();
                     if (file_exists($filePath)) {
                         unlink($filePath);
                     }

+ 1 - 1
main/auth/inscription.php

@@ -854,7 +854,7 @@ if ($form->validate()) {
 
                 $emailbody .= get_lang('ManageUser').": $url_edit";
 
-                if (api_get_configuration_value('send_inscription_notification_to_general_admin_only'))  {
+                if (api_get_configuration_value('send_inscription_notification_to_general_admin_only')) {
                     $email = api_get_setting('emailAdministrator');
                     $firtname = api_get_setting('administratorSurname');
                     $lastname = api_get_setting('administratorName');