Completed
Push — 1.10.x ( e39098...d9ba33 )
by Julito
34:46
created
plugin/jcapture/action.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -11,18 +11,18 @@
 block discarded – undo
11 11
  
12 12
 class action_plugin_jcapture extends DokuWiki_Action_Plugin {
13 13
  
14
-  /**
15
-   * return some info
16
-   */
17
-  function getInfo(){
14
+    /**
15
+     * return some info
16
+     */
17
+    function getInfo(){
18 18
     return array(
19
-                 'author' => 'Pavel Vlasov',
20
-                 'email'  => '[email protected]',
21
-                 'name'   => 'JCapture',
22
-                 'desc'   => 'Plugin for making screen captures.',
23
-                 'url'    => 'http://www.nasdanika.com/wiki/doku.php?id=products:jcapture:start',
24
-                 );
25
-  }
19
+                    'author' => 'Pavel Vlasov',
20
+                    'email'  => '[email protected]',
21
+                    'name'   => 'JCapture',
22
+                    'desc'   => 'Plugin for making screen captures.',
23
+                    'url'    => 'http://www.nasdanika.com/wiki/doku.php?id=products:jcapture:start',
24
+                    );
25
+    }
26 26
 
27 27
     /**
28 28
      * Register the eventhandlers
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@  discard block
 block discarded – undo
6 6
  */
7 7
  
8 8
 if (!defined('DOKU_INC')) die();
9
-if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/');
10
-require_once (DOKU_PLUGIN . 'action.php');
9
+if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC.'lib/plugins/');
10
+require_once (DOKU_PLUGIN.'action.php');
11 11
  
12 12
 class action_plugin_jcapture extends DokuWiki_Action_Plugin {
13 13
  
14 14
   /**
15 15
    * return some info
16 16
    */
17
-  function getInfo(){
17
+  function getInfo() {
18 18
     return array(
19 19
                  'author' => 'Pavel Vlasov',
20 20
                  'email'  => '[email protected]',
@@ -28,14 +28,14 @@  discard block
 block discarded – undo
28 28
      * Register the eventhandlers
29 29
      */
30 30
     function register(&$controller) {
31
-        $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ());
31
+        $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array());
32 32
     }
33 33
  
34 34
     /**
35 35
      * Inserts the toolbar button
36 36
      */
37 37
     function insert_button(& $event, $param) {
38
-        $event->data[] = array (
38
+        $event->data[] = array(
39 39
             'type' => 'JCapture',
40 40
             'title' => 'Screen capture',
41 41
             'icon' => '../../plugins/jcapture/camera.png',
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,12 @@
 block discarded – undo
5 5
  * @author Pavel Vlasov
6 6
  */
7 7
  
8
-if (!defined('DOKU_INC')) die();
9
-if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/');
8
+if (!defined('DOKU_INC')) {
9
+    die();
10
+}
11
+if (!defined('DOKU_PLUGIN')) {
12
+    define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/');
13
+}
10 14
 require_once (DOKU_PLUGIN . 'action.php');
11 15
  
12 16
 class action_plugin_jcapture extends DokuWiki_Action_Plugin {
Please login to merge, or discard this patch.
plugin/jcapture/upload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,9 +21,9 @@
 block discarded – undo
21 21
 $documentId = DocumentManager::get_document_id($courseInfo, '/'.$folderName);
22 22
 $path = null;
23 23
 if (empty($documentId)) {
24
-    $course_dir = $courseInfo['path'] . '/document';
24
+    $course_dir = $courseInfo['path'].'/document';
25 25
     $sys_course_path = api_get_path(SYS_COURSE_PATH);
26
-    $dir = $sys_course_path . $course_dir;
26
+    $dir = $sys_course_path.$course_dir;
27 27
     $createdDir = create_unexisting_directory(
28 28
         $courseInfo,
29 29
         api_get_user_id(),
Please login to merge, or discard this patch.
plugin/jcapture/applet.php 3 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',dirname(__FILE__).'/../../../');
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',dirname(__FILE__).'/../../../');
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.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php 
2 2
 
3 3
 	//fix for Opera XMLHttpRequests
4
-	if(!count($_POST) && $HTTP_RAW_POST_DATA){
4
+	if (!count($_POST) && $HTTP_RAW_POST_DATA) {
5 5
 	  parse_str($HTTP_RAW_POST_DATA, $_POST);
6 6
 	}
7 7
 	
8
-	if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../../');
8
+	if (!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__).'/../../../');
9 9
 	require_once(DOKU_INC.'inc/init.php');
10 10
 	require_once(DOKU_INC.'inc/common.php');
11 11
 	require_once(DOKU_INC.'inc/pageutils.php');
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 	$cookies;
23 23
 	foreach (array_keys($_COOKIE) as $cookieName) {
24
-		$cookies.=bin2hex($cookieName)."=".bin2hex($_COOKIE[$cookieName]).";";
24
+		$cookies .= bin2hex($cookieName)."=".bin2hex($_COOKIE[$cookieName]).";";
25 25
 	} 
26 26
 	
27 27
 	$pageName = $_GET["pageName"];
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',dirname(__FILE__).'/../../../');
8
+	if(!defined('DOKU_INC')) {
9
+	    define('DOKU_INC',dirname(__FILE__).'/../../../');
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/jcapture/plugin_applet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 $imageFormat = "PNG";
25 25
 $cookies = null;
26 26
 foreach (array_keys($_COOKIE) as $cookieName) {
27
-    $cookies.=bin2hex($cookieName)."=".bin2hex($_COOKIE[$cookieName]).";";
27
+    $cookies .= bin2hex($cookieName)."=".bin2hex($_COOKIE[$cookieName]).";";
28 28
 }
29 29
 
30 30
 $pageName = 'file';
Please login to merge, or discard this patch.
plugin/ticket/src/ticket_details.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -433,7 +433,7 @@
 block discarded – undo
433 433
         $form->addElement(
434 434
             'checkbox',
435 435
             'confirmation',
436
-             null,
436
+                null,
437 437
             $plugin->get_lang('RequestConfirmation')
438 438
         );
439 439
     }
Please login to merge, or discard this patch.
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 		width: 600,
31 31
 		modal: true,
32 32
 		buttons: {
33
-                    ' . get_lang('Accept') . ': function(){
33
+                    ' . get_lang('Accept').': function(){
34 34
                         $("#frmResponsable").submit()
35 35
                     },
36
-                    ' . ucfirst(get_lang('Close')) . ': function() {
36
+                    ' . ucfirst(get_lang('Close')).': function() {
37 37
                         $(this).dialog("close");
38 38
                     }
39 39
                 }
@@ -44,37 +44,37 @@  discard block
 block discarded – undo
44 44
         });
45 45
 
46 46
         $("input#responseyes").click(function () {
47
-            if(!confirm("' . $plugin->get_lang('AreYouSure') . ' : ' . strtoupper(get_lang('Yes')) . '. ' . $plugin->get_lang('IfYouAreSureTheTicketWillBeClosed') . '")){
47
+            if(!confirm("' . $plugin->get_lang('AreYouSure').' : '.strtoupper(get_lang('Yes')).'. '.$plugin->get_lang('IfYouAreSureTheTicketWillBeClosed').'")){
48 48
                 return false;
49 49
             }
50 50
         });
51 51
 
52 52
         $("input#responseno").click(function () {
53
-            if(!confirm("' . $plugin->get_lang('AreYouSure') . ' : ' . strtoupper(get_lang('No')) . '")){
53
+            if(!confirm("' . $plugin->get_lang('AreYouSure').' : '.strtoupper(get_lang('No')).'")){
54 54
                 return false;
55 55
             }
56 56
         });
57 57
 
58 58
         $("#unassign").click(function () {
59
-            if (!confirm("' . $plugin->get_lang('AreYouSureYouWantToUnassignTheTicket') . '")) {
59
+            if (!confirm("' . $plugin->get_lang('AreYouSureYouWantToUnassignTheTicket').'")) {
60 60
                 return false;
61 61
             }
62 62
         });
63 63
 
64 64
         $("#close").click(function () {
65
-            if (!confirm("' . $plugin->get_lang('AreYouSureYouWantToCloseTheTicket') . '")) {
65
+            if (!confirm("' . $plugin->get_lang('AreYouSureYouWantToCloseTheTicket').'")) {
66 66
                 return false;
67 67
             }
68 68
         });
69 69
 
70
-    ' . $disableReponseButtons . '
70
+    ' . $disableReponseButtons.'
71 71
 });
72 72
 
73 73
 function validate() {
74 74
     fckEditor1val = CKEDITOR.instances["content"].getData();
75 75
     document.getElementById("content").value= fckEditor1val;
76 76
     if(fckEditor1val == ""){
77
-        alert("' . $plugin->get_lang('YouMustWriteAMessage') . '");
77
+        alert("' . $plugin->get_lang('YouMustWriteAMessage').'");
78 78
         return false;
79 79
     }
80 80
 }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     });
118 118
 
119 119
     img_remove = $("<img/>", {
120
-        src: "' . api_get_path(WEB_CODE_PATH) . 'img/delete.gif"
120
+        src: "' . api_get_path(WEB_CODE_PATH).'img/delete.gif"
121 121
     });
122 122
 
123 123
     new_filepath_id = $("#filepath_" + counter_image);
@@ -239,22 +239,22 @@  discard block
 block discarded – undo
239 239
     if ($ticket['ticket']['status_id'] != 'REE' && $ticket['ticket']['status_id'] != 'CLS' && $isAdmin) {
240 240
         if (intval($ticket['ticket']['assigned_last_user']) == $user_id) {
241 241
             if ($ticket['ticket']['status_id'] != 'CLS') {
242
-                $form_close_ticket.= '<form enctype="multipart/form-data" action="' . api_get_self() . '?ticket_id=' . $ticket['ticket']['ticket_id'] . '" method="post" name="close_ticket" id="close_ticket" >';
243
-                $form_close_ticket.= '<input type="hidden" name="ticket_id" value="' . $ticket['ticket']['ticket_id'] . '"/>
244
-                                        <button class="minus" name="close" type="submit" id="close" >' . get_lang('Close') . '</button>';
245
-                $form_close_ticket.= '</form>';
242
+                $form_close_ticket .= '<form enctype="multipart/form-data" action="'.api_get_self().'?ticket_id='.$ticket['ticket']['ticket_id'].'" method="post" name="close_ticket" id="close_ticket" >';
243
+                $form_close_ticket .= '<input type="hidden" name="ticket_id" value="'.$ticket['ticket']['ticket_id'].'"/>
244
+                                        <button class="minus" name="close" type="submit" id="close" >' . get_lang('Close').'</button>';
245
+                $form_close_ticket .= '</form>';
246 246
             }
247 247
         }
248 248
     }
249
-    $titulo = '<center><h1>Ticket #' . $ticket['ticket']['ticket_code'] . '</h1></center>';
249
+    $titulo = '<center><h1>Ticket #'.$ticket['ticket']['ticket_code'].'</h1></center>';
250 250
     $img_assing = '';
251 251
     if ($isAdmin && $ticket['ticket']['status_id'] != 'CLS' && $ticket['ticket']['status_id'] != 'REE') {
252 252
         if ($ticket['ticket']['assigned_last_user'] != 0 && $ticket['ticket']['assigned_last_user'] == $user_id) {
253
-            $img_assing = '<a href="' . api_get_self() . '?ticket_id=' . $ticket['ticket']['ticket_id'] . '&amp;action=unassign" id="unassign">
254
-                            <img src="' . api_get_path(WEB_CODE_PATH) . 'img/admin_star.png"  style="height: 32px; width: 32px;" border="0" title="Unassign" align="center"/>
253
+            $img_assing = '<a href="'.api_get_self().'?ticket_id='.$ticket['ticket']['ticket_id'].'&amp;action=unassign" id="unassign">
254
+                            <img src="' . api_get_path(WEB_CODE_PATH).'img/admin_star.png"  style="height: 32px; width: 32px;" border="0" title="Unassign" align="center"/>
255 255
                            </a>';
256 256
         } else {
257
-            $img_assing = '<a href="#" id="assign"><img src="' . api_get_path(WEB_CODE_PATH) . 'img/admin_star_na.png" style="height: 32px; width: 32px;" title="Assign" align="center"/></a>';
257
+            $img_assing = '<a href="#" id="assign"><img src="'.api_get_path(WEB_CODE_PATH).'img/admin_star_na.png" style="height: 32px; width: 32px;" title="Assign" align="center"/></a>';
258 258
         }
259 259
     }
260 260
     $bold = '';
@@ -271,39 +271,39 @@  discard block
 block discarded – undo
271 271
     echo '<div style="margin-left:20%;margin-right:20%;">
272 272
 			<table width="100%" >
273 273
 				<tr>
274
-	              <td colspan="3" style="width:65%">' . $titulo . '</td>
275
-	              <td style="width: 15%">' . $img_assing . '</td>
276
-	              <td style="width: 15%">' . $form_close_ticket . '</td>
274
+	              <td colspan="3" style="width:65%">' . $titulo.'</td>
275
+	              <td style="width: 15%">' . $img_assing.'</td>
276
+	              <td style="width: 15%">' . $form_close_ticket.'</td>
277 277
 	            </tr>
278 278
 	         	<tr>
279
-	              <td style="width:45%;" ><p>' . get_lang('Sent') . ': ' . $ticket['ticket']['start_date'] . '</p></td>
279
+	              <td style="width:45%;" ><p>' . get_lang('Sent').': '.$ticket['ticket']['start_date'].'</p></td>
280 280
 	              <td style="width:50px;"></td>
281
-	              <td style="width:45%;" ><p>' . $plugin->get_lang('LastResponse') . ': ' . $ticket['ticket']['sys_lastedit_datetime'] . '</p></td>
281
+	              <td style="width:45%;" ><p>' . $plugin->get_lang('LastResponse').': '.$ticket['ticket']['sys_lastedit_datetime'].'</p></td>
282 282
 	              <td colspan="2"></td>
283 283
 	            </tr>
284 284
 	            <tr>
285
-	               <td><p>' . get_lang('Subject') . ': ' . $ticket['messages'][0]['subject'] . '</p></td>
285
+	               <td><p>' . get_lang('Subject').': '.$ticket['messages'][0]['subject'].'</p></td>
286 286
 	               <td></td>
287
-	               <td><p ' . $bold . '>' . get_lang('Status') . ': ' . $ticket['ticket']['status'] . '</p></td>
287
+	               <td><p ' . $bold.'>'.get_lang('Status').': '.$ticket['ticket']['status'].'</p></td>
288 288
 	               <td colspan="2"></td>
289 289
 	            </tr>
290 290
 	            <tr>
291
-	                <td><p>' . get_lang('Category') . ': ' . $ticket['ticket']['name'] . '</p></td>
291
+	                <td><p>' . get_lang('Category').': '.$ticket['ticket']['name'].'</p></td>
292 292
 	                <td></td>
293
-	                <td ><p>' . $plugin->get_lang('Priority') . ':' . $ticket['ticket']['priority'] . '<p></td>
293
+	                <td ><p>' . $plugin->get_lang('Priority').':'.$ticket['ticket']['priority'].'<p></td>
294 294
 	                <td colspan="2"></td>
295 295
 	            </tr>';
296 296
     if ($ticket['ticket']['course_url'] != null) {
297 297
         echo '<tr>
298
-				<td><p>' . get_lang('Course') . ':</p></td>
298
+				<td><p>' . get_lang('Course').':</p></td>
299 299
 	            <td></td>
300
-			    <td>' . $ticket['ticket']['course_url'] . '</td>
300
+			    <td>' . $ticket['ticket']['course_url'].'</td>
301 301
 	            <td colspan="2"></td>
302 302
 	          </tr>';
303 303
     }
304 304
     if ($isAdmin) {
305 305
         echo '<tr>
306
-		<td><p>' . get_lang('User') . ': &nbsp;' . $user_info = $ticket['ticket']['user_url'] . ' (' . $ticket['usuario']['username'] . ')</p></td>
306
+		<td><p>' . get_lang('User').': &nbsp;'.$user_info = $ticket['ticket']['user_url'].' ('.$ticket['usuario']['username'].')</p></td>
307 307
  	      </tr>';
308 308
     }
309 309
     //select admins
@@ -311,15 +311,15 @@  discard block
 block discarded – undo
311 311
 
312 312
     $admins = UserManager::get_user_list_like(array("status" => "1"), array("username"), true);
313 313
     foreach ($admins as $admin) {
314
-        $select_admins.= "<option value = '" . $admin['user_id'] . "' " . (($user_id == $admin['user_id']) ? ("selected='selected'") : "") . ">" . $admin['lastname'] . " ," . $admin['firstname'] . "</option>";
314
+        $select_admins .= "<option value = '".$admin['user_id']."' ".(($user_id == $admin['user_id']) ? ("selected='selected'") : "").">".$admin['lastname']." ,".$admin['firstname']."</option>";
315 315
     }
316 316
     $select_admins .= "</select>";
317
-    echo '<div id="dialog-form" title="' . $plugin->get_lang('AssignTicket') . '" >';
318
-    echo '<form id="frmResponsable" method="POST" action="ticket_details.php?ticket_id=' . $ticket['ticket']['ticket_id'] . '">
317
+    echo '<div id="dialog-form" title="'.$plugin->get_lang('AssignTicket').'" >';
318
+    echo '<form id="frmResponsable" method="POST" action="ticket_details.php?ticket_id='.$ticket['ticket']['ticket_id'].'">
319 319
 			<input type="hidden" name ="action" id="action" value="assign"/>
320 320
 			<div>
321
-				<div class="label">' . get_lang('Responsable') . ':</div>
322
-				<div class="formw">' . $select_admins . '</div>
321
+				<div class="label">' . get_lang('Responsable').':</div>
322
+				<div class="formw">' . $select_admins.'</div>
323 323
 			</div>
324 324
 		  </form>';
325 325
     echo '</div>';
@@ -333,13 +333,13 @@  discard block
 block discarded – undo
333 333
         if ($message['admin']) {
334 334
             $type = "normal";
335 335
             if ($isAdmin) {
336
-                $message['message'].='<br/><b>' . $plugin->get_lang('AttendedBy') . ': ' . $message['user_created'] . " - " . api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()) . "</b>";
336
+                $message['message'] .= '<br/><b>'.$plugin->get_lang('AttendedBy').': '.$message['user_created']." - ".api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone())."</b>";
337 337
             }
338
-        }else {
339
-            $message['message'].='<b>' . get_lang('Sent') . ': ' . api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()) . "</b>";
338
+        } else {
339
+            $message['message'] .= '<b>'.get_lang('Sent').': '.api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone())."</b>";
340 340
         }
341 341
 
342
-        $receivedMessage = '<b>' . get_lang('Subject') . ': </b> ' . $message['subject'] . '<br/> <b>' . get_lang('Message') . ':</b>' . $message['message'] . '<br/>';
342
+        $receivedMessage = '<b>'.get_lang('Subject').': </b> '.$message['subject'].'<br/> <b>'.get_lang('Message').':</b>'.$message['message'].'<br/>';
343 343
         $attachementLinks = "";
344 344
 
345 345
         if (isset($message['atachments'])) {
@@ -351,12 +351,12 @@  discard block
 block discarded – undo
351 351
             }
352 352
         }
353 353
 
354
-        $entireMessage = $receivedMessage . $attachementLinks;
354
+        $entireMessage = $receivedMessage.$attachementLinks;
355 355
         echo Display::return_message($entireMessage, $type, false);
356 356
     }
357 357
     echo "</div>";
358 358
     echo "</div>";
359
-    $subject = get_lang('ReplyShort') .": " . $message['subject'];
359
+    $subject = get_lang('ReplyShort').": ".$message['subject'];
360 360
     $user_admin = api_is_platform_admin();
361 361
     if ($ticket['ticket']['status_id'] != 'REE' AND $ticket['ticket']['status_id'] != 'CLS') {
362 362
         if (!$isAdmin && $ticket['ticket']['status_id'] != 'XCF') {
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
     $file_attachments = $_FILES;
380 380
     $user_id = api_get_user_id();
381 381
     TicketManager::insert_message($ticket_id, $subject, $content, $file_attachments, $user_id, 'NOL', $mensajeconfirmacion);
382
-    header("location:" . api_get_self() . "?ticket_id=" . $ticket_id);
382
+    header("location:".api_get_self()."?ticket_id=".$ticket_id);
383 383
     exit;
384 384
 }
385 385
 
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
     $form = new FormValidator(
396 396
         'send_ticket',
397 397
         'POST',
398
-        api_get_self() . '?ticket_id=' . $ticket['ticket']['ticket_id'],
398
+        api_get_self().'?ticket_id='.$ticket['ticket']['ticket_id'],
399 399
         '',
400 400
         array(
401 401
             'enctype' => 'multipart/form-data',
@@ -446,9 +446,9 @@  discard block
 block discarded – undo
446 446
 
447 447
     $form->addElement('html', '<div class="controls">');
448 448
     $form->addElement('html', '<span id="link-more-attach" >');
449
-    $form->addElement('html', '<span class="label label-info" onclick="return add_image_form()">' . get_lang('AddOneMoreFile') . '</span>');
449
+    $form->addElement('html', '<span class="label label-info" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</span>');
450 450
     $form->addElement('html', '</span>');
451
-    $form->addElement('html', '(' . sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))) . ')');
451
+    $form->addElement('html', '('.sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))).')');
452 452
 
453 453
     $form->addElement('html', '<br/>');
454 454
     $form->addElement(
Please login to merge, or discard this patch.
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -209,13 +209,15 @@  discard block
 block discarded – undo
209 209
     $action = $_REQUEST['action'];
210 210
     switch ($action) {
211 211
         case 'assign':
212
-            if (api_is_platform_admin() && isset($_GET['ticket_id']))
213
-                TicketManager::assign_ticket_user($_GET['ticket_id'], $_POST['admins']);
212
+            if (api_is_platform_admin() && isset($_GET['ticket_id'])) {
213
+                            TicketManager::assign_ticket_user($_GET['ticket_id'], $_POST['admins']);
214
+            }
214 215
             $ticket['ticket']['assigned_last_user'] = $_POST['admins'];
215 216
             break;
216 217
         case 'unassign':
217
-            if (api_is_platform_admin() && isset($_GET['ticket_id']))
218
-                TicketManager::assign_ticket_user($_GET['ticket_id'], 0);
218
+            if (api_is_platform_admin() && isset($_GET['ticket_id'])) {
219
+                            TicketManager::assign_ticket_user($_GET['ticket_id'], 0);
220
+            }
219 221
             $ticket['ticket']['assigned_last_user'] = 0;
220 222
             break;
221 223
         default:
@@ -335,7 +337,7 @@  discard block
 block discarded – undo
335 337
             if ($isAdmin) {
336 338
                 $message['message'].='<br/><b>' . $plugin->get_lang('AttendedBy') . ': ' . $message['user_created'] . " - " . api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()) . "</b>";
337 339
             }
338
-        }else {
340
+        } else {
339 341
             $message['message'].='<b>' . get_lang('Sent') . ': ' . api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()) . "</b>";
340 342
         }
341 343
 
Please login to merge, or discard this patch.
plugin/ticket/src/new_ticket.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -563,7 +563,7 @@
 block discarded – undo
563 563
         $photo = '<img src="' . $userPicture. '" alt="' . api_get_person_name($user[2], $user[3]) . '" title="' . api_get_person_name($user[2], $user[3]) . '" />';
564 564
         $button = '<a  href="javascript:void(0)" onclick="load_course_list(\'div_' . $user_id . '\',' . $user_id . ', \'' . $user[5] . '\')">'
565 565
                     . Display::return_icon('view_more_stats.gif', get_lang('Info')) .
566
-                   '</a>&nbsp;&nbsp;';
566
+                    '</a>&nbsp;&nbsp;';
567 567
         $users[] = array(
568 568
             $photo,
569 569
             $user_id,
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 if (!api_is_platform_admin() &&
13 13
     $plugin->get('allow_student_add') != 'true'
14 14
 ) {
15
-    header('location:' . api_get_path(WEB_PLUGIN_PATH) . PLUGIN_NAME . '/src/myticket.php');
15
+    header('location:'.api_get_path(WEB_PLUGIN_PATH).PLUGIN_NAME.'/src/myticket.php');
16 16
     exit;
17 17
 }
18 18
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             $("#user_id_request").val(my_user_id);
39 39
             $("#personal_email").val(user_email);
40 40
             $("#btnsubmit").attr("disabled", false);
41
-            ' . $scrollTol . '
41
+            ' . $scrollTol.'
42 42
         }
43 43
     });
44 44
 }
@@ -74,22 +74,22 @@  discard block
 block discarded – undo
74 74
     var selected = document.getElementById("category_id").selectedIndex;
75 75
     var id = document.getElementById("category_id").options[selected].value;
76 76
     if (document.getElementById("user_id_request").value == "") {
77
-        alert("' . $plugin->get_lang("ValidUser") . '");
77
+        alert("' . $plugin->get_lang("ValidUser").'");
78 78
         return false;
79 79
     } else if(id == 0) {
80
-        alert("' . $plugin->get_lang("ValidType") . '");
80
+        alert("' . $plugin->get_lang("ValidType").'");
81 81
         return false;
82 82
     } else if(document.getElementById("subject").value == "") {
83
-        alert("' . $plugin->get_lang("ValidSubject") . '");
83
+        alert("' . $plugin->get_lang("ValidSubject").'");
84 84
         return false;
85 85
     } else if(parseInt(course_required[id]) == 1 && document.getElementById("course_id").value == 0) {
86
-        alert("' . $plugin->get_lang("ValidCourse") . '");
86
+        alert("' . $plugin->get_lang("ValidCourse").'");
87 87
         return false;
88 88
     } else if(id != "CUR" && parseInt(course_required[id]) != 1  && !re.test(document.getElementById("personal_email").value)) {
89
-        alert("' . $plugin->get_lang("ValidEmail") . '");
89
+        alert("' . $plugin->get_lang("ValidEmail").'");
90 90
         return false;
91 91
     } else if(fckEditor1val == "") {
92
-        alert("' . $plugin->get_lang("ValidMessage") . '");
92
+        alert("' . $plugin->get_lang("ValidMessage").'");
93 93
         return false;
94 94
     }
95 95
 }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     });
133 133
 
134 134
     img_remove = $("<img/>", {
135
-        src: "' . api_get_path(WEB_CODE_PATH) . 'img/delete.gif"
135
+        src: "' . api_get_path(WEB_CODE_PATH).'img/delete.gif"
136 136
     });
137 137
 
138 138
     new_filepath_id = $("#filepath_" + counter_image);
@@ -162,10 +162,10 @@  discard block
 block discarded – undo
162 162
 </style>';
163 163
 $types = TicketManager::get_all_tickets_categories();
164 164
 $htmlHeadXtra[] = '<script language="javascript">
165
-    var projects = ' . js_array($types, 'projects', 'project_id') . '
166
-    var course_required = ' . js_array($types, 'course_required', 'course_required') . '
167
-    var other_area = ' . js_array($types, 'other_area', 'other_area') . '
168
-    var email = ' . js_array($types, 'email', 'email') .
165
+    var projects = ' . js_array($types, 'projects', 'project_id').'
166
+    var course_required = ' . js_array($types, 'course_required', 'course_required').'
167
+    var other_area = ' . js_array($types, 'other_area', 'other_area').'
168
+    var email = ' . js_array($types, 'email', 'email').
169 169
 '</script>';
170 170
 
171 171
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
  */
176 176
 function js_str($s)
177 177
 {
178
-    return '"' . addcslashes($s, "\0..\37\"\\") . '"';
178
+    return '"'.addcslashes($s, "\0..\37\"\\").'"';
179 179
 }
180 180
 
181 181
 /**
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 {
189 189
     $return = "new Array(); ";
190 190
     foreach ($array as $value) {
191
-        $return .= $name . "['" . $value['category_id'] . "'] ='" . $value[$key] . "'; ";
191
+        $return .= $name."['".$value['category_id']."'] ='".$value[$key]."'; ";
192 192
     }
193 193
 
194 194
     return $return;
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     // Category List
206 206
     $categoryList = array();
207 207
     foreach ($types as $type) {
208
-        $categoryList[$type['category_id']] = $type['name'] . ": " . $type['description'];
208
+        $categoryList[$type['category_id']] = $type['name'].": ".$type['description'];
209 209
     }
210 210
 
211 211
     // Status List
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
     $form->addElement(
379 379
         'text',
380 380
         'phone',
381
-        get_lang('Phone') . ' (' . $plugin->get_lang('Optional') . ')',
381
+        get_lang('Phone').' ('.$plugin->get_lang('Optional').')',
382 382
         array(
383 383
             'id' => 'phone'
384 384
         )
@@ -403,9 +403,9 @@  discard block
 block discarded – undo
403 403
 
404 404
     $form->addElement('html', '<div class="controls">');
405 405
     $form->addElement('html', '<span id="link-more-attach" >');
406
-    $form->addElement('html', '<span class="label label-info" onclick="return add_image_form()">' . get_lang('AddOneMoreFile') . '</span>');
406
+    $form->addElement('html', '<span class="label label-info" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</span>');
407 407
     $form->addElement('html', '</span>');
408
-    $form->addElement('html', '(' . sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))) . ')');
408
+    $form->addElement('html', '('.sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))).')');
409 409
 
410 410
     $form->addElement('html', '<br/>');
411 411
     $form->addElement(
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
     $category_id = $_POST['category_id'];
434 434
     $content = $_POST['content'];
435 435
     if ($_POST['phone'] != "") {
436
-        $content .= '<p style="color:red">&nbsp;' . get_lang('Phone') . ': ' . Security::remove_XSS($_POST['phone']). '</p>';
436
+        $content .= '<p style="color:red">&nbsp;'.get_lang('Phone').': '.Security::remove_XSS($_POST['phone']).'</p>';
437 437
     }
438 438
     $course_id = $_POST['course_id'];
439 439
     $project_id = $_POST['project_id'];
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
         $responsible
465 465
     )
466 466
     ) {
467
-        header('location:' . api_get_path(WEB_PLUGIN_PATH) . PLUGIN_NAME . '/src/myticket.php?message=success');
467
+        header('location:'.api_get_path(WEB_PLUGIN_PATH).PLUGIN_NAME.'/src/myticket.php?message=success');
468 468
         exit;
469 469
     } else {
470 470
         Display::display_header(get_lang('ComposeMessage'));
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
     $sql = "SELECT COUNT(u.user_id) AS total_number_of_items FROM $user_table u";
484 484
     if ((api_is_platform_admin() || api_is_session_admin()) && api_get_multiple_access_url()) {
485 485
         $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
486
-        $sql.= " INNER JOIN $access_url_rel_user_table url_rel_user ON (u.user_id=url_rel_user.user_id)";
486
+        $sql .= " INNER JOIN $access_url_rel_user_table url_rel_user ON (u.user_id=url_rel_user.user_id)";
487 487
     }
488 488
     if (isset($_GET['keyword'])) {
489 489
         $keyword = Database::escape_string(trim($_GET['keyword']));
@@ -560,9 +560,9 @@  discard block
 block discarded – undo
560 560
     while ($user = Database::fetch_row($res)) {
561 561
         $user_id = $user[0];
562 562
         $userPicture = UserManager::getUserPicture($user_id);
563
-        $photo = '<img src="' . $userPicture. '" alt="' . api_get_person_name($user[2], $user[3]) . '" title="' . api_get_person_name($user[2], $user[3]) . '" />';
564
-        $button = '<a  href="javascript:void(0)" onclick="load_course_list(\'div_' . $user_id . '\',' . $user_id . ', \'' . $user[5] . '\')">'
565
-                    . Display::return_icon('view_more_stats.gif', get_lang('Info')) .
563
+        $photo = '<img src="'.$userPicture.'" alt="'.api_get_person_name($user[2], $user[3]).'" title="'.api_get_person_name($user[2], $user[3]).'" />';
564
+        $button = '<a  href="javascript:void(0)" onclick="load_course_list(\'div_'.$user_id.'\','.$user_id.', \''.$user[5].'\')">'
565
+                    . Display::return_icon('view_more_stats.gif', get_lang('Info')).
566 566
                    '</a>&nbsp;&nbsp;';
567 567
         $users[] = array(
568 568
             $photo,
@@ -586,10 +586,10 @@  discard block
 block discarded – undo
586 586
         echo '
587 587
             <div class="actions">
588 588
               <span style="float: right;">&nbsp;</span>
589
-              <form id="search_simple" name="search_simple" method="get" action="' . api_get_self() . '" class="form-search">
589
+              <form id="search_simple" name="search_simple" method="get" action="' . api_get_self().'" class="form-search">
590 590
                 <fieldset>
591
-                <span><label for="keyword">' . get_lang('SearchAUser') . ': &nbsp;</label><input type="text" name="keyword" size="25"></span>
592
-                <span><button type="submit" name="submit" class="btn btn">' . get_lang('Search') . '</button></span>
591
+                <span><label for="keyword">' . get_lang('SearchAUser').': &nbsp;</label><input type="text" name="keyword" size="25"></span>
592
+                <span><button type="submit" name="submit" class="btn btn">' . get_lang('Search').'</button></span>
593 593
                 <div class="clear"></div>
594 594
                 </fieldset>
595 595
               </form>
Please login to merge, or discard this patch.
plugin/ticket/src/myticket.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
                     Display::return_icon('add.png', $plugin->get_lang('TckNew'), '', '32') . '</a>' .
294 294
                 '<a href="' . api_get_self() . '?action=export' . $get_parameter . $get_parameter2 . '">' .
295 295
                     Display::return_icon('export_excel.png', get_lang('Export'), '', '32') . '</a>' .
296
-             '</span>';
296
+                '</span>';
297 297
     }
298 298
     $form->display();
299 299
     echo '</div>';
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
                 '<a href="' . api_get_path(WEB_PLUGIN_PATH) . 'ticket/src/new_ticket.php">' .
386 386
                     Display::return_icon('add.png', $plugin->get_lang('TckNew'), '', '32') .
387 387
                 '</a>' .
388
-              '</span>';
388
+                '</span>';
389 389
         echo '<span style="float:right;">' .
390 390
         '</span>';
391 391
         echo '</div>';
Please login to merge, or discard this patch.
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     $.ajax({
24 24
         contentType: "application/x-www-form-urlencoded",
25 25
         beforeSend: function(object) {
26
-        $("div#"+div_course).html("<img src=\'' . $webLibPath . 'javascript/indicator.gif\' />"); },
26
+        $("div#"+div_course).html("<img src=\'' . $webLibPath.'javascript/indicator.gif\' />"); },
27 27
         type: "POST",
28 28
         url: "ticket_assign_log.php",
29 29
         data: "ticket_id="+ticket_id,
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 }
41 41
 
42 42
 $(function() {
43
-    $( "#keyword_start_date_start" ).datepicker({ dateFormat: ' . "'dd/mm/yy'" . ' });
44
-    $( "#keyword_start_date_end" ).datepicker({ dateFormat: ' . "'dd/mm/yy'" . ' });
43
+    $( "#keyword_start_date_start" ).datepicker({ dateFormat: ' . "'dd/mm/yy'".' });
44
+    $( "#keyword_start_date_end" ).datepicker({ dateFormat: ' . "'dd/mm/yy'".' });
45 45
 });
46 46
 
47 47
 $(document).ready(function() {
@@ -51,10 +51,10 @@  discard block
 block discarded – undo
51 51
 function display_advanced_search_form () {
52 52
     if ($("#advanced_search_form").css("display") == "none") {
53 53
         $("#advanced_search_form").css("display","block");
54
-        $("#img_plus_and_minus").html(\'&nbsp;' . Display::return_icon('div_hide.gif', get_lang('Hide'), array('style' => 'vertical-align:middle')) . '&nbsp;' . get_lang('AdvancedSearch') . '\');
54
+        $("#img_plus_and_minus").html(\'&nbsp;' . Display::return_icon('div_hide.gif', get_lang('Hide'), array('style' => 'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
55 55
     } else {
56 56
         $("#advanced_search_form").css("display","none");
57
-        $("#img_plus_and_minus").html(\'&nbsp;' . Display::return_icon('div_show.gif', get_lang('Show'), array('style' => 'vertical-align:middle')) . '&nbsp;' . get_lang('AdvancedSearch') . '\');
57
+        $("#img_plus_and_minus").html(\'&nbsp;' . Display::return_icon('div_show.gif', get_lang('Show'), array('style' => 'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
58 58
     }
59 59
 }
60 60
 </script>
@@ -237,42 +237,42 @@  discard block
 block discarded – undo
237 237
     }
238 238
     //select categories
239 239
     $select_types = '<select class="chzn-select" name = "keyword_category" id="keyword_category" ">';
240
-    $select_types .= '<option value="">---' . get_lang('Select') . '---</option>';
240
+    $select_types .= '<option value="">---'.get_lang('Select').'---</option>';
241 241
     $types = TicketManager::get_all_tickets_categories();
242 242
     foreach ($types as $type) {
243
-        $select_types.= "<option value = '" . $type['category_id'] . "'>" . $type['name'] . "</option>";
243
+        $select_types .= "<option value = '".$type['category_id']."'>".$type['name']."</option>";
244 244
     }
245 245
     $select_types .= "</select>";
246 246
     //select admins
247 247
     $select_admins = '<select  class ="chzn-select" name = "keyword_admin" id="keyword_admin" ">';
248
-    $select_admins .= '<option value="">---' . get_lang('Select') . '---</option>';
249
-    $select_admins .= '<option value = "0">' . $plugin->get_lang('Unassigned') . '</option>';
248
+    $select_admins .= '<option value="">---'.get_lang('Select').'---</option>';
249
+    $select_admins .= '<option value = "0">'.$plugin->get_lang('Unassigned').'</option>';
250 250
     $admins = UserManager::get_user_list_like(array("status" => "1"), array("username"), true);
251 251
     foreach ($admins as $admin) {
252
-        $select_admins.= "<option value = '" . $admin['user_id'] . "'>" . $admin['lastname'] . " ," . $admin['firstname'] . "</option>";
252
+        $select_admins .= "<option value = '".$admin['user_id']."'>".$admin['lastname']." ,".$admin['firstname']."</option>";
253 253
     }
254 254
     $select_admins .= "</select>";
255 255
     //select status
256 256
     $select_status = '<select  class ="chzn-select" name = "keyword_status" id="keyword_status" >';
257
-    $select_status .= '<option value="">---' . get_lang('Select') . '---</option>';
257
+    $select_status .= '<option value="">---'.get_lang('Select').'---</option>';
258 258
     $status = TicketManager::get_all_tickets_status();
259 259
     foreach ($status as $stat) {
260
-        $select_status.= "<option value = '" . $stat['status_id'] . "'>" . $stat['name'] . "</option>";
260
+        $select_status .= "<option value = '".$stat['status_id']."'>".$stat['name']."</option>";
261 261
     }
262 262
     $select_status .= "</select>";
263 263
     //select priority
264 264
     $select_priority = '<select  name = "keyword_priority" id="keyword_priority" >';
265
-    $select_priority .= '<option value="">' . get_lang('All') . '</option>';
266
-    $select_priority .= '<option value="NRM">' . $plugin->get_lang('PriorityNormal') . '</option>';
267
-    $select_priority .= '<option value="HGH">' . $plugin->get_lang('PriorityHigh') . '</option>';
268
-    $select_priority .= '<option value="LOW">' . $plugin->get_lang('PriorityLow') . '</option>';
265
+    $select_priority .= '<option value="">'.get_lang('All').'</option>';
266
+    $select_priority .= '<option value="NRM">'.$plugin->get_lang('PriorityNormal').'</option>';
267
+    $select_priority .= '<option value="HGH">'.$plugin->get_lang('PriorityHigh').'</option>';
268
+    $select_priority .= '<option value="LOW">'.$plugin->get_lang('PriorityLow').'</option>';
269 269
     $select_priority .= "</select>";
270 270
 
271 271
     //select unread
272 272
     $select_unread = '<select  name = "keyword_unread" id="keyword_unread" >';
273
-    $select_unread .= '<option value="">' . get_lang('All') . '</option>';
274
-    $select_unread .= '<option value="yes">' . $plugin->get_lang('Unread') . '</option>';
275
-    $select_unread .= '<option value="no">' . $plugin->get_lang('Read')  . '</option>';
273
+    $select_unread .= '<option value="">'.get_lang('All').'</option>';
274
+    $select_unread .= '<option value="yes">'.$plugin->get_lang('Unread').'</option>';
275
+    $select_unread .= '<option value="no">'.$plugin->get_lang('Read').'</option>';
276 276
     $select_unread .= "</select>";
277 277
     // Create a search-box
278 278
     $form = new FormValidator('search_simple', 'get', '', '', null, false);
@@ -283,49 +283,49 @@  discard block
 block discarded – undo
283 283
     $form->addElement('static', 'search_advanced_link', null,
284 284
             '<a href="javascript://" class = "advanced-parameters" onclick="display_advanced_search_form();">'
285 285
             . '<span id="img_plus_and_minus">&nbsp;'
286
-            . Display::return_icon('div_show.gif', get_lang('Show')) . ' '
287
-            . get_lang('AdvancedSearch') . '</span></a>');
286
+            . Display::return_icon('div_show.gif', get_lang('Show')).' '
287
+            . get_lang('AdvancedSearch').'</span></a>');
288 288
 
289 289
     echo '<div class="actions" >';
290 290
     if (api_is_platform_admin()) {
291
-        echo '<span class="fleft">' .
292
-                '<a href="' . api_get_path(WEB_PLUGIN_PATH) . 'ticket/src/new_ticket.php">' .
293
-                    Display::return_icon('add.png', $plugin->get_lang('TckNew'), '', '32') . '</a>' .
294
-                '<a href="' . api_get_self() . '?action=export' . $get_parameter . $get_parameter2 . '">' .
295
-                    Display::return_icon('export_excel.png', get_lang('Export'), '', '32') . '</a>' .
291
+        echo '<span class="fleft">'.
292
+                '<a href="'.api_get_path(WEB_PLUGIN_PATH).'ticket/src/new_ticket.php">'.
293
+                    Display::return_icon('add.png', $plugin->get_lang('TckNew'), '', '32').'</a>'.
294
+                '<a href="'.api_get_self().'?action=export'.$get_parameter.$get_parameter2.'">'.
295
+                    Display::return_icon('export_excel.png', get_lang('Export'), '', '32').'</a>'.
296 296
              '</span>';
297 297
     }
298 298
     $form->display();
299 299
     echo '</div>';
300
-    echo '<form action="' . api_get_self() . '" method="get" name="advanced_search" id="advanced_search" display:"none">
300
+    echo '<form action="'.api_get_self().'" method="get" name="advanced_search" id="advanced_search" display:"none">
301 301
             <div id="advanced_search_form" style="display: block;">
302 302
             <div>
303
-               <div class="form_header">' . get_lang('AdvancedSearch') . '</div>
303
+               <div class="form_header">' . get_lang('AdvancedSearch').'</div>
304 304
             </div>
305 305
             <table >
306 306
                <tbody>
307 307
                   <tr>
308 308
                      <td>
309 309
                         <div>
310
-                           <div class="label2">' . get_lang('Category') . ': </div>
311
-                           <div class="formw2" style="margin-top: -5px;">' . $select_types . '</div>
310
+                           <div class="label2">' . get_lang('Category').': </div>
311
+                           <div class="formw2" style="margin-top: -5px;">' . $select_types.'</div>
312 312
                         </div>
313 313
                      </td>
314 314
                      <td>
315 315
                         <div>
316
-                           <div class="label3">' . get_lang('User') . ': </div>
316
+                           <div class="label3">' . get_lang('User').': </div>
317 317
                            <div class="formw2"><input class="input-width" id="keyword_request_user" name="keyword_request_user" type="text"></div>
318 318
                         </div>
319 319
                      </td>
320 320
                      <td>
321 321
                         <div>
322
-                           <div class="label3">' . $plugin->get_lang('RegisterDate') . ': </div>
322
+                           <div class="label3">' . $plugin->get_lang('RegisterDate').': </div>
323 323
                            <div class="formw2"><input class="input-width" id="keyword_start_date_start" name="keyword_start_date_start" type="text"></div>
324 324
                         </div>
325 325
                      </td>
326 326
                      <td>
327 327
                         <div>
328
-                           <div class="label3"><input type="checkbox" name="keyword_dates" value="1">' . $plugin->get_lang('Untill') . '</div>
328
+                           <div class="label3"><input type="checkbox" name="keyword_dates" value="1">' . $plugin->get_lang('Untill').'</div>
329 329
                            <div class="formw2"><input class="input-width" id="keyword_start_date_end" name="keyword_start_date_end" type="text"></div>
330 330
                         </div>
331 331
                      </td>
@@ -333,42 +333,42 @@  discard block
 block discarded – undo
333 333
                   <tr >
334 334
                      <td>
335 335
                         <div>
336
-                           <div class="label2">' . $plugin->get_lang('AssignedTo') . ': </div>
337
-                           <div class="formw2 select-margin-top">' . $select_admins . '</div>
336
+                           <div class="label2">' . $plugin->get_lang('AssignedTo').': </div>
337
+                           <div class="formw2 select-margin-top">' . $select_admins.'</div>
338 338
                         </div>
339 339
                      </td>
340 340
                      <td>
341 341
                         <div>
342
-                           <div class="label3 remove-margin-top">' . get_lang('Status') . ':</div>
343
-                           <div class="formw2 select-margin-top">' . $select_status . '</div>
342
+                           <div class="label3 remove-margin-top">' . get_lang('Status').':</div>
343
+                           <div class="formw2 select-margin-top">' . $select_status.'</div>
344 344
                         </div>
345 345
                      </td>
346 346
                      <td>
347 347
                         <div>
348 348
                         <div>
349
-                           <div class="label3">' . $plugin->get_lang('Priority') . ': </div>
350
-                           <div class="formw2">' . $select_priority . '</div>
349
+                           <div class="label3">' . $plugin->get_lang('Priority').': </div>
350
+                           <div class="formw2">' . $select_priority.'</div>
351 351
                         </div>
352 352
                      </td>
353 353
                      <td>
354 354
                         <div>
355 355
                            <div>
356
-                              <div class="label3">' . get_lang('Status') . ': </div>
357
-                              <div class="formw2">' . $select_unread . '</div>
356
+                              <div class="label3">' . get_lang('Status').': </div>
357
+                              <div class="formw2">' . $select_unread.'</div>
358 358
                            </div>
359 359
                      </td>
360 360
                   </tr>
361 361
                   <tr>
362 362
                   <td>
363 363
                   <div >
364
-                  <div class="label4">' . get_lang('Course') . ': </div>
364
+                  <div class="label4">' . get_lang('Course').': </div>
365 365
                   <div class="formw2">
366 366
                   <input id="keyword_course" style="width: 170px;" name="keyword_course" type="text"></div>
367 367
                   </div>
368 368
                   </td>
369 369
                   <td colspan= "3">
370 370
                   <div>
371
-                  <button  name="submit_advanced" type="submit">' . get_lang('AdvancedSearch') . '</button>
371
+                  <button  name="submit_advanced" type="submit">' . get_lang('AdvancedSearch').'</button>
372 372
                   </div>
373 373
                   </td>
374 374
                   </tr>
@@ -381,12 +381,12 @@  discard block
 block discarded – undo
381 381
 } else {
382 382
     if ($plugin->get('allow_student_add') == 'true') {
383 383
         echo '<div class="actions" >';
384
-        echo '<span style="float:right;">' .
385
-                '<a href="' . api_get_path(WEB_PLUGIN_PATH) . 'ticket/src/new_ticket.php">' .
386
-                    Display::return_icon('add.png', $plugin->get_lang('TckNew'), '', '32') .
387
-                '</a>' .
384
+        echo '<span style="float:right;">'.
385
+                '<a href="'.api_get_path(WEB_PLUGIN_PATH).'ticket/src/new_ticket.php">'.
386
+                    Display::return_icon('add.png', $plugin->get_lang('TckNew'), '', '32').
387
+                '</a>'.
388 388
               '</span>';
389
-        echo '<span style="float:right;">' .
389
+        echo '<span style="float:right;">'.
390 390
         '</span>';
391 391
         echo '</div>';
392 392
     }
@@ -405,8 +405,8 @@  discard block
 block discarded – undo
405 405
     $table->set_header(8, get_lang('Actions'), true);
406 406
     $table->set_header(9, get_lang('Description'), true, array("style" => "width:200px"));
407 407
 } else {
408
-    echo '<center><h1>' . $plugin->get_lang('MyTickets') . '</h1></center>';
409
-    echo '<center><p>' . $plugin->get_lang('MsgWelcome') . '</p></center>';
408
+    echo '<center><h1>'.$plugin->get_lang('MyTickets').'</h1></center>';
409
+    echo '<center><p>'.$plugin->get_lang('MsgWelcome').'</p></center>';
410 410
     if (isset($_GET['message'])) {
411 411
         Display::display_confirmation_message($plugin->get_lang('TckSuccessSave'));
412 412
     }
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -143,16 +143,19 @@
 block discarded – undo
143 143
     $action = $_GET['action'];
144 144
     switch ($action) {
145 145
         case 'assign':
146
-            if ($isAdmin && isset($_GET['ticket_id']))
147
-                TicketManager::assign_ticket_user($_GET['ticket_id'], $user_id);
146
+            if ($isAdmin && isset($_GET['ticket_id'])) {
147
+                            TicketManager::assign_ticket_user($_GET['ticket_id'], $user_id);
148
+            }
148 149
             break;
149 150
         case 'unassign':
150
-            if ($isAdmin && isset($_GET['ticket_id']))
151
-                TicketManager::assign_ticket_user($_GET['ticket_id'], 0);
151
+            if ($isAdmin && isset($_GET['ticket_id'])) {
152
+                            TicketManager::assign_ticket_user($_GET['ticket_id'], 0);
153
+            }
152 154
             break;
153 155
         case 'alert':
154
-            if (!$isAdmin && isset($_GET['ticket_id']))
155
-                TicketManager::send_alert($_GET['ticket_id'], $user_id);
156
+            if (!$isAdmin && isset($_GET['ticket_id'])) {
157
+                            TicketManager::send_alert($_GET['ticket_id'], $user_id);
158
+            }
156 159
             break;
157 160
         case 'export':
158 161
             $data = array(
Please login to merge, or discard this patch.
plugin/ticket/src/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,5 +7,5 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 require_once '../config.php';
10
-header('location:' . api_get_path(WEB_PLUGIN_PATH) . PLUGIN_NAME . '/src/myticket.php?message=success');
10
+header('location:'.api_get_path(WEB_PLUGIN_PATH).PLUGIN_NAME.'/src/myticket.php?message=success');
11 11
 exit;
Please login to merge, or discard this patch.
plugin/ticket/src/download.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
 $file_url = Database::escape_string($file_url);
43 43
 $title = $_GET['title'];
44 44
 $path_attachment = api_get_path(SYS_ARCHIVE_PATH);
45
-$path_message_attach = $path_attachment . 'plugin_ticket_messageattch/';
46
-$full_file_name = $path_message_attach . $file_url;
45
+$path_message_attach = $path_attachment.'plugin_ticket_messageattch/';
46
+$full_file_name = $path_message_attach.$file_url;
47 47
 if (Security::check_abs_path($full_file_name, $path_message_attach)) {
48 48
     DocumentManager::file_send_for_download($full_file_name, true, $title);
49 49
 }
Please login to merge, or discard this patch.