Completed
Push — 1.11.x ( 78f130...f6f5c2 )
by José
50:40 queued 24:26
created
plugin/tour/src/tour_plugin.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,8 +129,8 @@
 block discarded – undo
129 129
      */
130 130
     public function getTourConfig()
131 131
     {
132
-        $pluginPath = api_get_path(SYS_PLUGIN_PATH) . 'tour/';
133
-        $jsonContent = file_get_contents($pluginPath . 'config/tour.json');
132
+        $pluginPath = api_get_path(SYS_PLUGIN_PATH).'tour/';
133
+        $jsonContent = file_get_contents($pluginPath.'config/tour.json');
134 134
         $jsonData = json_decode($jsonContent, true);
135 135
 
136 136
         return $jsonData;
Please login to merge, or discard this patch.
plugin/tour/config.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 
10 10
 define('TABLE_TOUR_LOG', 'plugin_tour_log');
11 11
 
12
-require_once api_get_path(SYS_PATH) . 'main/inc/global.inc.php';
13
-require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php';
14
-require_once api_get_path(SYS_PLUGIN_PATH) . 'tour/src/tour_plugin.class.php';
12
+require_once api_get_path(SYS_PATH).'main/inc/global.inc.php';
13
+require_once api_get_path(LIBRARY_PATH).'plugin.class.php';
14
+require_once api_get_path(SYS_PLUGIN_PATH).'tour/src/tour_plugin.class.php';
15 15
 // Edit the config/tour.json file to add more pages or more elements to the guide
Please login to merge, or discard this patch.
plugin/tour/ajax/steps.ajax.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
  * @package chamilo.plugin.tour
7 7
  */
8 8
 require_once __DIR__.'/../../../main/inc/global.inc.php';
9
-require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php';
10
-require_once api_get_path(SYS_PLUGIN_PATH) . 'tour/src/tour_plugin.class.php';
9
+require_once api_get_path(LIBRARY_PATH).'plugin.class.php';
10
+require_once api_get_path(SYS_PLUGIN_PATH).'tour/src/tour_plugin.class.php';
11 11
 
12 12
 if (!api_is_anonymous()) {
13 13
     $currentPageClass = isset($_GET['page_class']) ? $_GET['page_class'] : '';
Please login to merge, or discard this patch.
main/document/create_paint.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -50,26 +50,26 @@  discard block
 block discarded – undo
50 50
 // Please, do not modify this dirname formatting
51 51
 
52 52
 if (strstr($dir, '..')) {
53
-	$dir = '/';
53
+    $dir = '/';
54 54
 }
55 55
 
56 56
 if ($dir[0] == '.') {
57
-	$dir = substr($dir, 1);
57
+    $dir = substr($dir, 1);
58 58
 }
59 59
 
60 60
 if ($dir[0] != '/') {
61
-	$dir = '/'.$dir;
61
+    $dir = '/'.$dir;
62 62
 }
63 63
 
64 64
 if ($dir[strlen($dir) - 1] != '/') {
65
-	$dir .= '/';
65
+    $dir .= '/';
66 66
 }
67 67
 
68 68
 $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'.$dir;
69 69
 
70 70
 if (!is_dir($filepath)) {
71
-	$filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/';
72
-	$dir = '/';
71
+    $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/';
72
+    $dir = '/';
73 73
 }
74 74
 
75 75
 $groupId = api_get_group_id();
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 }
98 98
 
99 99
 if (!($is_allowed_to_edit || $_SESSION['group_member_with_upload_rights'] ||
100
-	DocumentManager::is_my_shared_folder($_user['user_id'], Security::remove_XSS($dir), api_get_session_id()))
100
+    DocumentManager::is_my_shared_folder($_user['user_id'], Security::remove_XSS($dir), api_get_session_id()))
101 101
 ) {
102 102
     api_not_allowed(true);
103 103
 }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
 // Interbreadcrumb for the current directory root path
116 116
 if (empty($document_data['parents'])) {
117
-	$interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
117
+    $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']);
118 118
 } else {
119 119
     foreach ($document_data['parents'] as $document_sub_data) {
120 120
         $interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']);
@@ -147,17 +147,17 @@  discard block
 block discarded – undo
147 147
 $locktitle="false";
148 148
 
149 149
 if ($_SERVER['HTTP_HOST']=="localhost") {
150
-	$path_and_file= api_get_path(SYS_PATH).'/crossdomain.xml';
151
-	if (!file_exists($path_and_file)) {
152
-		$crossdomain='<?xml version="1.0"?>
150
+    $path_and_file= api_get_path(SYS_PATH).'/crossdomain.xml';
151
+    if (!file_exists($path_and_file)) {
152
+        $crossdomain='<?xml version="1.0"?>
153 153
 			<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
154 154
 			<cross-domain-policy>
155 155
 				<allow-access-from domain="cdn.pixlr.com" />
156 156
 				<site-control permitted-cross-domain-policies="master-only"/>
157 157
 				<allow-http-request-headers-from domain="cnd.pixlr.com" headers="*" secure="true"/>
158 158
 			</cross-domain-policy>';//more open domain="*"
159
-		@file_put_contents($path_and_file, $crossdomain);
160
-	}
159
+        @file_put_contents($path_and_file, $crossdomain);
160
+    }
161 161
     $credentials = "true";
162 162
 } else {
163 163
     $credentials = "false";
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -129,27 +129,27 @@
 block discarded – undo
129 129
 
130 130
 // pixlr
131 131
 // max size 1 Mb ??
132
-$title = urlencode(utf8_encode(get_lang('NewImage')));//TODO:check
132
+$title = urlencode(utf8_encode(get_lang('NewImage'))); //TODO:check
133 133
 //
134 134
 $image = Display::returnIconPath('canvas1024x768.png');
135 135
 //
136 136
 $pixlr_code_translation_table = array('' => 'en', 'pt' => 'pt-Pt', 'sr' => 'sr_latn');
137
-$langpixlr  = api_get_language_isocode();
137
+$langpixlr = api_get_language_isocode();
138 138
 $langpixlr = isset($pixlr_code_translation_table[$langpixlr]) ? $pixlredit_code_translation_table[$langpixlr] : $langpixlr;
139
-$loc=$langpixlr;// deprecated ?? TODO:check pixlr read user browser
140
-
141
-$exit_path=api_get_path(WEB_CODE_PATH).'document/exit_pixlr.php';
142
-$_SESSION['exit_pixlr']=$document_data['path'];
143
-$referrer="Chamilo";
144
-$target_path=api_get_path(WEB_CODE_PATH).'document/save_pixlr.php';
145
-$target=$target_path;
146
-$locktarget="true";
147
-$locktitle="false";
148
-
149
-if ($_SERVER['HTTP_HOST']=="localhost") {
150
-	$path_and_file= api_get_path(SYS_PATH).'/crossdomain.xml';
139
+$loc = $langpixlr; // deprecated ?? TODO:check pixlr read user browser
140
+
141
+$exit_path = api_get_path(WEB_CODE_PATH).'document/exit_pixlr.php';
142
+$_SESSION['exit_pixlr'] = $document_data['path'];
143
+$referrer = "Chamilo";
144
+$target_path = api_get_path(WEB_CODE_PATH).'document/save_pixlr.php';
145
+$target = $target_path;
146
+$locktarget = "true";
147
+$locktitle = "false";
148
+
149
+if ($_SERVER['HTTP_HOST'] == "localhost") {
150
+	$path_and_file = api_get_path(SYS_PATH).'/crossdomain.xml';
151 151
 	if (!file_exists($path_and_file)) {
152
-		$crossdomain='<?xml version="1.0"?>
152
+		$crossdomain = '<?xml version="1.0"?>
153 153
 			<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
154 154
 			<cross-domain-policy>
155 155
 				<allow-access-from domain="cdn.pixlr.com" />
Please login to merge, or discard this patch.
main/course_home/course_home.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
             if (Database::num_rows($result) ==  0) {
214 214
                 $condition = '';
215 215
             } else {
216
-            	//great, there is an specific auto launch for this session we leave the $condition
216
+                //great, there is an specific auto launch for this session we leave the $condition
217 217
             }
218 218
         }
219 219
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
             $lp_data = Database::fetch_array($result,'ASSOC');
226 226
             if (!empty($lp_data['id'])) {
227 227
                 if (api_is_platform_admin() || api_is_allowed_to_edit()) {
228
-                	$show_autolaunch_lp_warning = true;
228
+                    $show_autolaunch_lp_warning = true;
229 229
                 } else {
230 230
                     $session_key = 'lp_autolaunch_'.$session_id.'_'.api_get_course_int_id().'_'.api_get_user_id();
231 231
                     if (!isset($_SESSION[$session_key])) {
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
         //if (!isset($_SESSION[$forumKey])) {
255 255
             //redirecting to the LP
256 256
             $url = api_get_path(WEB_CODE_PATH).'forum/index.php?'.api_get_cidreq().'&id_session='.$session_id;
257
-          //  $_SESSION[$forumKey] = true;
257
+            //  $_SESSION[$forumKey] = true;
258 258
             header("Location: $url");
259 259
             exit;
260 260
         //}
@@ -280,13 +280,13 @@  discard block
 block discarded – undo
280 280
 if (api_get_setting('course.homepage_view') == 'activity' ||
281 281
     api_get_setting('course.homepage_view') == 'activity_big'
282 282
 ) {
283
-	require 'activity.php';
283
+    require 'activity.php';
284 284
 } elseif (api_get_setting('course.homepage_view') == '2column') {
285
-	require '2column.php';
285
+    require '2column.php';
286 286
 } elseif (api_get_setting('course.homepage_view') == '3column') {
287
-	require '3column.php';
287
+    require '3column.php';
288 288
 } elseif (api_get_setting('course.homepage_view') == 'vertical_activity') {
289
-	require 'vertical_activity.php';
289
+    require 'vertical_activity.php';
290 290
 }
291 291
 
292 292
 $content = '<div id="course_tools">'.$content.'</div>';
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 //unset($_SESSION['oLP']);
42 42
 //unset($_SESSION['lpobject']);
43 43
 
44
-$htmlHeadXtra[] ='<script>
44
+$htmlHeadXtra[] = '<script>
45 45
 /* option show/hide thematic-block */
46 46
 $(document).ready(function(){
47 47
     $("#thematic-show").click(function(){
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
             $session_key = 'lp_autolaunch_'.$session_id.'_'.api_get_course_int_id().'_'.api_get_user_id();
210 210
             if (!isset($_SESSION[$session_key])) {
211 211
                 //redirecting to the LP
212
-                $url = api_get_path(WEB_CODE_PATH) . 'lp/lp_controller.php?' . api_get_cidreq() . '&id_session=' . $session_id;
212
+                $url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq().'&id_session='.$session_id;
213 213
                 $_SESSION[$session_key] = true;
214 214
                 header("Location: $url");
215 215
                 exit;
@@ -220,13 +220,13 @@  discard block
 block discarded – undo
220 220
         $course_id = api_get_course_int_id();
221 221
         $condition = '';
222 222
         if (!empty($session_id)) {
223
-            $condition =  api_get_session_condition($session_id);
223
+            $condition = api_get_session_condition($session_id);
224 224
             $sql = "SELECT id FROM $lp_table
225 225
                     WHERE c_id = $course_id AND autolaunch = 1 $condition
226 226
                     LIMIT 1";
227 227
             $result = Database::query($sql);
228 228
             //If we found nothing in the session we just called the session_id =  0 autolaunch
229
-            if (Database::num_rows($result) ==  0) {
229
+            if (Database::num_rows($result) == 0) {
230 230
                 $condition = '';
231 231
             } else {
232 232
             	//great, there is an specific auto launch for this session we leave the $condition
@@ -237,8 +237,8 @@  discard block
 block discarded – undo
237 237
                 WHERE c_id = $course_id AND autolaunch = 1 $condition
238 238
                 LIMIT 1";
239 239
         $result = Database::query($sql);
240
-        if (Database::num_rows($result) >  0) {
241
-            $lp_data = Database::fetch_array($result,'ASSOC');
240
+        if (Database::num_rows($result) > 0) {
241
+            $lp_data = Database::fetch_array($result, 'ASSOC');
242 242
             if (!empty($lp_data['id'])) {
243 243
                 if (api_is_platform_admin() || api_is_allowed_to_edit()) {
244 244
                 	$show_autolaunch_lp_warning = true;
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
                     $session_key = 'lp_autolaunch_'.$session_id.'_'.api_get_course_int_id().'_'.api_get_user_id();
247 247
                     if (!isset($_SESSION[$session_key])) {
248 248
                         //redirecting to the LP
249
-                        $url = api_get_path(WEB_CODE_PATH) . 'lp/lp_controller.php?' . api_get_cidreq() . '&action=view&lp_id=' . $lp_data['id'];
249
+                        $url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq().'&action=view&lp_id='.$lp_data['id'];
250 250
 
251 251
                         $_SESSION[$session_key] = true;
252 252
                         header("Location: $url");
Please login to merge, or discard this patch.
src/Chamilo/FaqBundle/Entity/Question.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@
 block discarded – undo
219 219
      */
220 220
     public function getEntityIdentifier()
221 221
     {
222
-        return 'GenjFaqBundle:Question:' . $this->getId();
222
+        return 'GenjFaqBundle:Question:'.$this->getId();
223 223
     }
224 224
 
225 225
     /**
Please login to merge, or discard this patch.
src/Chamilo/FaqBundle/Entity/Category.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      *
94 94
      * @param string $rank
95 95
      *
96
-     * @return Question
96
+     * @return Category
97 97
      */
98 98
     public function setRank($rank)
99 99
     {
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     /**
202 202
      * Get questions
203 203
      *
204
-     * @return \Doctrine\Common\Collections\Collection
204
+     * @return Question[]
205 205
      */
206 206
     public function getQuestions()
207 207
     {
Please login to merge, or discard this patch.
main/course_info/tools.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
         $interbreadcrumb[] = array('url' => api_get_self().'?'.api_get_cidreq(), 'name' => get_lang('CustomizeIcons'));
47 47
         $toolName = $tool['name'];
48 48
 
49
-        $currentUrl = api_get_self().'?action=edit_icon&id=' . $id.'&'.api_get_cidreq();
49
+        $currentUrl = api_get_self().'?action=edit_icon&id='.$id.'&'.api_get_cidreq();
50 50
 
51 51
         $form = new FormValidator('icon_edit', 'post', $currentUrl);
52 52
         $form->addElement('header', get_lang('EditIcon'));
53 53
         $form->addHtml('<div class="col-md-7">');
54 54
         $form->addElement('text', 'name', get_lang('Name'));
55 55
         $form->addElement('text', 'link', get_lang('Links'));
56
-        $allowed_picture_types = array ('jpg', 'jpeg', 'png');
56
+        $allowed_picture_types = array('jpg', 'jpeg', 'png');
57 57
         $form->addElement('file', 'icon', get_lang('CustomIcon'));
58 58
         $form->addRule('icon', get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')', 'filetype', $allowed_picture_types);
59 59
         $form->addElement(
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $iconsTools .= Display::page_header(get_lang('CustomizeIcons'), null, 'h4');
119 119
         $iconsTools .= '<div class="row">';
120 120
         foreach ($toolList as $tool) {
121
-            $toolIconName = 'Tool' . api_underscore_to_camel_case($tool['name']);
121
+            $toolIconName = 'Tool'.api_underscore_to_camel_case($tool['name']);
122 122
             $toolIconName = isset($$toolIconName) ? get_lang($toolIconName) : $tool['name'];
123 123
 
124 124
             $iconsTools .= '<div class="col-md-2">';
@@ -140,13 +140,13 @@  discard block
 block discarded – undo
140 140
 
141 141
             $delete = (!empty($tool['custom_icon'])) ? "<a class=\"btn btn-default\" onclick=\"javascript:
142 142
                 if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).
143
-                "')) return false;\" href=\"". api_get_self() . '?action=delete_icon&id=' . $tool['iid'] . '&'.api_get_cidreq()."\">
143
+                "')) return false;\" href=\"".api_get_self().'?action=delete_icon&id='.$tool['iid'].'&'.api_get_cidreq()."\">
144 144
             <em class=\"fa fa-trash-o\"></em></a>" : "";
145
-            $edit = '<a class="btn btn-default" href="' . api_get_self() . '?action=edit_icon&id=' . $tool['iid'] . '&'.api_get_cidreq().'"><em class="fa fa-pencil"></em></a>';
145
+            $edit = '<a class="btn btn-default" href="'.api_get_self().'?action=edit_icon&id='.$tool['iid'].'&'.api_get_cidreq().'"><em class="fa fa-pencil"></em></a>';
146 146
 
147
-            $iconsTools .= '<div class="icon-tools">'. $icon . '</div>';
148
-            $iconsTools .= '<div class="name-tools">' . $toolIconName . '</div>';
149
-            $iconsTools .= '<div class="toolbar">' . $edit . $delete . '</div>';
147
+            $iconsTools .= '<div class="icon-tools">'.$icon.'</div>';
148
+            $iconsTools .= '<div class="name-tools">'.$toolIconName.'</div>';
149
+            $iconsTools .= '<div class="toolbar">'.$edit.$delete.'</div>';
150 150
             $iconsTools .= '</div>';
151 151
             $iconsTools .= '</div>';
152 152
         }
Please login to merge, or discard this patch.
main/auth/external_login/facebook.init.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,5 +22,5 @@
 block discarded – undo
22 22
  * See facebook section of the auth.conf.php file
23 23
  */
24 24
 
25
-require dirname(__FILE__) . '/../../../app/config/auth.conf.php';
25
+require dirname(__FILE__).'/../../../app/config/auth.conf.php';
26 26
 
Please login to merge, or discard this patch.