@@ -88,7 +88,7 @@ |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | $timePicker = 'true'; |
91 | - $timePickerValue = $this->getAttribute('timePicker'); |
|
91 | + $timePickerValue = $this->getAttribute('timePicker'); |
|
92 | 92 | if (!empty($timePickerValue)) { |
93 | 93 | $timePicker = $timePickerValue; |
94 | 94 | } |
@@ -44,12 +44,12 @@ discard block |
||
44 | 44 | $value = api_format_date($value, DATE_TIME_FORMAT_LONG_24H); |
45 | 45 | } |
46 | 46 | |
47 | - return $this->getElementJS() . ' |
|
47 | + return $this->getElementJS().' |
|
48 | 48 | <div class="input-group"> |
49 | 49 | <span class="input-group-addon"> |
50 | - <input ' . $this->_getAttrString($this->_attributes) . '> |
|
50 | + <input ' . $this->_getAttrString($this->_attributes).'> |
|
51 | 51 | </span> |
52 | - <input class="form-control" type="text" readonly id="' . $id . '_alt" value="' . $value . '"> |
|
52 | + <input class="form-control" type="text" readonly id="' . $id.'_alt" value="'.$value.'"> |
|
53 | 53 | </div> |
54 | 54 | '; |
55 | 55 | } |
@@ -79,14 +79,14 @@ discard block |
||
79 | 79 | $js .= "<script> |
80 | 80 | $(function() { |
81 | 81 | $('#$id').hide().datepicker({ |
82 | - defaultDate: '" . $this->getValue() . "', |
|
82 | + defaultDate: '".$this->getValue()."', |
|
83 | 83 | dateFormat: 'yy-mm-dd', |
84 | 84 | altField: '#{$id}_alt', |
85 | - altFormat: \"" . get_lang('DateFormatLongNoDayJS') . "\", |
|
85 | + altFormat: \"".get_lang('DateFormatLongNoDayJS')."\", |
|
86 | 86 | showOn: 'both', |
87 | - buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true) . "', |
|
87 | + buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true)."', |
|
88 | 88 | buttonImageOnly: true, |
89 | - buttonText: '" . get_lang('SelectDate') . "', |
|
89 | + buttonText: '" . get_lang('SelectDate')."', |
|
90 | 90 | changeMonth: true, |
91 | 91 | changeYear: true, |
92 | 92 | yearRange: 'c-60y:c+5y' |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $iso = api_get_language_isocode(api_get_interface_language()); |
26 | 26 | $languageCondition = ''; |
27 | 27 | |
28 | - if (file_exists(api_get_path(SYS_PATH) . "web/assets/select2/dist/js/i18n/$iso.js")) { |
|
28 | + if (file_exists(api_get_path(SYS_PATH)."web/assets/select2/dist/js/i18n/$iso.js")) { |
|
29 | 29 | $html .= api_get_asset("select2/dist/js/i18n/$iso.js"); |
30 | 30 | $languageCondition = "language: '$iso',"; |
31 | 31 | } |
@@ -50,8 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | //Get the minimumInputLength for select2 |
52 | 52 | $minimumInputLength = $this->getAttribute('minimumInputLength') > 3 ? |
53 | - $this->getAttribute('minimumInputLength') : |
|
54 | - 3 |
|
53 | + $this->getAttribute('minimumInputLength') : 3 |
|
55 | 54 | ; |
56 | 55 | |
57 | 56 | $plHolder = $this->getAttribute('placeholder'); |
@@ -113,6 +112,6 @@ discard block |
||
113 | 112 | $this->removeAttribute('url_function'); |
114 | 113 | $this->setAttribute('style', 'width: 100%;'); |
115 | 114 | |
116 | - return parent::toHtml() . $html; |
|
115 | + return parent::toHtml().$html; |
|
117 | 116 | } |
118 | 117 | } |
@@ -38,12 +38,12 @@ discard block |
||
38 | 38 | $value = api_format_date($value, DATE_TIME_FORMAT_LONG_24H); |
39 | 39 | } |
40 | 40 | |
41 | - return $this->getElementJS() . ' |
|
41 | + return $this->getElementJS().' |
|
42 | 42 | <div class="input-group"> |
43 | 43 | <span class="input-group-addon"> |
44 | - <input ' . $this->_getAttrString($this->_attributes) . '> |
|
44 | + <input ' . $this->_getAttrString($this->_attributes).'> |
|
45 | 45 | </span> |
46 | - <input class="form-control" type="text" readonly id="' . $id . '_alt" value="' . $value . '"> |
|
46 | + <input class="form-control" type="text" readonly id="' . $id.'_alt" value="'.$value.'"> |
|
47 | 47 | </div> |
48 | 48 | '; |
49 | 49 | } |
@@ -73,18 +73,18 @@ discard block |
||
73 | 73 | $js .= "<script> |
74 | 74 | $(function() { |
75 | 75 | $('#$id').hide().datetimepicker({ |
76 | - defaultDate: '" . $this->getValue() . "', |
|
76 | + defaultDate: '".$this->getValue()."', |
|
77 | 77 | dateFormat: 'yy-mm-dd', |
78 | 78 | timeFormat: 'HH:mm', |
79 | 79 | altField: '#{$id}_alt', |
80 | - altFormat: \"" . get_lang('DateFormatLongNoDayJS') . "\", |
|
81 | - altTimeFormat: \"" . get_lang('TimeFormatNoSecJS') . "\", |
|
82 | - altSeparator: \" " . get_lang('AtTime') . " \", |
|
80 | + altFormat: \"".get_lang('DateFormatLongNoDayJS')."\", |
|
81 | + altTimeFormat: \"" . get_lang('TimeFormatNoSecJS')."\", |
|
82 | + altSeparator: \" " . get_lang('AtTime')." \", |
|
83 | 83 | altFieldTimeOnly: false, |
84 | 84 | showOn: 'both', |
85 | - buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true) . "', |
|
85 | + buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true)."', |
|
86 | 86 | buttonImageOnly: true, |
87 | - buttonText: '" . get_lang('SelectDate') . "', |
|
87 | + buttonText: '" . get_lang('SelectDate')."', |
|
88 | 88 | changeMonth: true, |
89 | 89 | changeYear: true |
90 | 90 | }); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | return true; |
22 | 22 | } |
23 | 23 | } |
24 | - $result = parent::validate(array($datetime1, $datetime2), $operator); |
|
24 | + $result = parent::validate(array($datetime1, $datetime2), $operator); |
|
25 | 25 | return $result; |
26 | 26 | } |
27 | 27 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | function validate($html, $mode = NO_HTML) |
18 | 18 | { |
19 | - $allowed_tags = self::get_allowed_tags ($mode, $fullpage); |
|
19 | + $allowed_tags = self::get_allowed_tags($mode, $fullpage); |
|
20 | 20 | $cleaned_html = kses($html, $allowed_tags); |
21 | 21 | return $html == $cleaned_html; |
22 | 22 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | // Include the allowed tags. |
34 | 34 | //include(dirname(__FILE__).'/allowed_tags.inc.php'); |
35 | 35 | global $allowed_tags_student, $allowed_tags_student_full_page, $allowed_tags_teacher, $allowed_tags_teacher_full_page; |
36 | - switch($mode) |
|
36 | + switch ($mode) |
|
37 | 37 | { |
38 | 38 | case NO_HTML: |
39 | 39 | return array(); |
@@ -27,11 +27,11 @@ |
||
27 | 27 | */ |
28 | 28 | function validate($value, $options = null) |
29 | 29 | { |
30 | - if(is_array($value)) |
|
30 | + if (is_array($value)) |
|
31 | 31 | { |
32 | - $value = implode(null,$value); |
|
32 | + $value = implode(null, $value); |
|
33 | 33 | } |
34 | - if ((string)$value == '') { |
|
34 | + if ((string) $value == '') { |
|
35 | 35 | return false; |
36 | 36 | } |
37 | 37 | return true; |
@@ -109,7 +109,7 @@ |
||
109 | 109 | }*/ |
110 | 110 | // If the session time has expired, refresh the starttime value, |
111 | 111 | // so we're starting to count down from a later time |
112 | - if ( $session->has('starttime') && $session->is_expired()) { |
|
112 | + if ($session->has('starttime') && $session->is_expired()) { |
|
113 | 113 | $session->destroy(); |
114 | 114 | } else { |
115 | 115 | //error_log('Time not expired, extend session for a bit more'); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | define('TYPE_POS', 0x42); |
15 | 15 | define('START_BLOCK_POS', 0x74); |
16 | 16 | define('SIZE_POS', 0x78); |
17 | -define('IDENTIFIER_OLE', pack("CCCCCCCC",0xd0,0xcf,0x11,0xe0,0xa1,0xb1,0x1a,0xe1)); |
|
17 | +define('IDENTIFIER_OLE', pack("CCCCCCCC", 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1)); |
|
18 | 18 | |
19 | 19 | //echo 'ROOT_START_BLOCK_POS = '.ROOT_START_BLOCK_POS."\n"; |
20 | 20 | |
@@ -25,10 +25,10 @@ discard block |
||
25 | 25 | |
26 | 26 | function GetInt4d($data, $pos) |
27 | 27 | { |
28 | - $value = ord($data[$pos]) | (ord($data[$pos+1]) << 8) | (ord($data[$pos+2]) << 16) | (ord($data[$pos+3]) << 24); |
|
29 | - if ($value>=4294967294) |
|
28 | + $value = ord($data[$pos]) | (ord($data[$pos + 1]) << 8) | (ord($data[$pos + 2]) << 16) | (ord($data[$pos + 3]) << 24); |
|
29 | + if ($value >= 4294967294) |
|
30 | 30 | { |
31 | - $value=-2; |
|
31 | + $value = -2; |
|
32 | 32 | } |
33 | 33 | return $value; |
34 | 34 | } |
@@ -38,15 +38,15 @@ discard block |
||
38 | 38 | var $data = ''; |
39 | 39 | |
40 | 40 | |
41 | - function OLERead(){ |
|
41 | + function OLERead() { |
|
42 | 42 | |
43 | 43 | |
44 | 44 | } |
45 | 45 | |
46 | - function read($sFileName){ |
|
46 | + function read($sFileName) { |
|
47 | 47 | |
48 | 48 | // check if file exist and is readable (Darko Miljanovic) |
49 | - if(!is_readable($sFileName)) { |
|
49 | + if (!is_readable($sFileName)) { |
|
50 | 50 | $this->error = 1; |
51 | 51 | return false; |
52 | 52 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $bbdBlocks = $this->numBigBlockDepotBlocks; |
83 | 83 | |
84 | 84 | if ($this->numExtensionBlocks != 0) { |
85 | - $bbdBlocks = (BIG_BLOCK_SIZE - BIG_BLOCK_DEPOT_BLOCKS_POS)/4; |
|
85 | + $bbdBlocks = (BIG_BLOCK_SIZE - BIG_BLOCK_DEPOT_BLOCKS_POS) / 4; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | for ($i = 0; $i < $bbdBlocks; $i++) { |
@@ -116,9 +116,9 @@ discard block |
||
116 | 116 | for ($i = 0; $i < $this->numBigBlockDepotBlocks; $i++) { |
117 | 117 | $pos = ($bigBlockDepotBlocks[$i] + 1) * BIG_BLOCK_SIZE; |
118 | 118 | //echo "pos = $pos"; |
119 | - for ($j = 0 ; $j < BIG_BLOCK_SIZE / 4; $j++) { |
|
119 | + for ($j = 0; $j < BIG_BLOCK_SIZE / 4; $j++) { |
|
120 | 120 | $this->bigBlockChain[$index] = GetInt4d($this->data, $pos); |
121 | - $pos += 4 ; |
|
121 | + $pos += 4; |
|
122 | 122 | $index++; |
123 | 123 | } |
124 | 124 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $pos = 0; |
168 | 168 | $data = ''; |
169 | 169 | |
170 | - while ($block != -2) { |
|
170 | + while ($block != -2) { |
|
171 | 171 | $pos = ($block + 1) * BIG_BLOCK_SIZE; |
172 | 172 | $data = $data.substr($this->data, $pos, BIG_BLOCK_SIZE); |
173 | 173 | //echo "pos = $pos data=$data\n"; |
@@ -176,13 +176,13 @@ discard block |
||
176 | 176 | return $data; |
177 | 177 | } |
178 | 178 | |
179 | - function __readPropertySets(){ |
|
179 | + function __readPropertySets() { |
|
180 | 180 | $offset = 0; |
181 | 181 | //var_dump($this->entry); |
182 | 182 | while ($offset < strlen($this->entry)) { |
183 | 183 | $d = substr($this->entry, $offset, PROPERTY_STORAGE_BLOCK_SIZE); |
184 | 184 | |
185 | - $nameSize = ord($d[SIZE_OF_NAME_POS]) | (ord($d[SIZE_OF_NAME_POS+1]) << 8); |
|
185 | + $nameSize = ord($d[SIZE_OF_NAME_POS]) | (ord($d[SIZE_OF_NAME_POS + 1]) << 8); |
|
186 | 186 | |
187 | 187 | $type = ord($d[TYPE_POS]); |
188 | 188 | //$maxBlock = strlen($d) / BIG_BLOCK_SIZE - 1; |
@@ -191,13 +191,13 @@ discard block |
||
191 | 191 | $size = GetInt4d($d, SIZE_POS); |
192 | 192 | |
193 | 193 | $name = ''; |
194 | - for ($i = 0; $i < $nameSize ; $i++) { |
|
194 | + for ($i = 0; $i < $nameSize; $i++) { |
|
195 | 195 | $name .= $d[$i]; |
196 | 196 | } |
197 | 197 | |
198 | 198 | $name = str_replace("\x00", "", $name); |
199 | 199 | |
200 | - $this->props[] = array ( |
|
200 | + $this->props[] = array( |
|
201 | 201 | 'name' => $name, |
202 | 202 | 'type' => $type, |
203 | 203 | 'startBlock' => $startBlock, |
@@ -220,8 +220,8 @@ discard block |
||
220 | 220 | } |
221 | 221 | |
222 | 222 | |
223 | - function getWorkBook(){ |
|
224 | - if ($this->props[$this->wrkbook]['size'] < SMALL_BLOCK_THRESHOLD){ |
|
223 | + function getWorkBook() { |
|
224 | + if ($this->props[$this->wrkbook]['size'] < SMALL_BLOCK_THRESHOLD) { |
|
225 | 225 | // getSmallBlockStream(PropertyStorage ps) |
226 | 226 | |
227 | 227 | $rootdata = $this->__readData($this->props[$this->rootentry]['startBlock']); |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | return $streamData; |
241 | 241 | |
242 | 242 | |
243 | - }else{ |
|
243 | + } else { |
|
244 | 244 | |
245 | 245 | $numBlocks = $this->props[$this->wrkbook]['size'] / BIG_BLOCK_SIZE; |
246 | 246 | if ($this->props[$this->wrkbook]['size'] % BIG_BLOCK_SIZE != 0) { |