Completed
Push — 1.11.x ( 7ffd51...902ebd )
by José
50:21 queued 21:28
created
main/admin/add_sessions_to_promotion.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
       <option value = "%">--</option>
179 179
       <?php
180 180
         echo Display :: get_alphabet_options();
181
-      ?>
181
+        ?>
182 182
      </select>
183 183
 </td>
184 184
 <td align="center">&nbsp;</td>
@@ -188,31 +188,31 @@  discard block
 block discarded – undo
188 188
   <td align="center">
189 189
   <div id="content_source">
190 190
       <?php
191
-      if (!($add_type == 'multiple')) {
191
+        if (!($add_type == 'multiple')) {
192 192
         ?>
193 193
         <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" />
194 194
         <div id="ajax_list_users_single"></div>
195 195
         <?php
196
-      } else {
197
-      ?>
196
+        } else {
197
+        ?>
198 198
       <div id="ajax_list_multiple">
199 199
         <?php echo Display::select('session_not_in_promotion_name', $session_not_in_promotion, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'session_not_in_promotion', 'size'=>'15px'), false); ?>
200 200
       </div>
201 201
     <?php
202
-      }
203
-     ?>
202
+        }
203
+        ?>
204 204
   </div>
205 205
   </td>
206 206
   <td width="10%" valign="middle" align="center">
207 207
   <?php
208
-  if ($ajax_search) {
209
-  ?>
208
+    if ($ajax_search) {
209
+    ?>
210 210
     <button class="btn btn-default" type="button" onclick="remove_item(document.getElementById('session_in_promotion'))" >
211 211
         <em class="fa fa-arrow-left"></em>
212 212
     </button>
213 213
   <?php
214
-  } else {
215
-  ?>
214
+    } else {
215
+    ?>
216 216
     <button class="btn btn-default" type="button" onclick="moveItem(document.getElementById('session_not_in_promotion'), document.getElementById('session_in_promotion'))" onclick="moveItem(document.getElementById('session_not_in_promotion'), document.getElementById('session_in_promotion'))">
217 217
         <em class="fa fa-arrow-right"></em>
218 218
     </button>
@@ -221,8 +221,8 @@  discard block
 block discarded – undo
221 221
         <em class="fa fa-arrow-left"></em>
222 222
     </button>
223 223
     <?php
224
-  }
225
-  ?>
224
+    }
225
+    ?>
226 226
     <br /><br /><br /><br /><br /><br />
227 227
   </td>
228 228
   <td align="center">
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,10 @@
 block discarded – undo
123 123
 echo '</div>';
124 124
 ?>
125 125
 
126
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if (!empty($_GET['add'])) echo '&add=true'; ?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>>
126
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if (!empty($_GET['add'])) {
127
+    echo '&add=true';
128
+}
129
+?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>>
127 130
 <?php echo '<legend>'.$tool_name.' '.$promotion_data['name'].'</legend>';
128 131
 
129 132
 
Please login to merge, or discard this patch.
main/reports/templates/courseTime.reports.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,8 @@  discard block
 block discarded – undo
34 34
             $column['course'].'` ';
35 35
     }
36 36
     $query .= ' from '.Database::get_main_table(TABLE_MAIN_USER).' u ';
37
-    foreach ($columns as $key => $column) // fixme sessions
37
+    foreach ($columns as $key => $column) {
38
+        // fixme sessions
38 39
     {
39 40
         $query .= 'left outer join '.
40 41
             Database::get_main_table(TABLE_MAIN_REPORTS_VALUES).
@@ -42,5 +43,6 @@  discard block
 block discarded – undo
42 43
             ' on k'.$key.'.key_id = '.$column['kid'].
43 44
             ' and k'.$key.'.user_id = u.user_id ';
44 45
     }
46
+    }
45 47
     return $query;
46 48
 }
Please login to merge, or discard this patch.
main/inc/lib/access_url_edit_users_to_url_functions.lib.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,11 +40,11 @@
 block discarded – undo
40 40
             // search users where username or firstname or lastname begins likes $needle
41 41
             $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username';
42 42
             $sql = 'SELECT u.user_id, username, lastname, firstname FROM '.$tbl_user.' u '.
43
-                   ' WHERE (username LIKE "'.$needle.'%" '.
44
-                   ' OR firstname LIKE "'.$needle.'%" '.
45
-                   ' OR lastname LIKE "'.$needle.'%") '.
43
+                    ' WHERE (username LIKE "'.$needle.'%" '.
44
+                    ' OR firstname LIKE "'.$needle.'%" '.
45
+                    ' OR lastname LIKE "'.$needle.'%") '.
46 46
                     $order_clause.
47
-                   ' LIMIT 11';
47
+                    ' LIMIT 11';
48 48
 
49 49
             $rs = Database::query($sql);
50 50
             $i = 0;
Please login to merge, or discard this patch.
plugin/jcapture/applet.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,31 +1,31 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3
-	//fix for Opera XMLHttpRequests
4
-	if (!count($_POST) && $HTTP_RAW_POST_DATA) {
5
-	  parse_str($HTTP_RAW_POST_DATA, $_POST);
6
-	}
3
+    //fix for Opera XMLHttpRequests
4
+    if (!count($_POST) && $HTTP_RAW_POST_DATA) {
5
+        parse_str($HTTP_RAW_POST_DATA, $_POST);
6
+    }
7 7
 	
8
-	if (!defined('DOKU_INC')) define('DOKU_INC', __DIR__.'/../../../');
9
-	require_once(DOKU_INC.'inc/init.php');
10
-	require_once(DOKU_INC.'inc/common.php');
11
-	require_once(DOKU_INC.'inc/pageutils.php');
12
-	require_once(DOKU_INC.'inc/auth.php');
13
-	//close sesseion
14
-	session_write_close();
8
+    if (!defined('DOKU_INC')) define('DOKU_INC', __DIR__.'/../../../');
9
+    require_once(DOKU_INC.'inc/init.php');
10
+    require_once(DOKU_INC.'inc/common.php');
11
+    require_once(DOKU_INC.'inc/pageutils.php');
12
+    require_once(DOKU_INC.'inc/auth.php');
13
+    //close sesseion
14
+    session_write_close();
15 15
 	
16
-	header('Content-Type: text/html; charset=utf-8');
16
+    header('Content-Type: text/html; charset=utf-8');
17 17
 	
18
-	$hostName = "http".($_SERVER['HTTPS'] ? 's' : null).'://'.$_SERVER['HTTP_HOST']; 
18
+    $hostName = "http".($_SERVER['HTTPS'] ? 's' : null).'://'.$_SERVER['HTTP_HOST']; 
19 19
 	
20
-	$imageFormat = "PNG";
20
+    $imageFormat = "PNG";
21 21
 
22
-	$cookies;
23
-	foreach (array_keys($_COOKIE) as $cookieName) {
24
-		$cookies .= bin2hex($cookieName)."=".bin2hex($_COOKIE[$cookieName]).";";
25
-	} 
22
+    $cookies;
23
+    foreach (array_keys($_COOKIE) as $cookieName) {
24
+        $cookies .= bin2hex($cookieName)."=".bin2hex($_COOKIE[$cookieName]).";";
25
+    } 
26 26
 	
27
-	$pageName = $_GET["pageName"];
28
-	$edid = $_GET["edid"];
27
+    $pageName = $_GET["pageName"];
28
+    $edid = $_GET["edid"];
29 29
 ?>
30 30
 
31 31
 <script language="JavaScript" type="text/javascript"><!--
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@
 block discarded – undo
5 5
 	  parse_str($HTTP_RAW_POST_DATA, $_POST);
6 6
 	}
7 7
 	
8
-	if (!defined('DOKU_INC')) define('DOKU_INC', __DIR__.'/../../../');
8
+	if (!defined('DOKU_INC')) {
9
+	    define('DOKU_INC', __DIR__.'/../../../');
10
+	}
9 11
 	require_once(DOKU_INC.'inc/init.php');
10 12
 	require_once(DOKU_INC.'inc/common.php');
11 13
 	require_once(DOKU_INC.'inc/pageutils.php');
Please login to merge, or discard this patch.
plugin/olpc_peru_filter/lib/olpc_peru_filter_plugin.class.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         $list = $this->get_blacklist_options();
32 32
         foreach ($list as $k => $v) {
33 33
             $this->course_settings[] =
34
-              array('group'=> 'olpc_peru_filter_filter', 'name' => $k, 'type' => 'checkbox', 'init_value' => $v);
34
+                array('group'=> 'olpc_peru_filter_filter', 'name' => $k, 'type' => 'checkbox', 'init_value' => $v);
35 35
         }
36 36
         require_once __DIR__.'/../config.php';
37 37
         if (!empty($blacklist_enabled_file)) {
Please login to merge, or discard this patch.
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,12 +19,14 @@  discard block
 block discarded – undo
19 19
     public $course_settings_callback = true;
20 20
     public $error = '';
21 21
 
22
-    static function create() {
22
+    static function create()
23
+    {
23 24
         static $result = null;
24 25
         return $result ? $result : $result = new self();
25 26
     }
26 27
 
27
-    protected function __construct() {
28
+    protected function __construct()
29
+    {
28 30
         parent::__construct('0.1', 'Yannick Warnier, Aliosh Neira', array('tool_enable' => 'boolean'));
29 31
 
30 32
         $this->course_settings = array();
@@ -42,12 +44,14 @@  discard block
 block discarded – undo
42 44
         }
43 45
     }
44 46
 
45
-    function install() {
47
+    function install()
48
+    {
46 49
         //Installing course settings
47 50
         $this->install_course_fields_in_all_courses(false);
48 51
     }
49 52
 
50
-    function uninstall() {
53
+    function uninstall()
54
+    {
51 55
         //Deleting course settings
52 56
         $this->uninstall_course_fields_in_all_courses($this->course_settings);
53 57
     }
@@ -57,12 +61,14 @@  discard block
 block discarded – undo
57 61
      * @param boolean Whether to add a tool link on the course homepage
58 62
      * @return void
59 63
      */
60
-    function course_install($course_id, $add_tool_link = true) {
64
+    function course_install($course_id, $add_tool_link = true)
65
+    {
61 66
         //force ignoring the tools table insertion for this plugin
62 67
         $this->install_course_fields($course_id, false);
63 68
     }
64 69
 
65
-    function course_settings_updated($values = array()) {
70
+    function course_settings_updated($values = array())
71
+    {
66 72
         if (!is_array($values) or count($values) == 0) {
67 73
             return false;
68 74
         }
@@ -72,7 +78,8 @@  discard block
 block discarded – undo
72 78
      * Get a list of options (checked and unchecked) for blacklists as coming
73 79
      * from the Squid files
74 80
      */
75
-    function get_blacklist_options() {
81
+    function get_blacklist_options()
82
+    {
76 83
         $categories = $blacklists = array();
77 84
         if (!is_dir($this->blacklists_dir)) {
78 85
             $this->error = 'Could not find blacklists dir '.$this->blacklists_dir;
@@ -110,7 +117,8 @@  discard block
 block discarded – undo
110 117
      * @param array Array of blacklists names
111 118
      * @return boolean False on error, True on success
112 119
      */
113
-    function set_blacklist_options($values) {
120
+    function set_blacklist_options($values)
121
+    {
114 122
         if (!is_array($values)) { return false; }
115 123
         if (!is_writeable($this->blacklist_enabled_file)) { return false; }
116 124
         $new_blacklist = '';
Please login to merge, or discard this patch.
main/course_home/3column.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@
 block discarded – undo
169 169
             </tr>
170 170
             </table>\n";
171 171
     } elseif (isset($delete) && $delete) {
172
-         // if remove
172
+            // if remove
173 173
         /*
174 174
          * Process hiding a tools from aivailable tools.
175 175
          * visibility=2 are only viewed by Dokeos Administrator visibility 0,1->2
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,16 +86,16 @@
 block discarded – undo
86 86
          * Process hiding a tools from aivailable tools.
87 87
          * visibility=2 are only view  by Dokeos Administrator (visibility 0,1->2)
88 88
          */
89
-        Database::query("UPDATE $TBL_ACCUEIL SET visibility='2' WHERE c_id = $course_id AND id = $id");
89
+        Database::query("update $TBL_ACCUEIL SET visibility='2' WHERE c_id = $course_id AND id = $id");
90 90
     } elseif ($hide) {
91 91
         // visibility 1 -> 0
92 92
         /* HIDE */
93
-        Database::query("UPDATE $TBL_ACCUEIL SET visibility=0 WHERE c_id = $course_id AND id=$id");
93
+        Database::query("update $TBL_ACCUEIL SET visibility=0 WHERE c_id = $course_id AND id=$id");
94 94
         $show_message .= Display::return_message(get_lang('ToolIsNowHidden'), 'confirmation');
95 95
     } elseif ($restore) {
96 96
         /*	REACTIVATE */
97 97
         // visibility 0,2 -> 1
98
-        Database::query("UPDATE $TBL_ACCUEIL SET visibility=1  WHERE c_id = $course_id AND id=$id");
98
+        Database::query("update $TBL_ACCUEIL SET visibility=1  WHERE c_id = $course_id AND id=$id");
99 99
         $show_message .= Display::return_message(get_lang('ToolIsNowVisible'), 'confirmation');
100 100
     } elseif (isset($update) && $update) {
101 101
         /*
Please login to merge, or discard this patch.
main/auth/conditional_login/complete_phone_number.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,8 +4,9 @@
 block discarded – undo
4 4
 require_once __DIR__.'/../../inc/global.inc.php';
5 5
 $url = api_get_path(WEB_PATH).'main/auth/conditional_login/complete_phone_number.php';
6 6
 
7
-if (!isset($_SESSION['conditional_login']['uid']))
7
+if (!isset($_SESSION['conditional_login']['uid'])) {
8 8
     die("Not Authorised");
9
+}
9 10
 ?>
10 11
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
11 12
 <html lang="fr" xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml">
Please login to merge, or discard this patch.
main/inc/lib/access_url_edit_sessions_to_url_functions.lib.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
             while ($session = Database::fetch_array($rs)) {
48 48
                 $i++;
49 49
                 if ($i <= 10) {
50
-                     $return .= '<a href="#" onclick="add_user_to_url(\''.addslashes($session['id']).'\',\''.addslashes($session['name']).' ('.addslashes($session['id']).')'.'\')">'.$session['name'].' </a><br />';
50
+                        $return .= '<a href="#" onclick="add_user_to_url(\''.addslashes($session['id']).'\',\''.addslashes($session['name']).' ('.addslashes($session['id']).')'.'\')">'.$session['name'].' </a><br />';
51 51
                 } else {
52 52
                     $return .= '...<br />';
53 53
                 }
Please login to merge, or discard this patch.
main/permissions/user_permissions.inc.php 2 patches
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -19,12 +19,10 @@  discard block
 block discarded – undo
19 19
     }
20 20
 }
21 21
 if (isset($_GET['action'])) {
22
-    if (isset($_GET['permission']) AND isset($_GET['tool']) AND ($_GET['action'] == 'grant' OR $_GET['action'] == 'revoke'))
23
-    {
22
+    if (isset($_GET['permission']) AND isset($_GET['tool']) AND ($_GET['action'] == 'grant' OR $_GET['action'] == 'revoke')) {
24 23
         $result_message = store_one_permission('user', $_GET['action'], $user_id, $_GET['tool'], $_GET['permission']);
25 24
     }
26
-    if (isset($_GET['role']) AND ($_GET['action'] == 'grant' OR $_GET['action'] == 'revoke'))
27
-    {
25
+    if (isset($_GET['role']) AND ($_GET['action'] == 'grant' OR $_GET['action'] == 'revoke')) {
28 26
         $result_message = assign_role('user', $_GET['action'], $user_id, $_GET['role'], $_GET['scope']);
29 27
     }
30 28
 }
@@ -45,13 +43,10 @@  discard block
 block discarded – undo
45 43
 // 			RETRIEVING THE PERMISSIONS OF THE GROUPS OF THE USER
46 44
 $groups_of_user = array();
47 45
 $groups_of_user = GroupManager::get_group_ids($_course['real_id'], $user_id);
48
-foreach ($groups_of_user as $group)
49
-{
46
+foreach ($groups_of_user as $group) {
50 47
     $this_group_permissions = get_permissions('group', $group);
51
-    foreach ($this_group_permissions as $tool=>$permissions)
52
-    {
53
-        foreach ($permissions as $permission)
54
-        {
48
+    foreach ($this_group_permissions as $tool=>$permissions) {
49
+        foreach ($permissions as $permission) {
55 50
             $inherited_group_permissions[$tool][] = $permission;
56 51
         }
57 52
     }
@@ -76,11 +71,9 @@  discard block
 block discarded – undo
76 71
     $inherited_permissions = permission_array_merge($inherited_permissions, $current_user_role_permissions_of_user);
77 72
 }
78 73
 //	RETRIEVING THE PERMISSIONS OF THE ROLES OF THE GROUPS OF THE USER
79
-if (api_get_setting('group_roles') == 'true')
80
-{
74
+if (api_get_setting('group_roles') == 'true') {
81 75
     // NOTE: DIT MOET NOG VERDER UITGEWERKT WORDEN
82
-    foreach ($groups_of_user as $group)
83
-    {
76
+    foreach ($groups_of_user as $group) {
84 77
         $this_current_group_role_permissions_of_user = get_roles_permissions('user', $user_id);
85 78
         //$inherited_permissions[$tool][]=$permission;
86 79
     }
@@ -89,20 +82,17 @@  discard block
 block discarded – undo
89 82
 // 			LIMITED OR FULL
90 83
 $current_user_permissions = limited_or_full($current_user_permissions);
91 84
 $inherited_permissions = limited_or_full($inherited_permissions);
92
-if (api_get_setting('permissions') == 'limited')
93
-{
85
+if (api_get_setting('permissions') == 'limited') {
94 86
     $header_array = $rights_limited;
95 87
 }
96
-if (api_get_setting('permissions') == 'full')
97
-{
88
+if (api_get_setting('permissions') == 'full') {
98 89
     $header_array = $rights_full;
99 90
 }
100 91
 
101 92
 echo "<form method=\"post\" action=\"".str_replace('&', '&amp;', $_SERVER['REQUEST_URI'])."\">";
102 93
 // 		DISPLAYING THE ROLES LIST
103 94
 
104
-if (api_get_setting('user_roles') == 'true')
105
-{
95
+if (api_get_setting('user_roles') == 'true') {
106 96
     // the list of the roles for the user
107 97
     echo '<strong>'.get_lang('UserRoles').'</strong><br />';
108 98
     $current_user_course_roles = get_roles('user', $user_id);
@@ -120,8 +110,7 @@  discard block
 block discarded – undo
120 110
 // the header
121 111
 echo "\t<tr>\n";
122 112
 echo "\t\t<th>".get_lang('Module')."</th>\n";
123
-foreach ($header_array as $header_key=>$header_value)
124
-{
113
+foreach ($header_array as $header_key=>$header_value) {
125 114
     echo "\t\t<th>".get_lang($header_value)."</th>\n";
126 115
 }
127 116
 echo "\t</tr>\n";
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
19 19
     }
20 20
 }
21 21
 if (isset($_GET['action'])) {
22
-    if (isset($_GET['permission']) AND isset($_GET['tool']) AND ($_GET['action'] == 'grant' OR $_GET['action'] == 'revoke'))
22
+    if (isset($_GET['permission']) and isset($_GET['tool']) and ($_GET['action'] == 'grant' or $_GET['action'] == 'revoke'))
23 23
     {
24 24
         $result_message = store_one_permission('user', $_GET['action'], $user_id, $_GET['tool'], $_GET['permission']);
25 25
     }
26
-    if (isset($_GET['role']) AND ($_GET['action'] == 'grant' OR $_GET['action'] == 'revoke'))
26
+    if (isset($_GET['role']) and ($_GET['action'] == 'grant' or $_GET['action'] == 'revoke'))
27 27
     {
28 28
         $result_message = assign_role('user', $_GET['action'], $user_id, $_GET['role'], $_GET['scope']);
29 29
     }
Please login to merge, or discard this patch.