Completed
Push — 1.11.x ( 55a6a1...a914dc )
by José
60:32 queued 35:06
created
main/inc/lib/javascript/svgedit/extensions/imagelib/groups.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 $array_to_search = is_array($docs_and_folders) ? $docs_and_folders : array();
36 36
 
37 37
 if (count($array_to_search) > 0) {
38
-	while (list($key) = each($array_to_search)) {
39
-		$all_files[] = basename($array_to_search[$key]['path']);
40
-	}
38
+    while (list($key) = each($array_to_search)) {
39
+        $all_files[] = basename($array_to_search[$key]['path']);
40
+    }
41 41
 }
42 42
 
43 43
 //get all svg and png group files
@@ -72,26 +72,26 @@  discard block
 block discarded – undo
72 72
     $group_properties['doc_state'] == 1
73 73
 ){
74 74
 
75
-	if (!empty($png_svg_files)) {
76
-		echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>';
77
-		echo '<ul>';
78
-		foreach($png_svg_files as $filename) {
79
-			$image = $group_disk_path.$filename;
80
-
81
-			if (strpos($filename, "svg")){
82
-				$new_sizes['width'] = 60;
83
-				$new_sizes['height'] = 60;
84
-			} else {
85
-				$new_sizes = api_resize_image($image, 60, 60);
86
-			}
75
+    if (!empty($png_svg_files)) {
76
+        echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>';
77
+        echo '<ul>';
78
+        foreach($png_svg_files as $filename) {
79
+            $image = $group_disk_path.$filename;
80
+
81
+            if (strpos($filename, "svg")){
82
+                $new_sizes['width'] = 60;
83
+                $new_sizes['height'] = 60;
84
+            } else {
85
+                $new_sizes = api_resize_image($image, 60, 60);
86
+            }
87 87
             echo '<li style="display:inline; padding:8px;">';
88 88
             echo '<a href = "'.$group_web_path.$filename.'" alt="'.$filename.'" title="'.$filename.'">';
89 89
             echo '<img src = "'.$group_web_path.$filename.'" width = "'.$new_sizes['width'].'" height="'.$new_sizes['height'].'" border="0"></a></li>';
90
-		}
91
-		echo '</ul>';
92
-	}
90
+        }
91
+        echo '</ul>';
92
+    }
93 93
 } else {
94
-	echo Display::display_warning_message(get_lang('OnlyAccessFromYourGroup'));
94
+    echo Display::display_warning_message(get_lang('OnlyAccessFromYourGroup'));
95 95
 }
96 96
 ?>
97 97
 </body>
Please login to merge, or discard this patch.
main/inc/lib/chat.lib.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
     }
51 51
 
52 52
     /**
53
-    * Set user chat status
54
-    * @param int 0 if disconnected, 1 if connected
55
-    * @param integer $status
53
+     * Set user chat status
54
+     * @param int 0 if disconnected, 1 if connected
55
+     * @param integer $status
56 56
      *
57
-    * @return void
58
-    */
57
+     * @return void
58
+     */
59 59
     public function setUserStatus($status)
60 60
     {
61 61
         UserManager::update_extra_field_value(api_get_user_id(), 'user_chat_status', $status);
@@ -156,10 +156,10 @@  discard block
 block discarded – undo
156 156
     }
157 157
 
158 158
     /**
159
-    * Returns an array of messages inside a chat session with a specific user
160
-    * @param int The ID of the user with whom the current user is chatting
161
-    * @return array Messages list
162
-    */
159
+     * Returns an array of messages inside a chat session with a specific user
160
+     * @param int The ID of the user with whom the current user is chatting
161
+     * @return array Messages list
162
+     */
163 163
     public function box_session($user_id)
164 164
     {
165 165
         $items = array();
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
             }
307 307
         }
308 308
 
309
-         return false;
309
+            return false;
310 310
     }
311 311
 
312 312
     /**
Please login to merge, or discard this patch.
main/inc/lib/document.lib.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -5111,7 +5111,6 @@
 block discarded – undo
5111 5111
      * @param string	The current folder (path inside of the "document" directory, including the prefix "/")
5112 5112
      * @param string	Group directory, if empty, prevents documents to be uploaded (because group documents cannot be uploaded in root)
5113 5113
      * @param	boolean	Whether to change the renderer (this will add a template <span> to the QuickForm object displaying the form)
5114
-
5115 5114
      * @return string html form
5116 5115
      */
5117 5116
     public static function build_directory_selector(
Please login to merge, or discard this patch.
main/inc/lib/event_email_template.class.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
     /**
19 19
      * Constructor
20 20
      */
21
-	public function __construct()
21
+    public function __construct()
22 22
     {
23 23
         $this->table =  Database::get_main_table(TABLE_EVENT_EMAIL_TEMPLATE);
24
-	}
24
+    }
25 25
 
26 26
     /**
27 27
      * @param array $where_conditions
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
     /**
40 40
      * Displays the title + grid
41 41
      */
42
-	public function display()
42
+    public function display()
43 43
     {
44
-		// action links
45
-		$content = Display::actions(array(
44
+        // action links
45
+        $content = Display::actions(array(
46 46
                 array(
47 47
                     'url' => 'event_type.php' ,
48 48
                     'content' => Display::return_icon(
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
                         array(),
52 52
                         ICON_SIZE_MEDIUM
53 53
                     )
54
-                 )
54
+                    )
55 55
             )
56 56
         );
57 57
         $content .= Display::grid_html('event_email_template');
58 58
         return $content;
59
-	}
59
+    }
60 60
 
61 61
     /**
62 62
      * @return array
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                 'Height' => '250',
101 101
             )
102 102
         );
103
-	    $status_list = $this->get_status_list();
103
+        $status_list = $this->get_status_list();
104 104
         $form->addElement('select', 'status', get_lang('Status'), $status_list);
105 105
         if ($action == 'edit') {
106 106
             $form->addElement('text', 'created_at', get_lang('CreatedAt'));
@@ -117,17 +117,17 @@  discard block
 block discarded – undo
117 117
         $defaults = $this->get($id);
118 118
 
119 119
         if (!empty($defaults['created_at'])) {
120
-        	$defaults['created_at'] = api_convert_and_format_date($defaults['created_at']);
120
+            $defaults['created_at'] = api_convert_and_format_date($defaults['created_at']);
121 121
         }
122 122
         if (!empty($defaults['updated_at'])) {
123
-        	$defaults['updated_at'] = api_convert_and_format_date($defaults['updated_at']);
123
+            $defaults['updated_at'] = api_convert_and_format_date($defaults['updated_at']);
124 124
         }
125 125
         $form->setDefaults($defaults);
126 126
 
127 127
         // Setting the rules
128 128
         $form->addRule('name', get_lang('ThisFieldIsRequired'), 'required');
129 129
 
130
-		return $form;
130
+        return $form;
131 131
     }
132 132
 
133 133
     public function get_count()
Please login to merge, or discard this patch.
main/inc/lib/sortable_table.class.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -340,9 +340,9 @@  discard block
 block discarded – undo
340 340
     }
341 341
 
342 342
     /**
343
-    * This function shows the content of a table in a grid.
344
-    * Should not be use to edit information (edit/delete rows) only.
345
-    **/
343
+     * This function shows the content of a table in a grid.
344
+     * Should not be use to edit information (edit/delete rows) only.
345
+     **/
346 346
     public function display_grid()
347 347
     {
348 348
         $empty_table = false;
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
                 //$param[$tablename.'_direction'] = $_GET[$tablename.'_direction'];
801 801
                 $my_get_direction = $_GET[$tablename.'_direction'];
802 802
                 if (!in_array($my_get_direction, array('ASC', 'DESC'))) {
803
-                     $param[$tablename.'_direction'] =  'ASC';
803
+                        $param[$tablename.'_direction'] =  'ASC';
804 804
                 } else {
805 805
                     $param[$tablename.'_direction'] = $my_get_direction;
806 806
                 }
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
         if (is_array($row)) {
930 930
             foreach ($row as & $value) {
931 931
                 if (empty($value)) {
932
-                     $value = '-';
932
+                        $value = '-';
933 933
                 }
934 934
             }
935 935
         }
Please login to merge, or discard this patch.
main/inc/lib/userportal.lib.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -288,17 +288,17 @@  discard block
 block discarded – undo
288 288
                 }
289 289
             }
290 290
 
291
-			if (trim($home_top_temp) == '' && api_is_platform_admin()) {
292
-				$home_top_temp = '<div class="welcome-mascot">' . get_lang('PortalHomepageDefaultIntroduction') . '</div>';
293
-			} else {
294
-				$home_top_temp = '<div class="welcome-home-top-temp">' . $home_top_temp . '</div>';
295
-			}
296
-			$open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp);
297
-			$html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
298
-		}
299
-
300
-		return $html;
301
-	}
291
+            if (trim($home_top_temp) == '' && api_is_platform_admin()) {
292
+                $home_top_temp = '<div class="welcome-mascot">' . get_lang('PortalHomepageDefaultIntroduction') . '</div>';
293
+            } else {
294
+                $home_top_temp = '<div class="welcome-home-top-temp">' . $home_top_temp . '</div>';
295
+            }
296
+            $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp);
297
+            $html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
298
+        }
299
+
300
+        return $html;
301
+    }
302 302
 
303 303
     /**
304 304
      * @return string
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
                     $thereIsSubCat = true;
579 579
                 } elseif (api_get_setting('show_empty_course_categories') == 'true') {
580 580
                     /* End changed code to eliminate the (0 courses) after empty categories. */
581
-                      $htmlListCat .= '<li>';
581
+                        $htmlListCat .= '<li>';
582 582
                     $htmlListCat .= $catLine['name'];
583 583
                     $htmlListCat .= "</li>";
584 584
                     $thereIsSubCat = true;
@@ -708,11 +708,11 @@  discard block
 block discarded – undo
708 708
     }
709 709
 
710 710
     /**
711
-    * retrieves all the courses that the user has already subscribed to
712
-    * @author Patrick Cool <[email protected]>, Ghent University, Belgium
713
-    * @param int $user_id: the id of the user
714
-    * @return array an array containing all the information of the courses of the given user
715
-    */
711
+     * retrieves all the courses that the user has already subscribed to
712
+     * @author Patrick Cool <[email protected]>, Ghent University, Belgium
713
+     * @param int $user_id: the id of the user
714
+     * @return array an array containing all the information of the courses of the given user
715
+     */
716 716
     public function get_courses_of_user($user_id)
717 717
     {
718 718
         $table_course = Database::get_main_table(TABLE_MAIN_COURSE);
Please login to merge, or discard this patch.
main/inc/lib/internationalization.lib.php 1 patch
Indentation   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     }
100 100
 
101 101
     if (!isset($used_lang_vars)) {
102
-    	$used_lang_vars = array();
102
+        $used_lang_vars = array();
103 103
     }
104 104
 
105 105
     // Caching results from some API functions, for speed.
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
     static $text_direction = array();
301 301
 
302 302
     if (empty($language)) {
303
-    	$language = api_get_interface_language();
303
+        $language = api_get_interface_language();
304 304
     }
305 305
     if (!isset($text_direction[$language])) {
306 306
         $text_direction[$language] = in_array(
@@ -1723,7 +1723,6 @@  discard block
 block discarded – undo
1723 1723
 
1724 1724
 /**
1725 1725
  * Return true a date is valid
1726
-
1727 1726
  * @param string $date example: 2014-06-30 13:05:05
1728 1727
  * @param string $format example: "Y-m-d H:i:s"
1729 1728
  *
@@ -1996,15 +1995,15 @@  discard block
 block discarded – undo
1996 1995
 {
1997 1996
     if ($showTime) {
1998 1997
         if ($humanForm) {
1999
-           return $date->format('j M Y H:i:s');
1998
+            return $date->format('j M Y H:i:s');
2000 1999
         } else {
2001
-           return $date->format('Y-m-d H:i:s');
2000
+            return $date->format('Y-m-d H:i:s');
2002 2001
         }
2003 2002
     } else {
2004 2003
         if ($humanForm) {
2005
-           return $date->format('j M Y');
2004
+            return $date->format('j M Y');
2006 2005
         } else {
2007
-           return $date->format('Y-m-d');
2006
+            return $date->format('Y-m-d');
2008 2007
         }
2009 2008
     }
2010 2009
 }
Please login to merge, or discard this patch.
main/inc/lib/banner.lib.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -55,22 +55,22 @@  discard block
 block discarded – undo
55 55
     $navigation['myprofile']['title'] = get_lang('ModifyProfile');
56 56
     $navigation['myprofile']['key'] = 'profile';
57 57
     $navigation['myprofile']['icon'] = 'profile.png';
58
-	// Link to my agenda
58
+    // Link to my agenda
59 59
     $navigation['myagenda']['url'] = api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=personal';
60 60
     $navigation['myagenda']['title'] = get_lang('MyAgenda');
61 61
     $navigation['myagenda']['key'] = 'agenda';
62 62
     $navigation['myagenda']['icon'] = 'agenda.png';
63 63
 
64
-	// Gradebook
65
-	if (api_get_setting('gradebook_enable') == 'true') {
64
+    // Gradebook
65
+    if (api_get_setting('gradebook_enable') == 'true') {
66 66
         $navigation['mygradebook']['url'] = api_get_path(WEB_CODE_PATH).'gradebook/gradebook.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&amp;courseCode='.$_course['official_code'] : '' );
67 67
         $navigation['mygradebook']['title'] = get_lang('MyGradebook');
68 68
         $navigation['mygradebook']['key'] = 'gradebook';
69 69
         $navigation['mygradebook']['icon'] = 'gradebook.png';
70
-	}
70
+    }
71 71
 
72
-	// Reporting
73
-	if (api_is_allowed_to_create_course() || api_is_drh() || api_is_session_admin()) {
72
+    // Reporting
73
+    if (api_is_allowed_to_create_course() || api_is_drh() || api_is_session_admin()) {
74 74
         // Link to my space
75 75
         $navigation['session_my_space']['url'] = api_get_path(WEB_CODE_PATH).'mySpace/'.(api_is_drh()?'session.php':'');
76 76
         $navigation['session_my_space']['title'] = get_lang('MySpace');
@@ -97,23 +97,23 @@  discard block
 block discarded – undo
97 97
         $navigation['session_my_progress']['icon'] = 'my-progress.png';
98 98
     }
99 99
 
100
-	// Social
101
-	if (api_get_setting('allow_social_tool')=='true') {
100
+    // Social
101
+    if (api_get_setting('allow_social_tool')=='true') {
102 102
         $navigation['social']['url'] = api_get_path(WEB_CODE_PATH).'social/home.php';
103 103
         $navigation['social']['title'] = get_lang('SocialNetwork');
104 104
         $navigation['social']['key'] = 'social-network';
105 105
         $navigation['social']['icon'] = 'social-network.png';
106
-	}
106
+    }
107 107
 
108
-	// Dashboard
109
-	if (api_is_platform_admin() || api_is_drh() || api_is_session_admin()) {
108
+    // Dashboard
109
+    if (api_is_platform_admin() || api_is_drh() || api_is_session_admin()) {
110 110
         $navigation['dashboard']['url'] = api_get_path(WEB_CODE_PATH).'dashboard/index.php';
111 111
         $navigation['dashboard']['title'] = get_lang('Dashboard');
112 112
         $navigation['dashboard']['key'] = 'dashboard';
113 113
         $navigation['dashboard']['icon'] = 'dashboard.png';
114
-	}
114
+    }
115 115
 
116
-	// Reports
116
+    // Reports
117 117
     /*
118 118
 	if (api_is_platform_admin() || api_is_drh() || api_is_session_admin()) {
119 119
         $navigation['reports']['url'] = api_get_path(WEB_CODE_PATH).'reports/index.php';
@@ -136,15 +136,15 @@  discard block
 block discarded – undo
136 136
     }
137 137
     // End Custom Tabs
138 138
 
139
-	// Platform administration
140
-	if (api_is_platform_admin(true)) {
139
+    // Platform administration
140
+    if (api_is_platform_admin(true)) {
141 141
         $navigation['platform_admin']['url'] = api_get_path(WEB_CODE_PATH).'admin/';
142 142
         $navigation['platform_admin']['title'] = get_lang('PlatformAdmin');
143 143
         $navigation['platform_admin']['key'] = 'admin';
144 144
         $navigation['platform_admin']['icon'] = 'admin.png';
145
-	}
145
+    }
146 146
 
147
-	return $navigation;
147
+    return $navigation;
148 148
 }
149 149
 
150 150
 /**
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
             }
333 333
         }
334 334
 
335
-		// Reports
335
+        // Reports
336 336
         if (!empty($possible_tabs['reports'])) {
337 337
             if (api_get_setting('show_tabs', 'reports') == 'true') {
338 338
                 if ((api_is_platform_admin() || api_is_drh() || api_is_session_admin()) && Rights::hasRight('show_tabs:reports')) {
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
         $navigation_item_my_courses['title'] = get_lang('MyCourses');
575 575
         $navigation_item_my_courses['url'] = api_get_path(WEB_PATH).'user_portal.php';
576 576
         $navigation[] = $navigation_item_my_courses;
577
-        */
577
+         */
578 578
         $navigation[] = $navigation_item;
579 579
     }
580 580
 
Please login to merge, or discard this patch.
main/inc/lib/search/search_widget.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
  * Get one term html select
31 31
  */
32 32
 function format_one_specific_field_select($prefix, $sf_term_array, $op, $extra_select_attr='size="7" class="sf-select-multiple"') {
33
-	global $charset;
33
+    global $charset;
34 34
     $multiple_select = '<select '. $extra_select_attr .' title="'. $prefix .'" id="sf-'. $prefix .'" name="sf_'. $prefix .'[]">';
35 35
 
36 36
     $all_selected = '';
@@ -119,20 +119,20 @@  discard block
 block discarded – undo
119 119
      * could not send a form in pagination
120 120
      */
121 121
 
122
-	if (isset($_GET['action']) && strcmp(trim($_GET['action']),'search')===0) {
123
-		$action='index.php';
124
-	}
125
-	$navigator_info = api_get_navigator();
122
+    if (isset($_GET['action']) && strcmp(trim($_GET['action']),'search')===0) {
123
+        $action='index.php';
124
+    }
125
+    $navigator_info = api_get_navigator();
126 126
 
127
-	if ($navigator_info['name']=='Internet Explorer' &&  $navigator_info['version']=='6') {
128
-		$submit_button1	= '<input type="submit" id="submit" value="'. get_lang('Search') .'" />';
129
-		$submit_button2 = '<input class="lower-submit" type="submit" value="'. get_lang('Search') .'" />';
127
+    if ($navigator_info['name']=='Internet Explorer' &&  $navigator_info['version']=='6') {
128
+        $submit_button1	= '<input type="submit" id="submit" value="'. get_lang('Search') .'" />';
129
+        $submit_button2 = '<input class="lower-submit" type="submit" value="'. get_lang('Search') .'" />';
130 130
         $reset_button 	= '<input type="submit" id="tags-clean" value="'. get_lang('SearchResetKeywords') .'" />';
131
-	} else {
132
-		$submit_button1 = '<button class="search" type="submit" id="submit" value="'. get_lang("Search") .'" /> '. get_lang('Search') .'</button>';
133
-		$submit_button2 = '<button class="search" type="submit" value="'. get_lang('Search') .'" />'. get_lang('Search') .'</button>';
131
+    } else {
132
+        $submit_button1 = '<button class="search" type="submit" id="submit" value="'. get_lang("Search") .'" /> '. get_lang('Search') .'</button>';
133
+        $submit_button2 = '<button class="search" type="submit" value="'. get_lang('Search') .'" />'. get_lang('Search') .'</button>';
134 134
         $reset_button 	= '<button class="save"   type="submit" id="tags-clean" value="'. get_lang('SearchResetKeywords') .'" />'. get_lang('SearchResetKeywords') .'</button> ';
135
-	}
135
+    }
136 136
 
137 137
     $query = isset($_REQUEST['query']) ? Security::remove_XSS($_REQUEST['query']) : null;
138 138
 
@@ -199,9 +199,9 @@  discard block
 block discarded – undo
199 199
      * SortableTableFromArray pagination is done with simple links, so now we
200 200
      * could not send a form in pagination
201 201
      */
202
-	if (isset($_GET['action']) && strcmp(trim($_GET['action']),'search')===0) {
203
-		$action='index.php';
204
-	}
202
+    if (isset($_GET['action']) && strcmp(trim($_GET['action']),'search')===0) {
203
+        $action='index.php';
204
+    }
205 205
 
206 206
     $form = '
207 207
         <form id="chamilo_search" action="'. $action .'" method="GET">
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
                         </table>
267 267
                     </div>';
268 268
         }
269
-       $form .= '
269
+        $form .= '
270 270
         </form>
271 271
         <br style="clear: both;"/>';
272 272
 
@@ -324,10 +324,10 @@  discard block
 block discarded – undo
324 324
         foreach ($specific_fields as $specific_field) {
325 325
             $temp = array();
326 326
             if (is_array($dkterms) && count($dkterms)>0) {
327
-            	foreach($dkterms[1] as $obj) {
328
-                	$temp = array_merge($obj['sf-'.$specific_field['code']], $temp);
329
-            	}
330
-        	}
327
+                foreach($dkterms[1] as $obj) {
328
+                    $temp = array_merge($obj['sf-'.$specific_field['code']], $temp);
329
+                }
330
+            }
331 331
             $sf_terms[$specific_field['code']] = $temp;
332 332
             $url_params[] = 'sf_'.$specific_field['code'];
333 333
             unset($temp);
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
     }
343 343
     echo '<h2>'.get_lang('Search').'</h2>';
344 344
 
345
-	// Tool introduction
345
+    // Tool introduction
346 346
     // TODO: Settings for the online editor to be checked (insert an image for example). Probably this is a special case here.
347 347
     if (api_get_course_id() !== -1)
348 348
     if (!empty($groupId)) {
Please login to merge, or discard this patch.