Completed
Pull Request — 1.11.x (#1293)
by José
387:57 queued 349:55
created
main/inc/lib/promotion.lib.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                     case 'updated_at':
58 58
                         break;
59 59
                     case 'name':
60
-                        $val .= ' ' . get_lang('CopyLabelSuffix');
60
+                        $val .= ' '.get_lang('CopyLabelSuffix');
61 61
                         $new[$key] = $val;
62 62
                         break;
63 63
                     case 'created_at':
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                         break;
67 67
                     case 'career_id':
68 68
                         if (!empty($career_id)) {
69
-                            $val = (int)$career_id;
69
+                            $val = (int) $career_id;
70 70
                         }
71 71
                         $new[$key] = $val;
72 72
                         break;
@@ -147,12 +147,12 @@  discard block
 block discarded – undo
147 147
     {
148 148
         // Action links
149 149
         echo '<div class="actions" style="margin-bottom:20px">';
150
-        echo '<a href="career_dashboard.php">' . Display::return_icon('back.png',
151
-                get_lang('Back'), '', '32') . '</a>';
152
-        echo '<a href="' . api_get_self() . '?action=add">' . Display::return_icon('new_promotion.png',
153
-                get_lang('Add'), '', '32') . '</a>';
154
-        echo '<a href="' . api_get_path(WEB_CODE_PATH) . 'session/session_add.php">' . Display::return_icon('new_session.png',
155
-                get_lang('AddSession'), '', '32') . '</a>';
150
+        echo '<a href="career_dashboard.php">'.Display::return_icon('back.png',
151
+                get_lang('Back'), '', '32').'</a>';
152
+        echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('new_promotion.png',
153
+                get_lang('Add'), '', '32').'</a>';
154
+        echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_add.php">'.Display::return_icon('new_session.png',
155
+                get_lang('AddSession'), '', '32').'</a>';
156 156
         echo '</div>';
157 157
         echo Display::grid_html('promotions');
158 158
     }
Please login to merge, or discard this patch.
main/inc/lib/internationalization_database/name_order_conventions.php 1 patch
Spacing   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -19,82 +19,82 @@
 block discarded – undo
19 19
  * last_name                   - sorting names with priority for the last name.
20 20
  */
21 21
 return array(
22
-	'afrikaans' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
23
-	'albanian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
24
-	'alemannic' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
25
-	'amharic' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
26
-	'armenian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
27
-	'arabic' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
28
-	'asturian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
29
-	'bosnian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
30
-	'brazilian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
31
-	'breton' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
32
-	'bulgarian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
33
-	'catalan' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
34
-	'croatian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
35
-	'czech' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
36
-	'danish' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
37
-	'dari' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
38
-	'dutch' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
39
-	'english' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
40
-	'esperanto' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
41
-	'estonian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
42
-	'basque'  =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
43
-	'finnish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
44
-	'french' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
45
-	'frisian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
46
-	'friulian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
47
-    'galician' =>         array('format' => 'title last_name first_name',  'sort_by' => 'last_name'),
48
-	'georgian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
49
-	'german' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
50
-	'greek' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
51
-	'hawaiian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
52
-	'hebrew' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
53
-	'hindi' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
54
-	'hungarian' =>        array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
55
-	'icelandic' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
56
-	'indonesian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
57
-	'irish' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
58
-	'italian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
59
-	'japanese' =>         array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
60
-	'korean' =>           array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
61
-	'latin' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
62
-	'latvian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
63
-	'lithuanian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
64
-	'macedonian' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
65
-	'malay' =>            array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
66
-	'manx' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
67
-	'marathi' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
68
-	'middle_frisian' =>   array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
69
-	'mingo' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
70
-	'nepali' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
71
-	'norwegian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
72
-	'occitan' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
73
-	'pashto' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
74
-	'persian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
75
-	'polish' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
76
-	'portuguese' =>       array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
77
-	'quechua_cusco' =>    array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
78
-	'romanian' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
79
-	'rumantsch' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
80
-	'russian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
81
-	'sanskrit' =>         array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
82
-	'serbian' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
83
-	'serbian_cyrillic' => array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
84
-	'simpl_chinese' =>    array('format' => 'title last_name first_name',  'sort_by' => 'last_name' ), // Eastern order
85
-	'slovak' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
86
-	'slovenian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
87
-	'spanish' =>          array('format' => 'title last_name, first_name',  'sort_by' => 'last_name'), // Library order
88
-	'swahili' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
89
-	'swedish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
90
-	'tagalog' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
91
-	'tamil' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
92
-	'thai' =>             array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
93
-	'trad_chinese' =>     array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
94
-	'turkish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
95
-	'ukrainian' =>        array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
96
-	'vietnamese' =>       array('format' => 'title last_name first_name',  'sort_by' => 'last_name'), // Eastern order
97
-	'welsh' =>            array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
98
-	'yiddish' =>          array('format' => 'title first_name last_name',  'sort_by' => 'first_name'),
99
-	'yoruba' =>           array('format' => 'title first_name last_name',  'sort_by' => 'first_name')
22
+	'afrikaans' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
23
+	'albanian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
24
+	'alemannic' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
25
+	'amharic' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
26
+	'armenian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
27
+	'arabic' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
28
+	'asturian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
29
+	'bosnian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
30
+	'brazilian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
31
+	'breton' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
32
+	'bulgarian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
33
+	'catalan' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
34
+	'croatian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
35
+	'czech' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
36
+	'danish' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
37
+	'dari' =>             array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
38
+	'dutch' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
39
+	'english' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
40
+	'esperanto' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
41
+	'estonian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
42
+	'basque'  =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
43
+	'finnish' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
44
+	'french' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
45
+	'frisian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
46
+	'friulian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
47
+    'galician' =>         array('format' => 'title last_name first_name', 'sort_by' => 'last_name'),
48
+	'georgian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
49
+	'german' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
50
+	'greek' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
51
+	'hawaiian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
52
+	'hebrew' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
53
+	'hindi' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
54
+	'hungarian' =>        array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
55
+	'icelandic' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
56
+	'indonesian' =>       array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
57
+	'irish' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
58
+	'italian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
59
+	'japanese' =>         array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
60
+	'korean' =>           array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
61
+	'latin' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
62
+	'latvian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
63
+	'lithuanian' =>       array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
64
+	'macedonian' =>       array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
65
+	'malay' =>            array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
66
+	'manx' =>             array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
67
+	'marathi' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
68
+	'middle_frisian' =>   array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
69
+	'mingo' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
70
+	'nepali' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
71
+	'norwegian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
72
+	'occitan' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
73
+	'pashto' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
74
+	'persian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
75
+	'polish' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
76
+	'portuguese' =>       array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
77
+	'quechua_cusco' =>    array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
78
+	'romanian' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
79
+	'rumantsch' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
80
+	'russian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
81
+	'sanskrit' =>         array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
82
+	'serbian' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
83
+	'serbian_cyrillic' => array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
84
+	'simpl_chinese' =>    array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
85
+	'slovak' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
86
+	'slovenian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
87
+	'spanish' =>          array('format' => 'title last_name, first_name', 'sort_by' => 'last_name'), // Library order
88
+	'swahili' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
89
+	'swedish' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
90
+	'tagalog' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
91
+	'tamil' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
92
+	'thai' =>             array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
93
+	'trad_chinese' =>     array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
94
+	'turkish' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
95
+	'ukrainian' =>        array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
96
+	'vietnamese' =>       array('format' => 'title last_name first_name', 'sort_by' => 'last_name'), // Eastern order
97
+	'welsh' =>            array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
98
+	'yiddish' =>          array('format' => 'title first_name last_name', 'sort_by' => 'first_name'),
99
+	'yoruba' =>           array('format' => 'title first_name last_name', 'sort_by' => 'first_name')
100 100
 );
Please login to merge, or discard this patch.
main/inc/lib/getid3/module.audio-video.flv.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
  */
48 48
 class getid3_flv extends getid3_handler {
49 49
 
50
-    const TAG_AUDIO    =  8;
51
-    const TAG_VIDEO    =  9;
50
+    const TAG_AUDIO    = 8;
51
+    const TAG_VIDEO    = 9;
52 52
     const TAG_META     = 18;
53 53
 
54 54
     const VIDEO_H263   = 2;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	{
61 61
 	    $info = &$this->getid3->info;
62 62
 
63
-	    $info['flv'] = array ();
63
+	    $info['flv'] = array();
64 64
 	    $info_flv = &$info['flv'];
65 65
 
66 66
 		fseek($this->getid3->fp, $info['avdataoffset'], SEEK_SET);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		$flv_header = fread($this->getid3->fp, 5);
70 70
 
71 71
 		$info['fileformat'] = 'flv';
72
-		$info_flv['header']['signature'] =                           substr($flv_header, 0, 3);
72
+		$info_flv['header']['signature'] = substr($flv_header, 0, 3);
73 73
 		$info_flv['header']['version']   = getid3_lib::BigEndian2Int(substr($flv_header, 3, 1));
74 74
 		$type_flags                      = getid3_lib::BigEndian2Int(substr($flv_header, 4, 1));
75 75
 
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
 
88 88
 			$this_tag_header = fread($this->getid3->fp, 16);
89 89
 
90
-			$previous_tag_length = getid3_lib::BigEndian2Int(substr($this_tag_header,  0, 4));
91
-			$tag_type            = getid3_lib::BigEndian2Int(substr($this_tag_header,  4, 1));
92
-			$data_length         = getid3_lib::BigEndian2Int(substr($this_tag_header,  5, 3));
93
-			$timestamp           = getid3_lib::BigEndian2Int(substr($this_tag_header,  8, 3));
90
+			$previous_tag_length = getid3_lib::BigEndian2Int(substr($this_tag_header, 0, 4));
91
+			$tag_type            = getid3_lib::BigEndian2Int(substr($this_tag_header, 4, 1));
92
+			$data_length         = getid3_lib::BigEndian2Int(substr($this_tag_header, 5, 3));
93
+			$timestamp           = getid3_lib::BigEndian2Int(substr($this_tag_header, 8, 3));
94 94
 			$last_header_byte    = getid3_lib::BigEndian2Int(substr($this_tag_header, 15, 1));
95 95
 			$next_offset         = ftell($this->getid3->fp) - 1 + $data_length;
96 96
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 				case getid3_flv::TAG_AUDIO:
100 100
 					if (!isset($info_flv['audio']['audioFormat'])) {
101
-						$info_flv['audio']['audioFormat']     =  $last_header_byte & 0x07;
101
+						$info_flv['audio']['audioFormat']     = $last_header_byte & 0x07;
102 102
 						$info_flv['audio']['audioRate']       = ($last_header_byte & 0x30) / 0x10;
103 103
 						$info_flv['audio']['audioSampleSize'] = ($last_header_byte & 0x40) / 0x40;
104 104
 						$info_flv['audio']['audioType']       = ($last_header_byte & 0x80) / 0x80;
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 
402 402
 		$type = $this->stream->readByte();
403 403
 
404
-		switch($type) {
404
+		switch ($type) {
405 405
 			// Double
406 406
 			case 0:
407 407
 				$value = $this->readDouble();
Please login to merge, or discard this patch.
main/inc/lib/getid3/getid3.php 1 patch
Spacing   +111 added lines, -111 removed lines patch added patch discarded remove patch
@@ -27,42 +27,42 @@  discard block
 block discarded – undo
27 27
     //// Settings Section - do NOT modify this file - change setting after newing getid3!
28 28
 
29 29
     // Encoding
30
-    public $encoding                 = 'ISO-8859-1';      // CASE SENSITIVE! - i.e. (must be supported by iconv() - see http://www.gnu.org/software/libiconv/).  Examples:  ISO-8859-1  UTF-8  UTF-16  UTF-16BE.
31
-    public $encoding_id3v1           = 'ISO-8859-1';      // Override SPECIFICATION encoding for broken ID3v1 tags caused by bad tag programs. Examples: 'EUC-CN' for "Chinese MP3s" and 'CP1251' for "Cyrillic".
32
-    public $encoding_id3v2           = 'ISO-8859-1';      // Override ISO-8859-1 encoding for broken ID3v2 tags caused by BRAINDEAD tag programs that writes system codepage as 'ISO-8859-1' instead of UTF-8.
30
+    public $encoding                 = 'ISO-8859-1'; // CASE SENSITIVE! - i.e. (must be supported by iconv() - see http://www.gnu.org/software/libiconv/).  Examples:  ISO-8859-1  UTF-8  UTF-16  UTF-16BE.
31
+    public $encoding_id3v1           = 'ISO-8859-1'; // Override SPECIFICATION encoding for broken ID3v1 tags caused by bad tag programs. Examples: 'EUC-CN' for "Chinese MP3s" and 'CP1251' for "Cyrillic".
32
+    public $encoding_id3v2           = 'ISO-8859-1'; // Override ISO-8859-1 encoding for broken ID3v2 tags caused by BRAINDEAD tag programs that writes system codepage as 'ISO-8859-1' instead of UTF-8.
33 33
 
34 34
     // Tags - disable for speed
35
-    public $option_tag_id3v1         = false;              // Read and process ID3v1 tags.
36
-    public $option_tag_id3v2         = false;              // Read and process ID3v2 tags.
37
-    public $option_tag_lyrics3       = false;              // Read and process Lyrics3 tags.
38
-    public $option_tag_apetag        = false;              // Read and process APE tags.
35
+    public $option_tag_id3v1         = false; // Read and process ID3v1 tags.
36
+    public $option_tag_id3v2         = false; // Read and process ID3v2 tags.
37
+    public $option_tag_lyrics3       = false; // Read and process Lyrics3 tags.
38
+    public $option_tag_apetag        = false; // Read and process APE tags.
39 39
 
40 40
     // Misc calucations - disable for speed
41
-    public $option_analyze           = true;              // Analyze file - disable if you only need to detect file format.
42
-    public $option_accurate_results  = true;              // Disable to greatly speed up parsing of some file formats at the cost of accuracy.
43
-    public $option_tags_process      = true;              // Copy tags to root key 'tags' and 'comments' and encode to $this->encoding.
44
-    public $option_tags_images       = false;             // Scan tags for binary image data - ID3v2 and vorbiscomments only.
45
-    public $option_extra_info        = true;              // Calculate/return additional info such as bitrate, channelmode etc.
46
-    public $option_max_2gb_check     = false;             // Check whether file is larger than 2 Gb and thus not supported by PHP.
41
+    public $option_analyze           = true; // Analyze file - disable if you only need to detect file format.
42
+    public $option_accurate_results  = true; // Disable to greatly speed up parsing of some file formats at the cost of accuracy.
43
+    public $option_tags_process      = true; // Copy tags to root key 'tags' and 'comments' and encode to $this->encoding.
44
+    public $option_tags_images       = false; // Scan tags for binary image data - ID3v2 and vorbiscomments only.
45
+    public $option_extra_info        = true; // Calculate/return additional info such as bitrate, channelmode etc.
46
+    public $option_max_2gb_check     = false; // Check whether file is larger than 2 Gb and thus not supported by PHP.
47 47
 
48 48
     // Misc data hashes - slow - require hash module
49
-    public $option_md5_data          = false;             // Get MD5 sum of data part - slow.
50
-    public $option_md5_data_source   = false;             // Use MD5 of source file if available - only FLAC, MAC, OptimFROG and Wavpack4.
51
-    public $option_sha1_data         = false;             // Get SHA1 sum of data part - slow.
49
+    public $option_md5_data          = false; // Get MD5 sum of data part - slow.
50
+    public $option_md5_data_source   = false; // Use MD5 of source file if available - only FLAC, MAC, OptimFROG and Wavpack4.
51
+    public $option_sha1_data         = false; // Get SHA1 sum of data part - slow.
52 52
 
53 53
     // Public variables
54
-    public $filename;                                     // Filename of file being analysed.
55
-    public $fp;                                           // Filepointer to file being analysed.
56
-    public $info;                                         // Result array.
54
+    public $filename; // Filename of file being analysed.
55
+    public $fp; // Filepointer to file being analysed.
56
+    public $info; // Result array.
57 57
 
58 58
     // Protected variables
59
-    protected $include_path;                              // getid3 include path.
60
-    protected $warnings = array ();
59
+    protected $include_path; // getid3 include path.
60
+    protected $warnings = array();
61 61
     protected $iconv_present;
62 62
 
63 63
     // Class constants
64 64
     const VERSION           = '2.0.0b4';
65
-    const FREAD_BUFFER_SIZE = 16384;                      // Read buffer size in bytes.
65
+    const FREAD_BUFFER_SIZE = 16384; // Read buffer size in bytes.
66 66
     const ICONV_TEST_STRING = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~�������������������������������� �����������������������������������������������������������������������������������������������';
67 67
 
68 68
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         }
88 88
 
89 89
         // Get include_path
90
-        $this->include_path = $include_path = dirname(__FILE__) . '/';
90
+        $this->include_path = $include_path = dirname(__FILE__).'/';
91 91
 
92 92
         // Check for presence of iconv() and make sure it works (simpel test only).
93 93
         if (function_exists('iconv') && @iconv('UTF-16LE', 'ISO-8859-1', @iconv('ISO-8859-1', 'UTF-16LE', getid3::ICONV_TEST_STRING)) == getid3::ICONV_TEST_STRING) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
 
125 125
         // Check safe_mode off
126
-        if ((bool)ini_get('safe_mode')) {
126
+        if ((bool) ini_get('safe_mode')) {
127 127
             $this->warning('Safe mode is on, shorten support disabled, md5data/sha1data for ogg vorbis disabled, ogg vorbis/flac tag writing disabled.');
128 128
         }
129 129
 
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
 
138 138
         // Init and save values
139 139
         $this->filename = $filename;
140
-        $this->warnings = array ();
140
+        $this->warnings = array();
141 141
 
142 142
         // Init result array and set parameters
143
-        $this->info = array ();
143
+        $this->info = array();
144 144
         $this->info['GETID3_VERSION'] = getid3::VERSION;
145 145
 
146 146
         // Remote files not supported
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 
180 180
             fseek($this->fp, 0, SEEK_SET);
181 181
             $header = fread($this->fp, 10);
182
-            if (substr($header, 0, 3) == 'ID3'  &&  strlen($header) == 10) {
182
+            if (substr($header, 0, 3) == 'ID3' && strlen($header) == 10) {
183 183
                 $this->info['id3v2']['header']        = true;
184 184
                 $this->info['id3v2']['majorversion']  = ord($header{3});
185 185
                 $this->info['id3v2']['minorversion']  = ord($header{4});
@@ -189,13 +189,13 @@  discard block
 block discarded – undo
189 189
 
190 190
 
191 191
         // Handle tags
192
-        foreach (array ("id3v2", "id3v1", "apetag", "lyrics3") as $tag_name) {
192
+        foreach (array("id3v2", "id3v1", "apetag", "lyrics3") as $tag_name) {
193 193
 
194
-            $option_tag = 'option_tag_' . $tag_name;
194
+            $option_tag = 'option_tag_'.$tag_name;
195 195
             if ($this->$option_tag) {
196 196
                 $this->include_module('tag.'.$tag_name);
197 197
                 try {
198
-                    $tag_class = 'getid3_' . $tag_name;
198
+                    $tag_class = 'getid3_'.$tag_name;
199 199
                     $tag = new $tag_class($this);
200 200
                     $tag->Analyze();
201 201
                 }
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
                     return $this->info;
232 232
                 }
233 233
 
234
-                $determined_format = $info;  // copy $info deleted by foreach()
234
+                $determined_format = $info; // copy $info deleted by foreach()
235 235
                 continue;
236 236
             }
237 237
         }
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 
342 342
             // Set playtime string
343 343
             if (!empty($this->info['playtime_seconds']) && empty($this->info['playtime_string'])) {
344
-                $this->info['playtime_string'] =  floor(round($this->info['playtime_seconds']) / 60) . ':' . str_pad(floor(round($this->info['playtime_seconds']) % 60), 2, 0, STR_PAD_LEFT);;
344
+                $this->info['playtime_string'] = floor(round($this->info['playtime_seconds']) / 60).':'.str_pad(floor(round($this->info['playtime_seconds']) % 60), 2, 0, STR_PAD_LEFT); ;
345 345
             }
346 346
 
347 347
 
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
             if (@$this->info['video'] && @$this->info['video']['resolution_x'] && @$this->info['video']['resolution_y'] && @$this->info['video']['bits_per_sample']) {
350 350
 
351 351
                 // From static image formats
352
-                if (in_array($this->info['video']['dataformat'], array ('bmp', 'gif', 'jpeg', 'jpg', 'png', 'tiff'))) {
352
+                if (in_array($this->info['video']['dataformat'], array('bmp', 'gif', 'jpeg', 'jpg', 'png', 'tiff'))) {
353 353
                     $frame_rate         = 1;
354 354
                     $bitrate_compressed = $this->info['filesize'] * 8;
355 355
                 }
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
     //  Clear all warnings when cloning
472 472
     public function __clone() {
473 473
 
474
-        $this->warnings = array ();
474
+        $this->warnings = array();
475 475
 
476 476
         // Copy info array, otherwise it will be a reference.
477 477
         $temp = $this->info;
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
             return $result;
504 504
         }
505 505
 
506
-        $this->warning('iconv() was unable to convert the string: "' . $string . '" from ' . $in_charset . ' to ' . $out_charset);
506
+        $this->warning('iconv() was unable to convert the string: "'.$string.'" from '.$in_charset.' to '.$out_charset);
507 507
         return $string;
508 508
     }
509 509
 
@@ -534,12 +534,12 @@  discard block
 block discarded – undo
534 534
     // Return array containing information about all supported formats
535 535
     public static function GetFileFormatArray() {
536 536
 
537
-        static $format_info = array (
537
+        static $format_info = array(
538 538
 
539 539
                 // Audio formats
540 540
 
541 541
                 // AC-3   - audio      - Dolby AC-3 / Dolby Digital
542
-                'ac3'  => array (
542
+                'ac3'  => array(
543 543
                             'pattern'   => '^\x0B\x77',
544 544
                             'group'     => 'audio',
545 545
                             'module'    => 'ac3',
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
                           ),
548 548
 
549 549
                 // AAC  - audio       - Advanced Audio Coding (AAC) - ADIF format
550
-                'adif' => array (
550
+                'adif' => array(
551 551
                             'pattern'   => '^ADIF',
552 552
                             'group'     => 'audio',
553 553
                             'module'    => 'aac_adif',
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
 
558 558
 
559 559
                 // AAC  - audio       - Advanced Audio Coding (AAC) - ADTS format (very similar to MP3)
560
-                'adts' => array (
560
+                'adts' => array(
561 561
                             'pattern'   => '^\xFF[\xF0-\xF1\xF8-\xF9]',
562 562
                             'group'     => 'audio',
563 563
                             'module'    => 'aac_adts',
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
 
568 568
 
569 569
                 // AU   - audio       - NeXT/Sun AUdio (AU)
570
-                'au'   => array (
570
+                'au'   => array(
571 571
                             'pattern'   => '^\.snd',
572 572
                             'group'     => 'audio',
573 573
                             'module'    => 'au',
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
                           ),
576 576
 
577 577
                 // AVR  - audio       - Audio Visual Research
578
-                'avr'  => array (
578
+                'avr'  => array(
579 579
                             'pattern'   => '^2BIT',
580 580
                             'group'     => 'audio',
581 581
                             'module'    => 'avr',
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
                           ),
584 584
 
585 585
                 // BONK - audio       - Bonk v0.9+
586
-                'bonk' => array (
586
+                'bonk' => array(
587 587
                             'pattern'   => '^\x00(BONK|INFO|META| ID3)',
588 588
                             'group'     => 'audio',
589 589
                             'module'    => 'bonk',
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
 						),
600 600
 
601 601
                 // FLAC - audio       - Free Lossless Audio Codec
602
-                'flac' => array (
602
+                'flac' => array(
603 603
                             'pattern'   => '^fLaC',
604 604
                             'group'     => 'audio',
605 605
                             'module'    => 'xiph',
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
                           ),
608 608
 
609 609
                 // LA   - audio       - Lossless Audio (LA)
610
-                'la'   => array (
610
+                'la'   => array(
611 611
                             'pattern'   => '^LA0[2-4]',
612 612
                             'group'     => 'audio',
613 613
                             'module'    => 'la',
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
                           ),
616 616
 
617 617
                 // LPAC - audio       - Lossless Predictive Audio Compression (LPAC)
618
-                'lpac' => array (
618
+                'lpac' => array(
619 619
                             'pattern'   => '^LPAC',
620 620
                             'group'     => 'audio',
621 621
                             'module'    => 'lpac',
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
                           ),
624 624
 
625 625
                 // MIDI - audio       - MIDI (Musical Instrument Digital Interface)
626
-                'midi' => array (
626
+                'midi' => array(
627 627
                             'pattern'   => '^MThd',
628 628
                             'group'     => 'audio',
629 629
                             'module'    => 'midi',
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
                           ),
632 632
 
633 633
                 // MAC  - audio       - Monkey's Audio Compressor
634
-                'mac'  => array (
634
+                'mac'  => array(
635 635
                             'pattern'   => '^MAC ',
636 636
                             'group'     => 'audio',
637 637
                             'module'    => 'monkey',
@@ -639,31 +639,31 @@  discard block
 block discarded – undo
639 639
                           ),
640 640
 
641 641
                 // MOD  - audio       - MODule (assorted sub-formats)
642
-                'mod'  => array (
642
+                'mod'  => array(
643 643
                             'pattern'   => '^.{1080}(M.K.|[5-9]CHN|[1-3][0-9]CH)',
644 644
                             'mime_type' => 'audio/mod',
645 645
                           ),
646 646
 
647 647
                 // MOD  - audio       - MODule (Impulse Tracker)
648
-                'it'   => array (
648
+                'it'   => array(
649 649
                             'pattern'   => '^IMPM',
650 650
                             'mime_type' => 'audio/it',
651 651
                           ),
652 652
 
653 653
                 // MOD  - audio       - MODule (eXtended Module, various sub-formats)
654
-                'xm'   => array (
654
+                'xm'   => array(
655 655
                             'pattern'   => '^Extended Module',
656 656
                             'mime_type' => 'audio/xm',
657 657
                           ),
658 658
 
659 659
                 // MOD  - audio       - MODule (ScreamTracker)
660
-                's3m'  => array (
660
+                's3m'  => array(
661 661
                             'pattern'   => '^.{44}SCRM',
662 662
                             'mime_type' => 'audio/s3m',
663 663
                           ),
664 664
 
665 665
                 // MPC  - audio       - Musepack / MPEGplus SV7+
666
-                'mpc'  => array (
666
+                'mpc'  => array(
667 667
                             'pattern'   => '^(MP\+)',
668 668
                             'group'     => 'audio',
669 669
                             'module'    => 'mpc',
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
                           ),
672 672
 
673 673
                 // MPC  - audio       - Musepack / MPEGplus SV4-6
674
-                'mpc_old' => array (
674
+                'mpc_old' => array(
675 675
                             'pattern'   => '^([\x00\x01\x10\x11\x40\x41\x50\x51\x80\x81\x90\x91\xC0\xC1\xD0\xD1][\x20-37][\x00\x20\x40\x60\x80\xA0\xC0\xE0])',
676 676
                             'group'     => 'audio',
677 677
                             'module'    => 'mpc_old',
@@ -680,7 +680,7 @@  discard block
 block discarded – undo
680 680
 
681 681
 
682 682
                 // MP3  - audio       - MPEG-audio Layer 3 (very similar to AAC-ADTS)
683
-                'mp3'  => array (
683
+                'mp3'  => array(
684 684
                             'pattern'   => '^\xFF[\xE2-\xE7\xF2-\xF7\xFA-\xFF][\x00-\xEB]',
685 685
                             'group'     => 'audio',
686 686
                             'module'    => 'mp3',
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
                           ),
689 689
 
690 690
                 // OFR  - audio       - OptimFROG
691
-                'ofr'  => array (
691
+                'ofr'  => array(
692 692
                             'pattern'   => '^(\*RIFF|OFR)',
693 693
                             'group'     => 'audio',
694 694
                             'module'    => 'optimfrog',
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
                           ),
697 697
 
698 698
                 // RKAU - audio       - RKive AUdio compressor
699
-                'rkau' => array (
699
+                'rkau' => array(
700 700
                             'pattern'   => '^RKA',
701 701
                             'group'     => 'audio',
702 702
                             'module'    => 'rkau',
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
                           ),
705 705
 
706 706
                 // SHN  - audio       - Shorten
707
-                'shn'  => array (
707
+                'shn'  => array(
708 708
                             'pattern'   => '^ajkg',
709 709
                             'group'     => 'audio',
710 710
                             'module'    => 'shorten',
@@ -714,15 +714,15 @@  discard block
 block discarded – undo
714 714
                           ),
715 715
 
716 716
                 // TTA  - audio       - TTA Lossless Audio Compressor (http://tta.corecodec.org)
717
-                'tta'  => array (
718
-                            'pattern'   => '^TTA',  // could also be '^TTA(\x01|\x02|\x03|2|1)'
717
+                'tta'  => array(
718
+                            'pattern'   => '^TTA', // could also be '^TTA(\x01|\x02|\x03|2|1)'
719 719
                             'group'     => 'audio',
720 720
                             'module'    => 'tta',
721 721
                             'mime_type' => 'application/octet-stream',
722 722
                           ),
723 723
 
724 724
                 // VOC  - audio       - Creative Voice (VOC)
725
-                'voc'  => array (
725
+                'voc'  => array(
726 726
                             'pattern'   => '^Creative Voice File',
727 727
                             'group'     => 'audio',
728 728
                             'module'    => 'voc',
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
                           ),
731 731
 
732 732
                 // VQF  - audio       - transform-domain weighted interleave Vector Quantization Format (VQF)
733
-                'vqf'  => array (
733
+                'vqf'  => array(
734 734
                             'pattern'   => '^TWIN',
735 735
                             'group'     => 'audio',
736 736
                             'module'    => 'vqf',
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
                 // Audio-Video formats
750 750
 
751 751
                 // ASF  - audio/video - Advanced Streaming Format, Windows Media Video, Windows Media Audio
752
-                'asf'  => array (
752
+                'asf'  => array(
753 753
                             'pattern'   => '^\x30\x26\xB2\x75\x8E\x66\xCF\x11\xA6\xD9\x00\xAA\x00\x62\xCE\x6C',
754 754
                             'group'     => 'audio-video',
755 755
                             'module'    => 'asf',
@@ -771,13 +771,13 @@  discard block
 block discarded – undo
771 771
                           ),
772 772
 
773 773
                 // MKAV - audio/video - Mastroka
774
-                'matroska' => array (
774
+                'matroska' => array(
775 775
                             'pattern'   => '^\x1A\x45\xDF\xA3',
776 776
                             'mime_type' => 'application/octet-stream',
777 777
                           ),
778 778
 
779 779
                 // MPEG - audio/video - MPEG (Moving Pictures Experts Group)
780
-                'mpeg' => array (
780
+                'mpeg' => array(
781 781
                             'pattern'   => '^\x00\x00\x01(\xBA|\xB3)',
782 782
                             'group'     => 'audio-video',
783 783
                             'module'    => 'mpeg',
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
                           ),
786 786
 
787 787
                 // NSV  - audio/video - Nullsoft Streaming Video (NSV)
788
-                'nsv'  => array (
788
+                'nsv'  => array(
789 789
                             'pattern'   => '^NSV[sf]',
790 790
                             'group'     => 'audio-video',
791 791
                             'module'    => 'nsv',
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
                           ),
794 794
 
795 795
                 // Ogg  - audio/video - Ogg (Ogg Vorbis, OggFLAC, Speex, Ogg Theora(*), Ogg Tarkin(*))
796
-                'ogg'  => array (
796
+                'ogg'  => array(
797 797
                             'pattern'   => '^OggS',
798 798
                             'group'     => 'audio',
799 799
                             'module'    => 'xiph',
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
                           ),
804 804
 
805 805
                 // QT   - audio/video - Quicktime
806
-                'quicktime' => array (
806
+                'quicktime' => array(
807 807
                             'pattern'   => '^.{4}(cmov|free|ftyp|mdat|moov|pnot|skip|wide)',
808 808
                             'group'     => 'audio-video',
809 809
                             'module'    => 'quicktime',
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
                           ),
812 812
 
813 813
                 // RIFF - audio/video - Resource Interchange File Format (RIFF) / WAV / AVI / CD-audio / SDSS = renamed variant used by SmartSound QuickTracks (www.smartsound.com) / FORM = Audio Interchange File Format (AIFF)
814
-                'riff' => array (
814
+                'riff' => array(
815 815
                             'pattern'   => '^(RIFF|SDSS|FORM)',
816 816
                             'group'     => 'audio-video',
817 817
                             'module'    => 'riff',
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
                           ),
821 821
 
822 822
                 // Real - audio/video - RealAudio, RealVideo
823
-                'real' => array (
823
+                'real' => array(
824 824
                             'pattern'   => '^(\.RMF|.ra)',
825 825
                             'group'     => 'audio-video',
826 826
                             'module'    => 'real',
@@ -828,7 +828,7 @@  discard block
 block discarded – undo
828 828
                           ),
829 829
 
830 830
                 // SWF - audio/video - ShockWave Flash
831
-                'swf' => array (
831
+                'swf' => array(
832 832
                             'pattern'   => '^(F|C)WS',
833 833
                             'group'     => 'audio-video',
834 834
                             'module'    => 'swf',
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
                 // Still-Image formats
840 840
 
841 841
                 // BMP  - still image - Bitmap (Windows, OS/2; uncompressed, RLE8, RLE4)
842
-                'bmp'  => array (
842
+                'bmp'  => array(
843 843
                             'pattern'   => '^BM',
844 844
                             'group'     => 'graphic',
845 845
                             'module'    => 'bmp',
@@ -849,7 +849,7 @@  discard block
 block discarded – undo
849 849
                           ),
850 850
 
851 851
                 // GIF  - still image - Graphics Interchange Format
852
-                'gif'  => array (
852
+                'gif'  => array(
853 853
                             'pattern'   => '^GIF',
854 854
                             'group'     => 'graphic',
855 855
                             'module'    => 'gif',
@@ -859,7 +859,7 @@  discard block
 block discarded – undo
859 859
                           ),
860 860
 
861 861
                 // JPEG - still image - Joint Photographic Experts Group (JPEG)
862
-                'jpeg'  => array (
862
+                'jpeg'  => array(
863 863
                             'pattern'   => '^\xFF\xD8\xFF',
864 864
                             'group'     => 'graphic',
865 865
                             'module'    => 'jpeg',
@@ -869,7 +869,7 @@  discard block
 block discarded – undo
869 869
                           ),
870 870
 
871 871
                 // PCD  - still image - Kodak Photo CD
872
-                'pcd'  => array (
872
+                'pcd'  => array(
873 873
                             'pattern'   => '^.{2048}PCD_IPI\x00',
874 874
                             'group'     => 'graphic',
875 875
                             'module'    => 'pcd',
@@ -880,7 +880,7 @@  discard block
 block discarded – undo
880 880
 
881 881
 
882 882
                 // PNG  - still image - Portable Network Graphics (PNG)
883
-                'png'  => array (
883
+                'png'  => array(
884 884
                             'pattern'   => '^\x89\x50\x4E\x47\x0D\x0A\x1A\x0A',
885 885
                             'group'     => 'graphic',
886 886
                             'module'    => 'png',
@@ -900,7 +900,7 @@  discard block
 block discarded – undo
900 900
 
901 901
 
902 902
                 // TIFF  - still image - Tagged Information File Format (TIFF)
903
-                'tiff' => array (
903
+                'tiff' => array(
904 904
                             'pattern'   => '^(II\x2A\x00|MM\x00\x2A)',
905 905
                             'group'     => 'graphic',
906 906
                             'module'    => 'tiff',
@@ -920,7 +920,7 @@  discard block
 block discarded – undo
920 920
                           ),
921 921
 
922 922
                 // ISO  - data        - International Standards Organization (ISO) CD-ROM Image
923
-                'iso'  => array (
923
+                'iso'  => array(
924 924
                             'pattern'   => '^.{32769}CD001',
925 925
                             'group'     => 'misc',
926 926
                             'module'    => 'iso',
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
                           ),
939 939
 
940 940
                 // SZIP - audio       - SZIP compressed data
941
-                'szip' => array (
941
+                'szip' => array(
942 942
                             'pattern'   => '^SZ\x0A\x04',
943 943
                             'group'     => 'archive',
944 944
                             'module'    => 'szip',
@@ -969,7 +969,7 @@  discard block
 block discarded – undo
969 969
 
970 970
 
971 971
                 // ZIP  - data        - ZIP compressed data
972
-                'zip'  => array (
972
+                'zip'  => array(
973 973
                             'pattern'   => '^PK\x03\x04',
974 974
                             'group'     => 'archive',
975 975
                             'module'    => 'zip',
@@ -980,7 +980,7 @@  discard block
 block discarded – undo
980 980
 
981 981
 
982 982
                 // PAR2 - data        - Parity Volume Set Specification 2.0
983
-                'par2' => array (
983
+                'par2' => array(
984 984
                 			'pattern'   => '^PAR2\x00PKT',
985 985
 							'mime_type' => 'application/octet-stream',
986 986
 							'fail_id3'  => 'ERROR',
@@ -1039,22 +1039,22 @@  discard block
 block discarded – undo
1039 1039
     protected function HandleAllTags() {
1040 1040
 
1041 1041
         // Key name => array (tag name, character encoding)
1042
-        static $tags = array (
1043
-            'asf'       => array ('asf',           'UTF-16LE'),
1044
-            'midi'      => array ('midi',          'ISO-8859-1'),
1045
-            'nsv'       => array ('nsv',           'ISO-8859-1'),
1046
-            'ogg'       => array ('vorbiscomment', 'UTF-8'),
1047
-            'png'       => array ('png',           'UTF-8'),
1048
-            'tiff'      => array ('tiff',          'ISO-8859-1'),
1049
-            'quicktime' => array ('quicktime',     'ISO-8859-1'),
1050
-            'real'      => array ('real',          'ISO-8859-1'),
1051
-            'vqf'       => array ('vqf',           'ISO-8859-1'),
1052
-            'zip'       => array ('zip',           'ISO-8859-1'),
1053
-            'riff'      => array ('riff',          'ISO-8859-1'),
1054
-            'lyrics3'   => array ('lyrics3',       'ISO-8859-1'),
1055
-            'id3v1'     => array ('id3v1',         ''),            // change below - cannot assign variable to static array
1056
-            'id3v2'     => array ('id3v2',         'UTF-8'),       // module converts all frames to UTF-8
1057
-            'ape'       => array ('ape',           'UTF-8')
1042
+        static $tags = array(
1043
+            'asf'       => array('asf', 'UTF-16LE'),
1044
+            'midi'      => array('midi', 'ISO-8859-1'),
1045
+            'nsv'       => array('nsv', 'ISO-8859-1'),
1046
+            'ogg'       => array('vorbiscomment', 'UTF-8'),
1047
+            'png'       => array('png', 'UTF-8'),
1048
+            'tiff'      => array('tiff', 'ISO-8859-1'),
1049
+            'quicktime' => array('quicktime', 'ISO-8859-1'),
1050
+            'real'      => array('real', 'ISO-8859-1'),
1051
+            'vqf'       => array('vqf', 'ISO-8859-1'),
1052
+            'zip'       => array('zip', 'ISO-8859-1'),
1053
+            'riff'      => array('riff', 'ISO-8859-1'),
1054
+            'lyrics3'   => array('lyrics3', 'ISO-8859-1'),
1055
+            'id3v1'     => array('id3v1', ''), // change below - cannot assign variable to static array
1056
+            'id3v2'     => array('id3v2', 'UTF-8'), // module converts all frames to UTF-8
1057
+            'ape'       => array('ape', 'UTF-8')
1058 1058
         );
1059 1059
         $tags['id3v1'][1] = $this->encoding_id3v1;
1060 1060
 
@@ -1063,7 +1063,7 @@  discard block
 block discarded – undo
1063 1063
             list($tag_name, $encoding) = $tag_name_encoding_array;
1064 1064
 
1065 1065
             // Fill in default encoding type if not already present
1066
-            @$this->info[$comment_name]  and  $this->info[$comment_name]['encoding'] = $encoding;
1066
+            @$this->info[$comment_name] and $this->info[$comment_name]['encoding'] = $encoding;
1067 1067
 
1068 1068
             // Copy comments if key name set
1069 1069
             if (@$this->info[$comment_name]['comments']) {
@@ -1142,11 +1142,11 @@  discard block
 block discarded – undo
1142 1142
 abstract class getid3_handler
1143 1143
 {
1144 1144
 
1145
-    protected $getid3;                          // pointer
1145
+    protected $getid3; // pointer
1146 1146
 
1147
-    protected $data_string_flag = false;        // analyzing filepointer or string
1148
-    protected $data_string;                     // string to analyze
1149
-    protected $data_string_position = 0;        // seek position in string
1147
+    protected $data_string_flag = false; // analyzing filepointer or string
1148
+    protected $data_string; // string to analyze
1149
+    protected $data_string_position = 0; // seek position in string
1150 1150
 
1151 1151
 
1152 1152
     public function __construct(getID3 $getid3) {
@@ -1247,20 +1247,20 @@  discard block
 block discarded – undo
1247 1247
     public function __construct($filename) {
1248 1248
 
1249 1249
         if (!file_exists($filename)) {
1250
-            throw new getid3_exception('File does not exist: "' . $filename . '"');
1250
+            throw new getid3_exception('File does not exist: "'.$filename.'"');
1251 1251
         }
1252 1252
 
1253 1253
         if (!is_writeable($filename)) {
1254
-            throw new getid3_exception('File is not writeable: "' . $filename . '"');
1254
+            throw new getid3_exception('File is not writeable: "'.$filename.'"');
1255 1255
         }
1256 1256
 
1257 1257
         if (!is_writeable(dirname($filename))) {
1258
-            throw new getid3_exception('Directory is not writeable: ' . dirname($filename) . ' (need to write lock file).');
1258
+            throw new getid3_exception('Directory is not writeable: '.dirname($filename).' (need to write lock file).');
1259 1259
         }
1260 1260
 
1261 1261
         $this->user_abort = ignore_user_abort(true);
1262 1262
 
1263
-        $this->fp_lock = fopen($filename . '.getid3.lock', 'w');
1263
+        $this->fp_lock = fopen($filename.'.getid3.lock', 'w');
1264 1264
         flock($this->fp_lock, LOCK_EX);
1265 1265
 
1266 1266
         $this->filename = $filename;
@@ -1271,7 +1271,7 @@  discard block
 block discarded – undo
1271 1271
 
1272 1272
         flock($this->fp_lock, LOCK_UN);
1273 1273
         fclose($this->fp_lock);
1274
-        unlink($this->filename . '.getid3.lock');
1274
+        unlink($this->filename.'.getid3.lock');
1275 1275
 
1276 1276
         ignore_user_abort($this->user_abort);
1277 1277
     }
@@ -1325,7 +1325,7 @@  discard block
 block discarded – undo
1325 1325
 
1326 1326
 
1327 1327
     // Convert number to Little Endian byte string
1328
-    public static function LittleEndian2String($number, $minbytes=1, $synchsafe=false) {
1328
+    public static function LittleEndian2String($number, $minbytes = 1, $synchsafe = false) {
1329 1329
         $intstring = '';
1330 1330
         while ($number > 0) {
1331 1331
             if ($synchsafe) {
@@ -1485,7 +1485,7 @@  discard block
 block discarded – undo
1485 1485
 	}
1486 1486
 
1487 1487
 
1488
-	public static function PrintHexBytes($string, $hex=true, $spaces=true, $html_safe=true) {
1488
+	public static function PrintHexBytes($string, $hex = true, $spaces = true, $html_safe = true) {
1489 1489
 
1490 1490
         $return_string = '';
1491 1491
         for ($i = 0; $i < strlen($string); $i++) {
@@ -1545,7 +1545,7 @@  discard block
 block discarded – undo
1545 1545
 
1546 1546
     public static function NameLookup($name_code) {
1547 1547
 
1548
-        static $lookup = array (
1548
+        static $lookup = array(
1549 1549
             0 => 'not set',
1550 1550
             1 => 'Track Gain Adjustment',
1551 1551
             2 => 'Album Gain Adjustment'
@@ -1558,7 +1558,7 @@  discard block
 block discarded – undo
1558 1558
 
1559 1559
     public static function OriginatorLookup($originator_code) {
1560 1560
 
1561
-        static $lookup = array (
1561
+        static $lookup = array(
1562 1562
             0 => 'unspecified',
1563 1563
             1 => 'pre-set by artist/producer/mastering engineer',
1564 1564
             2 => 'set by user',
@@ -1572,7 +1572,7 @@  discard block
 block discarded – undo
1572 1572
 
1573 1573
     public static function AdjustmentLookup($raw_adjustment, $sign_bit) {
1574 1574
 
1575
-        return (float)$raw_adjustment / 10 * ($sign_bit == 1 ? -1 : 1);
1575
+        return (float) $raw_adjustment / 10 * ($sign_bit == 1 ? -1 : 1);
1576 1576
     }
1577 1577
 
1578 1578
 
Please login to merge, or discard this patch.
main/inc/lib/login_redirection.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,30 +18,30 @@  discard block
 block discarded – undo
18 18
         if (api_is_student() && !api_get_setting('student_page_after_login') == '') {
19 19
             $redirect_url = html_entity_decode(api_get_setting('student_page_after_login'));
20 20
             if ($redirect_url[0] == "/") {
21
-                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1) . $redirect_url;
21
+                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1).$redirect_url;
22 22
             }
23 23
         }
24 24
         if (api_is_teacher() && !api_get_setting('teacher_page_after_login') == '') {
25 25
             $redirect_url = html_entity_decode(api_get_setting('teacher_page_after_login'));
26 26
             if ($redirect_url[0] == "/") {
27
-                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1) . $redirect_url;
27
+                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1).$redirect_url;
28 28
             }
29 29
         }
30 30
         if (api_is_drh() && !api_get_setting('drh_page_after_login') == '') {
31 31
             $redirect_url = html_entity_decode(api_get_setting('drh_page_after_login'));
32 32
             if ($redirect_url[0] == "/") {
33
-                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1) . $redirect_url;
33
+                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1).$redirect_url;
34 34
             }
35 35
         }
36 36
         if (api_is_session_admin() && !api_get_setting('sessionadmin_page_after_login') == '') {
37 37
             $redirect_url = html_entity_decode(api_get_setting('sessionadmin_page_after_login'));
38 38
             if ($redirect_url[0] == "/") {
39
-                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1) . $redirect_url;
39
+                $redirect_url = substr(api_get_path(WEB_PATH), 0, -1).$redirect_url;
40 40
             }
41 41
         }
42 42
 
43 43
         if (!empty($redirect_url)) {
44
-            header('Location: ' . $redirect_url . $param);
44
+            header('Location: '.$redirect_url.$param);
45 45
             exit();
46 46
         }
47 47
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         if (CustomPages::enabled()) {
50 50
             CustomPages::display(CustomPages::INDEX_LOGGED);
51 51
         }
52
-        header('location: ' . api_get_path(WEB_PATH) . api_get_setting('page_after_login') . $param);
52
+        header('location: '.api_get_path(WEB_PATH).api_get_setting('page_after_login').$param);
53 53
         exit();
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
main/inc/lib/conditional_login.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
                     if (isset($condition['conditional_function']) && $condition['conditional_function']($user) == false) {
24 24
                         $_SESSION['conditional_login']['uid'] = $user['user_id'];
25 25
                         $_SESSION['conditional_login']['can_login'] = false;
26
-                        header("Location:". $condition['url']);
26
+                        header("Location:".$condition['url']);
27 27
                         exit();
28 28
                     }
29 29
                 }
Please login to merge, or discard this patch.
main/inc/lib/image.lib.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             return false;
116 116
         }
117 117
         $this->path = preg_match(VALID_WEB_PATH, $path) ? (api_is_internal_path($path) ? api_get_path(TO_SYS, $path) : $path) : $path;
118
-        $this->set_image_wrapper();  //Creates image obj
118
+        $this->set_image_wrapper(); //Creates image obj
119 119
     }
120 120
 
121 121
     abstract function set_image_wrapper();
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         if ($this->debug) error_log('Image::set_image_wrapper loaded');
158 158
         try {
159 159
             if (file_exists($this->path)) {
160
-                $this->image     = new Imagick($this->path);
160
+                $this->image = new Imagick($this->path);
161 161
 
162 162
                 if ($this->image) {
163 163
                     $this->fill_image_info(); //Fills height, width and type
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             } else {
166 166
                 if ($this->debug) error_log('Image::image does not exist');
167 167
             }
168
-        } catch(ImagickException $e) {
168
+        } catch (ImagickException $e) {
169 169
             if ($this->debug) error_log($e->getMessage());
170 170
         }
171 171
     }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
 	public function get_image_size()
188 188
     {
189
-		$imagesize = array('width'=>0,'height'=>0);
189
+		$imagesize = array('width'=>0, 'height'=>0);
190 190
 	    if ($this->image_validated) {
191 191
             $imagesize = $this->image->getImageGeometry();
192 192
 	    }
@@ -203,8 +203,8 @@  discard block
 block discarded – undo
203 203
             $height = $thumbh;
204 204
         } else {
205 205
             $scale  = ($this->width > 0 && $this->height > 0) ? min($thumbw / $this->width, $thumbh / $this->height) : 0;
206
-            $width  = (int)($this->width * $scale);
207
-            $height = (int)($this->height * $scale);
206
+            $width  = (int) ($this->width * $scale);
207
+            $height = (int) ($this->height * $scale);
208 208
         }
209 209
 		$result = $this->image->resizeImage($width, $height, $this->filter, 1);
210 210
 		$this->width  = $thumbw;
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 		$result = false;
251 251
 		try {
252 252
 		    $result = $this->image->writeImage($file);
253
-		} catch(ImagickException $e) {
253
+		} catch (ImagickException $e) {
254 254
             if ($this->debug) error_log($e->getMessage());
255 255
         }
256 256
 
@@ -311,9 +311,9 @@  discard block
 block discarded – undo
311 311
 
312 312
     public function get_image_size()
313 313
     {
314
-        $return_array = array('width'=>0,'height'=>0);
314
+        $return_array = array('width'=>0, 'height'=>0);
315 315
         if ($this->image_validated) {
316
-	        $return_array = array('width'=>$this->width,'height'=>$this->height);
316
+	        $return_array = array('width'=>$this->width, 'height'=>$this->height);
317 317
         }
318 318
         return $return_array;
319 319
 	}
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     public function fill_image_info()
322 322
     {
323 323
     	if (file_exists($this->path)) {
324
-	        $image_info     = getimagesize($this->path);
324
+	        $image_info = getimagesize($this->path);
325 325
 			$this->width    = $image_info[0];
326 326
 			$this->height   = $image_info[1];
327 327
 			$this->type     = $image_info[2];
@@ -341,11 +341,11 @@  discard block
 block discarded – undo
341 341
                 $height = $thumbh;
342 342
             } else {
343 343
                 $scale = min($thumbw / $this->width, $thumbh / $this->height);
344
-                $width = (int)($this->width * $scale);
345
-                $height = (int)($this->height * $scale);
344
+                $width = (int) ($this->width * $scale);
345
+                $height = (int) ($this->height * $scale);
346 346
             }
347
-			$deltaw = (int)(($thumbw - $width) / 2);
348
-			$deltah = (int)(($thumbh - $height) / 2);
347
+			$deltaw = (int) (($thumbw - $width) / 2);
348
+			$deltah = (int) (($thumbh - $height) / 2);
349 349
 			$dst_img = @ImageCreateTrueColor($thumbw, $thumbh);
350 350
             		@imagealphablending($dst_img, false);
351 351
 		        @imagesavealpha($dst_img, true);
@@ -360,8 +360,8 @@  discard block
 block discarded – undo
360 360
                 $height = $thumbh;
361 361
             } else {
362 362
                 $scale = ($this->width > 0 && $this->height > 0) ? min($thumbw / $this->width, $thumbh / $this->height) : 0;
363
-                $width  = (int)($this->width * $scale);
364
-                $height = (int)($this->height * $scale);
363
+                $width  = (int) ($this->width * $scale);
364
+                $height = (int) ($this->height * $scale);
365 365
             }
366 366
 			$deltaw = 0;
367 367
 			$deltah = 0;
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 	public function send_image($file = '', $compress = -1, $convert_file_to = null)
420 420
     {
421 421
 	    if (!$this->image_validated) return false;
422
-        $compress = (int)$compress;
422
+        $compress = (int) $compress;
423 423
         $type = $this->type;
424 424
         if (!empty($convert_file_to) && in_array($convert_file_to, $this->allowed_extensions)) {
425 425
             $type = $convert_file_to;
@@ -463,11 +463,11 @@  discard block
 block discarded – undo
463 463
          * so that we can use black (0,0,0) as transparent, which is what
464 464
          * the image is filled with when created.
465 465
          */
466
-        $transparent = imagecolorallocate($dest_img, 0,0,0);
466
+        $transparent = imagecolorallocate($dest_img, 0, 0, 0);
467 467
         imagealphablending($dest_img, false);
468 468
         imagesavealpha($dest_img, true);
469 469
         imagecolortransparent($dest_img, $transparent);
470
-        imagecopy($dest_img, $this->bg, 0,0, 0, 0,imagesx($this->bg), imagesx($this->bg));
470
+        imagecopy($dest_img, $this->bg, 0, 0, 0, 0, imagesx($this->bg), imagesx($this->bg));
471 471
         imagefilter($dest_img, IMG_FILTER_GRAYSCALE);
472 472
         $this->bg = $dest_img;
473 473
 
Please login to merge, or discard this patch.
main/inc/lib/login.lib.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -37,24 +37,24 @@  discard block
 block discarded – undo
37 37
             if ($by_username) {
38 38
                 $secret_word = self::get_secret_word($user['email']);
39 39
                 if ($reset) {
40
-                    $reset_link = $portal_url . "main/auth/lostPassword.php?reset=" . $secret_word . "&id=" . $user['uid'];
40
+                    $reset_link = $portal_url."main/auth/lostPassword.php?reset=".$secret_word."&id=".$user['uid'];
41 41
                 } else {
42
-                    $reset_link = get_lang('Pass') . " : $user[password]";
42
+                    $reset_link = get_lang('Pass')." : $user[password]";
43 43
                 }
44
-                $user_account_list = get_lang('YourRegistrationData') . " : \n" . get_lang('UserName') . ' : ' . $user['loginName'] . "\n" . get_lang('ResetLink') . ' : ' . $reset_link . '';
44
+                $user_account_list = get_lang('YourRegistrationData')." : \n".get_lang('UserName').' : '.$user['loginName']."\n".get_lang('ResetLink').' : '.$reset_link.'';
45 45
 
46 46
                 if ($user_account_list) {
47
-                    $user_account_list = "\n-----------------------------------------------\n" . $user_account_list;
47
+                    $user_account_list = "\n-----------------------------------------------\n".$user_account_list;
48 48
                 }
49 49
             } else {
50 50
                 foreach ($user as $this_user) {
51 51
                     $secret_word = self::get_secret_word($this_user['email']);
52 52
                     if ($reset) {
53
-                        $reset_link = $portal_url . "main/auth/lostPassword.php?reset=" . $secret_word . "&id=" . $this_user['uid'];
53
+                        $reset_link = $portal_url."main/auth/lostPassword.php?reset=".$secret_word."&id=".$this_user['uid'];
54 54
                     } else {
55
-                        $reset_link = get_lang('Pass') . " : $this_user[password]";
55
+                        $reset_link = get_lang('Pass')." : $this_user[password]";
56 56
                     }
57
-                    $user_account_list[] = get_lang('YourRegistrationData') . " : \n" . get_lang('UserName') . ' : ' . $this_user['loginName'] . "\n" . get_lang('ResetLink') . ' : ' . $reset_link . '';
57
+                    $user_account_list[] = get_lang('YourRegistrationData')." : \n".get_lang('UserName').' : '.$this_user['loginName']."\n".get_lang('ResetLink').' : '.$reset_link.'';
58 58
                 }
59 59
                 if ($user_account_list) {
60 60
                     $user_account_list = implode("\n-----------------------------------------------\n", $user_account_list);
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
             if (!$by_username) {
65 65
                 $user = $user[0];
66 66
             }
67
-            $reset_link = get_lang('Pass') . " : $user[password]";
68
-            $user_account_list = get_lang('YourRegistrationData') . " : \n" . get_lang('UserName') . ' : ' . $user['loginName'] . "\n" . $reset_link . '';
67
+            $reset_link = get_lang('Pass')." : $user[password]";
68
+            $user_account_list = get_lang('YourRegistrationData')." : \n".get_lang('UserName').' : '.$user['loginName']."\n".$reset_link.'';
69 69
         }
70 70
         return $user_account_list;
71 71
     }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public static function send_password_to_user($user, $by_username = false)
80 80
     {
81
-        $email_subject = "[" . api_get_setting('siteName') . "] " . get_lang('LoginRequest'); // SUBJECT
81
+        $email_subject = "[".api_get_setting('siteName')."] ".get_lang('LoginRequest'); // SUBJECT
82 82
 
83 83
         if ($by_username) { // Show only for lost password
84 84
             $user_account_list = self::get_user_account_list($user, false, $by_username); // BODY
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             }
98 98
         }
99 99
 
100
-        $email_body = get_lang('YourAccountParam') . " " . $portal_url . "\n\n$user_account_list";
100
+        $email_body = get_lang('YourAccountParam')." ".$portal_url."\n\n$user_account_list";
101 101
         // SEND MESSAGE
102 102
         $sender_name = api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'), null, PERSON_NAME_EMAIL_ADDRESS);
103 103
         $email_admin = api_get_setting('emailAdministrator');
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public static function handle_encrypted_password($user, $by_username = false)
133 133
     {
134
-        $email_subject = "[" . api_get_setting('siteName') . "] " . get_lang('LoginRequest'); // SUBJECT
134
+        $email_subject = "[".api_get_setting('siteName')."] ".get_lang('LoginRequest'); // SUBJECT
135 135
 
136 136
         if ($by_username) {
137 137
         // Show only for lost password
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
             $user_account_list = self::get_user_account_list($user, true); // BODY
142 142
             $email_to = $user[0]['email'];
143 143
         }
144
-        $email_body = get_lang('DearUser') . " :\n" . get_lang('password_request') . "\n";
145
-        $email_body .= $user_account_list . "\n-----------------------------------------------\n\n";
144
+        $email_body = get_lang('DearUser')." :\n".get_lang('password_request')."\n";
145
+        $email_body .= $user_account_list."\n-----------------------------------------------\n\n";
146 146
         $email_body .= get_lang('PasswordEncryptedForSecurity');
147 147
 
148
-        $email_body .= "\n\n" . get_lang('SignatureFormula') . ",\n" . api_get_setting('administratorName') . " " . api_get_setting('administratorSurname') . "\n" . get_lang('PlataformAdmin') . " - " . api_get_setting('siteName');
148
+        $email_body .= "\n\n".get_lang('SignatureFormula').",\n".api_get_setting('administratorName')." ".api_get_setting('administratorSurname')."\n".get_lang('PlataformAdmin')." - ".api_get_setting('siteName');
149 149
 
150 150
         $sender_name = api_get_person_name(
151 151
             api_get_setting('administratorName'),
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                     username AS loginName,
239 239
                     password,
240 240
                     email
241
-                FROM " . $tbl_user . "
241
+                FROM " . $tbl_user."
242 242
                 WHERE user_id = $id";
243 243
         $result = Database::query($sql);
244 244
         $num_rows = Database::num_rows($result);
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
                         ON user.user_id = a.user_id
292 292
                         LEFT JOIN $track_e_login login
293 293
                         ON user.user_id  = login.login_user_id
294
-                        WHERE user.user_id = '" . $_user['user_id'] . "'
294
+                        WHERE user.user_id = '".$_user['user_id']."'
295 295
                         ORDER BY login.login_date DESC LIMIT 1";
296 296
 
297 297
                 $result = Database::query($sql);
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
                     Session::write('is_platformAdmin', $is_platformAdmin);
322 322
                     Session::write('is_allowedCreateCourse', $is_allowedCreateCourse);
323 323
                 } else {
324
-                    header('location:' . api_get_path(WEB_PATH));
324
+                    header('location:'.api_get_path(WEB_PATH));
325 325
                     //exit("WARNING UNDEFINED UID !! ");
326 326
                 }
327 327
             } else { // no uid => logout or Anonymous
@@ -368,9 +368,9 @@  discard block
 block discarded – undo
368 368
         global $_course;
369 369
         global $_real_cid;
370 370
 
371
-        global $is_courseAdmin;  //course teacher
372
-        global $is_courseTutor;  //course teacher - some rights
373
-        global $is_courseCoach;  //course coach
371
+        global $is_courseAdmin; //course teacher
372
+        global $is_courseTutor; //course teacher - some rights
373
+        global $is_courseCoach; //course coach
374 374
         global $is_courseMember; //course student
375 375
         global $is_sessionAdmin;
376 376
         global $is_allowed_in_course;
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
 
428 428
                     if (!empty($_GET['id_session'])) {
429 429
                         $_SESSION['id_session'] = intval($_GET['id_session']);
430
-                        $sql = 'SELECT name FROM ' . $tbl_session . ' WHERE id="' . intval($_SESSION['id_session']) . '"';
430
+                        $sql = 'SELECT name FROM '.$tbl_session.' WHERE id="'.intval($_SESSION['id_session']).'"';
431 431
                         $rs = Database::query($sql);
432 432
                         list($_SESSION['session_name']) = Database::fetch_array($rs);
433 433
                     } else {
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
                     }
444 444
                 } else {
445 445
                     //exit("WARNING UNDEFINED CID !! ");
446
-                    header('location:' . api_get_path(WEB_PATH));
446
+                    header('location:'.api_get_path(WEB_PATH));
447 447
                 }
448 448
             } else {
449 449
                 Session::erase('_cid');
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
         } else {
471 471
             // Continue with the previous values
472 472
             if (empty($_SESSION['_course']) OR empty($_SESSION['_cid'])) { //no previous values...
473
-                $_cid = -1;        //set default values that will be caracteristic of being unset
473
+                $_cid = -1; //set default values that will be caracteristic of being unset
474 474
                 $_course = -1;
475 475
             } else {
476 476
                 $_cid = $_SESSION['_cid'];
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
                 // Moreover, if we want to track a course with another session it can be usefull
481 481
                 if (!empty($_GET['id_session'])) {
482 482
                     $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
483
-                    $sql = 'SELECT name FROM ' . $tbl_session . ' WHERE id="' . intval($_SESSION['id_session']) . '"';
483
+                    $sql = 'SELECT name FROM '.$tbl_session.' WHERE id="'.intval($_SESSION['id_session']).'"';
484 484
                     $rs = Database::query($sql);
485 485
                     list($_SESSION['session_name']) = Database::fetch_array($rs);
486 486
                     $_SESSION['id_session'] = intval($_GET['id_session']);
@@ -520,9 +520,9 @@  discard block
 block discarded – undo
520 520
                             //But only if the login date is < than now + max_life_time
521 521
                             $sql = "SELECT course_access_id FROM $course_tracking_table
522 522
                                     WHERE
523
-                                        user_id     = " . intval($_user ['user_id']) . " AND
523
+                                        user_id     = ".intval($_user ['user_id'])." AND
524 524
                                         c_id = '".api_get_course_int_id()."' AND
525
-                                        session_id  = " . api_get_session_id() . " AND
525
+                                        session_id  = " . api_get_session_id()." AND
526 526
                                         login_course_date > now() - INTERVAL $session_lifetime SECOND
527 527
                                     ORDER BY login_course_date DESC LIMIT 0,1";
528 528
                             $result = Database::query($sql);
@@ -532,11 +532,11 @@  discard block
 block discarded – undo
532 532
                                 //We update the course tracking table
533 533
                                 $sql = "UPDATE $course_tracking_table
534 534
                                         SET logout_course_date = '$time', counter = counter+1
535
-                                        WHERE course_access_id = " . intval($i_course_access_id) . " AND session_id = " . api_get_session_id();
535
+                                        WHERE course_access_id = ".intval($i_course_access_id)." AND session_id = ".api_get_session_id();
536 536
                                 Database::query($sql);
537 537
                             } else {
538
-                                $sql = "INSERT INTO $course_tracking_table (c_id, user_id, login_course_date, logout_course_date, counter, session_id)" .
539
-                                        "VALUES('" . api_get_course_int_id() . "', '" . $_user['user_id'] . "', '$time', '$time', '1','" . api_get_session_id() . "')";
538
+                                $sql = "INSERT INTO $course_tracking_table (c_id, user_id, login_course_date, logout_course_date, counter, session_id)".
539
+                                        "VALUES('".api_get_course_int_id()."', '".$_user['user_id']."', '$time', '$time', '1','".api_get_session_id()."')";
540 540
                                 Database::query($sql);
541 541
                             }
542 542
                         }
@@ -564,8 +564,8 @@  discard block
 block discarded – undo
564 564
                 $course_user_table = Database::get_main_table(TABLE_MAIN_COURSE_USER);
565 565
                 $sql = "SELECT * FROM $course_user_table
566 566
                        WHERE
567
-                        user_id  = '" . $user_id . "' AND
568
-                        relation_type <> " . COURSE_RELATION_TYPE_RRHH . " AND
567
+                        user_id  = '".$user_id."' AND
568
+                        relation_type <> " . COURSE_RELATION_TYPE_RRHH." AND
569 569
                         course_code = '$course_id'";
570 570
                 $result = Database::query($sql);
571 571
 
@@ -585,8 +585,8 @@  discard block
 block discarded – undo
585 585
                             $session_id
586 586
                         );
587 587
                         if (!$user_is_subscribed) {
588
-                            $url = api_get_path(WEB_CODE_PATH) . 'course_info/legal.php?course_code=' . $_course['code'] . '&session_id=' . $session_id;
589
-                            header('Location: ' . $url);
588
+                            $url = api_get_path(WEB_CODE_PATH).'course_info/legal.php?course_code='.$_course['code'].'&session_id='.$session_id;
589
+                            header('Location: '.$url);
590 590
                             exit;
591 591
                         }
592 592
                     }
@@ -627,11 +627,11 @@  discard block
 block discarded – undo
627 627
                         } else {
628 628
                             //Im a coach or a student?
629 629
                             $sql = "SELECT user_id, status
630
-                                    FROM " . $tbl_session_course_user . "
630
+                                    FROM " . $tbl_session_course_user."
631 631
                                     WHERE
632 632
                                         c_id = '$_cid' AND
633
-                                        user_id = '" . $user_id . "' AND
634
-                                        session_id = '" . $session_id . "'
633
+                                        user_id = '".$user_id."' AND
634
+                                        session_id = '" . $session_id."'
635 635
                                     LIMIT 1";
636 636
                             $result = Database::query($sql);
637 637
 
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
         if ($reset) { // session data refresh requested
778 778
             if ($group_id && $_cid && !empty($_course['real_id'])) { // have keys to search data
779 779
                 $group_table = Database::get_course_table(TABLE_GROUP);
780
-                $sql = "SELECT * FROM $group_table WHERE c_id = " . $_course['real_id'] . " AND id = '$group_id'";
780
+                $sql = "SELECT * FROM $group_table WHERE c_id = ".$_course['real_id']." AND id = '$group_id'";
781 781
                 $result = Database::query($sql);
782 782
                 if (Database::num_rows($result) > 0) { // This group has recorded status related to this course
783 783
                     $gpData = Database::fetch_array($result);
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
      */
831 831
     public static function get_user_accounts_by_username($username)
832 832
     {
833
-        if (strpos($username,'@')){
833
+        if (strpos($username, '@')) {
834 834
             $username = api_strtolower($username);
835 835
             $email = true;
836 836
         } else {
Please login to merge, or discard this patch.
main/inc/lib/specific_fields_manager.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 function delete_specific_field($id)
43 43
 {
44 44
     $table_sf = Database:: get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
45
-    $id = (int)$id;
45
+    $id = (int) $id;
46 46
     if (!is_numeric($id)) {
47 47
         return false;
48 48
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 function edit_specific_field($id, $name)
61 61
 {
62 62
     $table_sf = Database:: get_main_table(TABLE_MAIN_SPECIFIC_FIELD);
63
-    $id = (int)$id;
63
+    $id = (int) $id;
64 64
     if (!is_numeric($id)) {
65 65
         return false;
66 66
     }
Please login to merge, or discard this patch.