@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | global $extcalConfig, $xoopsUser; |
4 | -include_once __DIR__ . '/../include/constantes.php'; |
|
5 | -include_once __DIR__ . '/../class/utilities.php'; |
|
6 | -include_once __DIR__ . '/../class/tableForm.php'; |
|
4 | +include_once __DIR__.'/../include/constantes.php'; |
|
5 | +include_once __DIR__.'/../class/utilities.php'; |
|
6 | +include_once __DIR__.'/../class/tableForm.php'; |
|
7 | 7 | //--------------------------------------------------------------------------- |
8 | 8 | /** |
9 | 9 | * @param $options |
@@ -16,11 +16,11 @@ discard block |
||
16 | 16 | |
17 | 17 | extcal_getDefautminicalOption($options); |
18 | 18 | |
19 | - include_once __DIR__ . '/../class/config.php'; |
|
19 | + include_once __DIR__.'/../class/config.php'; |
|
20 | 20 | |
21 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Util/Textual.php'; |
|
22 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Month/Weeks.php'; |
|
23 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Day.php'; |
|
21 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Util/Textual.php'; |
|
22 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Month/Weeks.php'; |
|
23 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Day.php'; |
|
24 | 24 | // require_once CALENDAR_ROOT . 'Month/Weeks.php'; |
25 | 25 | // require_once CALENDAR_ROOT . 'Day.php'; |
26 | 26 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | 'cat' => $tCatSelected, |
107 | 107 | 'externalKeys' => 'cat_id', |
108 | 108 | ); |
109 | - $events = $eventHandler->getEventsOnPeriode($criteres); |
|
109 | + $events = $eventHandler->getEventsOnPeriode($criteres); |
|
110 | 110 | } else { |
111 | 111 | $events = array(); |
112 | 112 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | 'number' => $dayCalObj->thisDay(), |
169 | 169 | 'isSelected' => $dayCalObj->isSelected(), |
170 | 170 | ); |
171 | - $day = $dayCalObj->thisDay(); |
|
171 | + $day = $dayCalObj->thisDay(); |
|
172 | 172 | if (isset($eventsArray[$day]) && !$dayCalObj->isEmpty()) { |
173 | 173 | $tableRows[$rowId]['week'][$cellId]['haveEvents'] = true; |
174 | 174 | $tableRows[$rowId]['week'][$cellId]['color'] = $eventsArray[$day]['color']; |
@@ -198,15 +198,15 @@ discard block |
||
198 | 198 | // Making navig data |
199 | 199 | $navig = array( |
200 | 200 | 'page' => $extcalConfig['start_page'], |
201 | - 'uri' => 'year=' . $monthCalObj->thisYear() . '&month=' . $monthCalObj->thisMonth(), |
|
201 | + 'uri' => 'year='.$monthCalObj->thisYear().'&month='.$monthCalObj->thisMonth(), |
|
202 | 202 | 'name' => $extcalTimeHandler->getFormatedDate($extcalConfig['nav_date_month'], $monthCalObj->getTimestamp()), |
203 | 203 | ); |
204 | 204 | |
205 | 205 | $horloge = array(); |
206 | 206 | $horloge['display'] = (trim($options[11]) != ''); |
207 | - $horloge['fullName'] = XOOPS_URL . _EXTCAL_PATH_HORLOGES . $options[11]; |
|
208 | - $horloge['width'] = $options[12] . 'px'; |
|
209 | - $horloge['height'] = $options[13] . 'px'; |
|
207 | + $horloge['fullName'] = XOOPS_URL._EXTCAL_PATH_HORLOGES.$options[11]; |
|
208 | + $horloge['width'] = $options[12].'px'; |
|
209 | + $horloge['height'] = $options[13].'px'; |
|
210 | 210 | |
211 | 211 | $ret = array( |
212 | 212 | 'imageParam' => $imageParam, |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | */ |
233 | 233 | function bExtcalMinicalEdit($options) |
234 | 234 | { |
235 | - include_once __DIR__ . '/../class/form/spin/formspin.php'; |
|
235 | + include_once __DIR__.'/../class/form/spin/formspin.php'; |
|
236 | 236 | global $xoopsUser; |
237 | 237 | |
238 | 238 | // $t = print_r(get_defined_vars(),true); |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | $imageCatHandler = xoops_getHandler('imagecategory'); |
254 | 254 | |
255 | 255 | //===================================================================== |
256 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_OPT_SLIDE_SHOW . '</div>', 'head'); |
|
256 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_OPT_SLIDE_SHOW.'</div>', 'head'); |
|
257 | 257 | |
258 | 258 | $k = 0; |
259 | 259 | $xfValue[$k] = new XoopsFormRadio(_MB_EXTCAL_DISPLAY_IMG, "options[{$k}]", $options[$k]); |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | $xfValue[$k] = new ExtcalFormSpin(_MB_EXTCAL_SS_NB_PHOTOS, "options[{$k}]", $options[$k], 0, 50, 1, 0, 8, _MB_EXTCAL_PX, $imgFolder = ''); |
295 | 295 | $form->addElement($xfValue[$k], false); |
296 | 296 | //===================================================================== |
297 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_OPT_SHOW . '</div>', 'head'); |
|
297 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_OPT_SHOW.'</div>', 'head'); |
|
298 | 298 | |
299 | 299 | $t = array( |
300 | 300 | -1 => _MB_EXTCAL_PREVIEW, |
@@ -333,9 +333,9 @@ discard block |
||
333 | 333 | $form->addElement($xfValue[$k], false); |
334 | 334 | |
335 | 335 | //===================================================================== |
336 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_HORLOGE_OPT . '</div>', 'head'); |
|
336 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_HORLOGE_OPT.'</div>', 'head'); |
|
337 | 337 | //--------------------------------------------------------------------- |
338 | - $t = XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH . _EXTCAL_PATH_HORLOGES); |
|
338 | + $t = XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH._EXTCAL_PATH_HORLOGES); |
|
339 | 339 | $t = array_merge(array(' ' => _NONE), $t); |
340 | 340 | |
341 | 341 | $k = 11; |
@@ -418,12 +418,12 @@ discard block |
||
418 | 418 | // $src = $doc->createElement('src'); |
419 | 419 | $src = clone $tempSrc; |
420 | 420 | $src = $photo->appendChild($src); |
421 | - $value = $doc->createTextNode(XOOPS_URL . '/uploads/' . $images->getVar('image_name')); |
|
421 | + $value = $doc->createTextNode(XOOPS_URL.'/uploads/'.$images->getVar('image_name')); |
|
422 | 422 | $src->appendChild($value); |
423 | 423 | } |
424 | 424 | |
425 | 425 | // get completed xml document |
426 | - $xml_string = $doc->save(XOOPS_ROOT_PATH . '/cache/extcalSlideShowParam.xml'); |
|
426 | + $xml_string = $doc->save(XOOPS_ROOT_PATH.'/cache/extcalSlideShowParam.xml'); |
|
427 | 427 | } |
428 | 428 | |
429 | 429 | /**************************************************************************/ |
@@ -30,17 +30,17 @@ |
||
30 | 30 | global $xoopsDB; |
31 | 31 | |
32 | 32 | // Create eXtcal upload directory if don't exist |
33 | - $dir = XOOPS_ROOT_PATH . '/uploads/extcal'; |
|
33 | + $dir = XOOPS_ROOT_PATH.'/uploads/extcal'; |
|
34 | 34 | if (!is_dir($dir)) { |
35 | 35 | mkdir($dir); |
36 | 36 | |
37 | 37 | // Copy index.html files on uploads folders |
38 | - $indexFile = __DIR__ . '/index.html'; |
|
39 | - copy($indexFile, XOOPS_ROOT_PATH . '/uploads/extcal/index.html'); |
|
38 | + $indexFile = __DIR__.'/index.html'; |
|
39 | + copy($indexFile, XOOPS_ROOT_PATH.'/uploads/extcal/index.html'); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | // Create who's not going table to fix bug. If the table exist, the query will faile |
43 | - $sql = 'CREATE TABLE `' . $xoopsDB->prefix('extcal_eventnotmember') |
|
43 | + $sql = 'CREATE TABLE `'.$xoopsDB->prefix('extcal_eventnotmember') |
|
44 | 44 | . "` (`eventnotmember_id` int(11) NOT NULL auto_increment,`event_id` int(11) NOT NULL default '0',`uid` int(11) NOT NULL default '0',PRIMARY KEY (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;"; |
45 | 45 | $xoopsDB->query($sql); |
46 | 46 | } |
@@ -32,26 +32,26 @@ |
||
32 | 32 | //$xoopsDB = Database::getInstance(); |
33 | 33 | $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection(); |
34 | 34 | |
35 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . "` CHANGE `event_approved` `event_approved` TINYINT( 1 ) NOT NULL DEFAULT '0' ;"; |
|
35 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event')."` CHANGE `event_approved` `event_approved` TINYINT( 1 ) NOT NULL DEFAULT '0' ;"; |
|
36 | 36 | $xoopsDB->query($sql); |
37 | 37 | |
38 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_isrecur` TINYINT( 1 ) NOT NULL AFTER `event_nbmember` ;'; |
|
38 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_isrecur` TINYINT( 1 ) NOT NULL AFTER `event_nbmember` ;'; |
|
39 | 39 | $xoopsDB->query($sql); |
40 | 40 | |
41 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_rules` VARCHAR( 255 ) NOT NULL AFTER `event_isrecur` '; |
|
41 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_rules` VARCHAR( 255 ) NOT NULL AFTER `event_isrecur` '; |
|
42 | 42 | $xoopsDB->query($sql); |
43 | 43 | |
44 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_start` INT( 11 ) NOT NULL AFTER `event_recur_rules` ;'; |
|
44 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_start` INT( 11 ) NOT NULL AFTER `event_recur_rules` ;'; |
|
45 | 45 | $xoopsDB->query($sql); |
46 | 46 | |
47 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_end` INT( 11 ) NOT NULL AFTER `event_recur_start` ;'; |
|
47 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_end` INT( 11 ) NOT NULL AFTER `event_recur_start` ;'; |
|
48 | 48 | $xoopsDB->query($sql); |
49 | 49 | |
50 | - $sql = 'CREATE TABLE `' . $xoopsDB->prefix('extcal_event') |
|
50 | + $sql = 'CREATE TABLE `'.$xoopsDB->prefix('extcal_event') |
|
51 | 51 | . "` (`eventnotmember_id` int(11) NOT NULL auto_increment,`event_id` int(11) NOT NULL default '0',`uid` int(11) NOT NULL default '0',PRIMARY KEY (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;"; |
52 | 52 | $xoopsDB->query($sql); |
53 | 53 | |
54 | - $sql = 'CREATE TABLE `' . $xoopsDB->prefix('extcal_file') |
|
54 | + $sql = 'CREATE TABLE `'.$xoopsDB->prefix('extcal_file') |
|
55 | 55 | . "` (`file_id` int(11) NOT NULL auto_increment,`file_name` varchar(255) NOT NULL,`file_nicename` varchar(255) NOT NULL,`file_mimetype` varchar(255) NOT NULL,`file_size` int(11) NOT NULL,`file_download` int(11) NOT NULL,`file_date` int(11) NOT NULL,`file_approved` tinyint(1) NOT NULL,`event_id` int(11) NOT NULL,`uid` int(11) NOT NULL,PRIMARY KEY (`file_id`)) COMMENT='eXtcal By Zoullou' ;"; |
56 | 56 | $xoopsDB->query($sql); |
57 | 57 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * L'utilisation de ce formulaire d'adminitration suppose |
16 | 16 | * que la classe correspondante de la table a été générées avec classGenerator |
17 | 17 | **/ |
18 | -include_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
18 | +include_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Class ExtcalUtilities. |
@@ -48,12 +48,12 @@ discard block |
||
48 | 48 | public static function extcal_loadImg(&$REQUEST, &$event_picture1, &$event_picture2) |
49 | 49 | { |
50 | 50 | /////////////////////////////////////////////////////////////////////////////// |
51 | - $uploaddir_event = XOOPS_ROOT_PATH . '/uploads/extcal/'; |
|
52 | - $uploadurl_event = XOOPS_URL . '/uploads/extcal/'; |
|
51 | + $uploaddir_event = XOOPS_ROOT_PATH.'/uploads/extcal/'; |
|
52 | + $uploadurl_event = XOOPS_URL.'/uploads/extcal/'; |
|
53 | 53 | //$picture = ''; |
54 | 54 | for ($j = 1; $j < 3; ++$j) { |
55 | - $delimg = @$REQUEST['delimg_' . $j . '']; |
|
56 | - $delimg = isset($delimg) ? (int)$delimg : 0; |
|
55 | + $delimg = @$REQUEST['delimg_'.$j.'']; |
|
56 | + $delimg = isset($delimg) ? (int) $delimg : 0; |
|
57 | 57 | if (0 == $delimg && !empty($REQUEST['xoops_upload_file'][$j])) { |
58 | 58 | $upload = new XoopsMediaUploader($uploaddir_event, array( |
59 | 59 | 'image/gif', |
@@ -76,15 +76,15 @@ discard block |
||
76 | 76 | $event_picture2 = $upload->getSavedFileName(); |
77 | 77 | } |
78 | 78 | } |
79 | - } elseif (!empty($REQUEST['file' . $j])) { |
|
79 | + } elseif (!empty($REQUEST['file'.$j])) { |
|
80 | 80 | if ($j == 1) { |
81 | - $event_picture1 = $REQUEST['file' . $j]; |
|
81 | + $event_picture1 = $REQUEST['file'.$j]; |
|
82 | 82 | } elseif ($j == 2) { |
83 | - $event_picture2 = $REQUEST['file' . $j]; |
|
83 | + $event_picture2 = $REQUEST['file'.$j]; |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | } else { |
87 | - $url_event = XOOPS_ROOT_PATH . '/uploads/extcal/' . $REQUEST['file' . $j]; |
|
87 | + $url_event = XOOPS_ROOT_PATH.'/uploads/extcal/'.$REQUEST['file'.$j]; |
|
88 | 88 | if ($j == 1) { |
89 | 89 | $event_picture1 = ''; |
90 | 90 | } elseif ($j == 2) { |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | $name = $catList->getVar('cat_name'); |
150 | 150 | $cat_color = $catList->getVar('cat_color'); |
151 | 151 | $checked = in_array($cat_id, $cat) ? 'checked' : ''; |
152 | - $cat = '' . "<div style='float:left; margin-left:5px;'>" . "<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>" |
|
153 | - . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>" . " {$name}" . '</div>'; |
|
152 | + $cat = ''."<div style='float:left; margin-left:5px;'>"."<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>" |
|
153 | + . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>"." {$name}".'</div>'; |
|
154 | 154 | |
155 | 155 | $t[] = $cat; |
156 | 156 | } |
@@ -176,17 +176,17 @@ discard block |
||
176 | 176 | $select->addOption('', ''); |
177 | 177 | } |
178 | 178 | |
179 | - $select->addOption('year ASC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
180 | - $select->addOption('year DESC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
179 | + $select->addOption('year ASC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
180 | + $select->addOption('year DESC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
181 | 181 | |
182 | - $select->addOption('month ASC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
183 | - $select->addOption('month DESC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
182 | + $select->addOption('month ASC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
183 | + $select->addOption('month DESC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
184 | 184 | |
185 | - $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
186 | - $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
185 | + $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
186 | + $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
187 | 187 | |
188 | - $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
189 | - $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
188 | + $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
189 | + $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
190 | 190 | |
191 | 191 | return $select; |
192 | 192 | } |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | public static function echoDateArray($period) |
301 | 301 | { |
302 | 302 | foreach ($period as $dt) { |
303 | - echo $dt->format("l Y-m-d H:i:s\n") . '<br>'; |
|
303 | + echo $dt->format("l Y-m-d H:i:s\n").'<br>'; |
|
304 | 304 | } |
305 | 305 | } |
306 | 306 | |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | } |
317 | 317 | |
318 | 318 | $txt = print_r($t, true); |
319 | - echo '<pre>Number of items: ' . count($t) . "<br>{$txt}</pre>"; |
|
319 | + echo '<pre>Number of items: '.count($t)."<br>{$txt}</pre>"; |
|
320 | 320 | } |
321 | 321 | |
322 | 322 | /*****************************************************************/ |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | if ($msg != '') { |
330 | 330 | echo "<hr>{$msg}<hr>"; |
331 | 331 | } |
332 | - echo $line . '<br>'; |
|
332 | + echo $line.'<br>'; |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | /*****************************************************************/ |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | echo "<hr>{$msg}<hr>"; |
357 | 357 | } |
358 | 358 | |
359 | - echo 'date --->' . $tsName . ' = ' . $ts . ' - ' . date('d-m-Y H:m:s', $ts) . '<br>'; |
|
359 | + echo 'date --->'.$tsName.' = '.$ts.' - '.date('d-m-Y H:m:s', $ts).'<br>'; |
|
360 | 360 | } |
361 | 361 | |
362 | 362 | /*****************************************************************/ |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | */ |
471 | 471 | public static function getLighterColor($color, $plancher, $plafond) |
472 | 472 | { |
473 | - include_once __DIR__ . '/colorTools.php'; |
|
473 | + include_once __DIR__.'/colorTools.php'; |
|
474 | 474 | |
475 | 475 | //$ct = new ColorTools(); |
476 | 476 | //return $ct->eclaircir($color,$plancher,$plafond); |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | if (!mkdir($folder) && !is_dir($folder)) { |
493 | 493 | throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder)); |
494 | 494 | } else { |
495 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
495 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
496 | 496 | } |
497 | 497 | } |
498 | 498 | } catch (Exception $e) { |
@@ -530,10 +530,10 @@ discard block |
||
530 | 530 | // @mkdir($dst); |
531 | 531 | while (false !== ($file = readdir($dir))) { |
532 | 532 | if (($file !== '.') && ($file !== '..')) { |
533 | - if (is_dir($src . '/' . $file)) { |
|
534 | - self::recurseCopy($src . '/' . $file, $dst . '/' . $file); |
|
533 | + if (is_dir($src.'/'.$file)) { |
|
534 | + self::recurseCopy($src.'/'.$file, $dst.'/'.$file); |
|
535 | 535 | } else { |
536 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
536 | + copy($src.'/'.$file, $dst.'/'.$file); |
|
537 | 537 | } |
538 | 538 | } |
539 | 539 | } |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | //check for minimum XOOPS version |
555 | 555 | $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string |
556 | 556 | $currArray = explode('.', $currentVer); |
557 | - $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string |
|
557 | + $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string |
|
558 | 558 | $reqArray = explode('.', $requiredVer); |
559 | 559 | $success = true; |
560 | 560 | foreach ($reqArray as $k => $v) { |
@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | break; |
569 | 569 | } |
570 | 570 | } else { |
571 | - if ((int)$v > 0) { // handles things like x.x.x.0_RC2 |
|
571 | + if ((int) $v > 0) { // handles things like x.x.x.0_RC2 |
|
572 | 572 | $success = false; |
573 | 573 | break; |
574 | 574 | } |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | // check for minimum PHP version |
597 | 597 | $success = true; |
598 | 598 | $verNum = phpversion(); |
599 | - $reqVer =& $module->getInfo('min_php'); |
|
599 | + $reqVer = & $module->getInfo('min_php'); |
|
600 | 600 | if (false !== $reqVer && '' !== $reqVer) { |
601 | 601 | if (version_compare($verNum, $reqVer, '<')) { |
602 | 602 | $module->setErrors(sprintf(_AM_TAG_ERROR_BAD_PHP, $reqVer, $verNum)); |
@@ -60,10 +60,10 @@ discard block |
||
60 | 60 | // This library should be called by each script before the include of PhpZip |
61 | 61 | // Library in order to limit the potential 'lib' directory path problem. |
62 | 62 | if (!defined('PCLERROR_LIB')) { |
63 | - include $gPcltarLibDir . '/pclerror.lib.php'; |
|
63 | + include $gPcltarLibDir.'/pclerror.lib.php'; |
|
64 | 64 | } |
65 | 65 | if (!defined('PCLTRACE_LIB')) { |
66 | - include $gPcltarLibDir . '/pcltrace.lib.php'; |
|
66 | + include $gPcltarLibDir.'/pcltrace.lib.php'; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | // -------------------------------------------------------------------------------- |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | if (!is_file($p_tarname)) { |
824 | 824 | PclErrorLog(-4, "Archive '$p_tarname' does not exist"); |
825 | 825 | } else { |
826 | - PclErrorLog(-6, "Archive '$p_tarname' has invalid size " . filesize($p_tarname) . '(not a 512 block multiple)'); |
|
826 | + PclErrorLog(-6, "Archive '$p_tarname' has invalid size ".filesize($p_tarname).'(not a 512 block multiple)'); |
|
827 | 827 | } |
828 | 828 | |
829 | 829 | // ----- Return |
@@ -839,7 +839,7 @@ discard block |
||
839 | 839 | if (!is_file($p_tarname_add)) { |
840 | 840 | PclErrorLog(-4, "Archive '$p_tarname_add' does not exist"); |
841 | 841 | } else { |
842 | - PclErrorLog(-6, "Archive '$p_tarname_add' has invalid size " . filesize($p_tarname_add) . '(not a 512 block multiple)'); |
|
842 | + PclErrorLog(-6, "Archive '$p_tarname_add' has invalid size ".filesize($p_tarname_add).'(not a 512 block multiple)'); |
|
843 | 843 | } |
844 | 844 | |
845 | 845 | // ----- Return |
@@ -862,7 +862,7 @@ discard block |
||
862 | 862 | } |
863 | 863 | |
864 | 864 | // ----- Open a temporary file in write mode |
865 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
865 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
866 | 866 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
867 | 867 | if (($v_temp_tar = @gzopen($v_temp_tarname, 'wb')) == 0) { |
868 | 868 | // ----- Close tar file |
@@ -915,9 +915,9 @@ discard block |
||
915 | 915 | } |
916 | 916 | |
917 | 917 | // ----- Go to the beginning of last block |
918 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position before :' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
918 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position before :'.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
919 | 919 | fseek($p_tar, $v_size - 512); |
920 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position after :' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
920 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position after :'.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
921 | 921 | } // ----- Look for unknown type |
922 | 922 | else { |
923 | 923 | // ----- Error log |
@@ -1208,7 +1208,7 @@ discard block |
||
1208 | 1208 | if (!is_file($p_tarname)) { |
1209 | 1209 | PclErrorLog(-4, "Archive '$p_tarname' does not exist"); |
1210 | 1210 | } else { |
1211 | - PclErrorLog(-6, "Archive '$p_tarname' has invalid size " . filesize($p_tarname) . '(not a 512 block multiple)'); |
|
1211 | + PclErrorLog(-6, "Archive '$p_tarname' has invalid size ".filesize($p_tarname).'(not a 512 block multiple)'); |
|
1212 | 1212 | } |
1213 | 1213 | |
1214 | 1214 | // ----- Return |
@@ -1231,7 +1231,7 @@ discard block |
||
1231 | 1231 | } |
1232 | 1232 | |
1233 | 1233 | // ----- Open a temporary file in write mode |
1234 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
1234 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
1235 | 1235 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
1236 | 1236 | if (($v_temp_tar = @gzopen($v_temp_tarname, 'wb')) == 0) { |
1237 | 1237 | // ----- Close tar file |
@@ -1316,9 +1316,9 @@ discard block |
||
1316 | 1316 | } |
1317 | 1317 | |
1318 | 1318 | // ----- Go to the beginning of last block |
1319 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position before :' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1319 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position before :'.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1320 | 1320 | fseek($p_tar, $v_size - 512); |
1321 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position after :' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1321 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position after :'.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1322 | 1322 | |
1323 | 1323 | // ----- Call the adding fct inside the tar |
1324 | 1324 | if (($v_result = PclTarHandleAddList($p_tar, $p_list, $p_mode, $p_list_detail, $p_add_dir, $p_remove_dir)) == 1) { |
@@ -1385,7 +1385,7 @@ discard block |
||
1385 | 1385 | // ----- Check the parameters |
1386 | 1386 | if ($p_tar == 0) { |
1387 | 1387 | // ----- Error log |
1388 | - PclErrorLog(-3, 'Invalid file descriptor in file ' . __FILE__ . ', line ' . __LINE__); |
|
1388 | + PclErrorLog(-3, 'Invalid file descriptor in file '.__FILE__.', line '.__LINE__); |
|
1389 | 1389 | |
1390 | 1390 | // ----- Return |
1391 | 1391 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -1440,7 +1440,7 @@ discard block |
||
1440 | 1440 | return PclErrorCode(); |
1441 | 1441 | } |
1442 | 1442 | |
1443 | - TrFctMessage(__FILE__, __LINE__, 4, 'File position before header =' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1443 | + TrFctMessage(__FILE__, __LINE__, 4, 'File position before header ='.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1444 | 1444 | |
1445 | 1445 | // ----- Add the file |
1446 | 1446 | if (($v_result = PclTarHandleAddFile($p_tar, $p_filename, $p_mode, $v_header, $p_add_dir, $p_remove_dir)) != 1) { |
@@ -1460,7 +1460,7 @@ discard block |
||
1460 | 1460 | // ----- Look for path |
1461 | 1461 | $v_path = ''; |
1462 | 1462 | if ($p_filename !== '.') { |
1463 | - $v_path = $p_filename . '/'; |
|
1463 | + $v_path = $p_filename.'/'; |
|
1464 | 1464 | } |
1465 | 1465 | |
1466 | 1466 | // ----- Read the directory for files and sub-directories |
@@ -1469,11 +1469,11 @@ discard block |
||
1469 | 1469 | $p_hitem = readdir($p_hdir); // '..' directory |
1470 | 1470 | while ($p_hitem = readdir($p_hdir)) { |
1471 | 1471 | // ----- Look for a file |
1472 | - if (is_file($v_path . $p_hitem)) { |
|
1473 | - TrFctMessage(__FILE__, __LINE__, 4, "Add the file '" . $v_path . $p_hitem . "'"); |
|
1472 | + if (is_file($v_path.$p_hitem)) { |
|
1473 | + TrFctMessage(__FILE__, __LINE__, 4, "Add the file '".$v_path.$p_hitem."'"); |
|
1474 | 1474 | |
1475 | 1475 | // ----- Add the file |
1476 | - if (($v_result = PclTarHandleAddFile($p_tar, $v_path . $p_hitem, $p_mode, $v_header, $p_add_dir, $p_remove_dir)) != 1) { |
|
1476 | + if (($v_result = PclTarHandleAddFile($p_tar, $v_path.$p_hitem, $p_mode, $v_header, $p_add_dir, $p_remove_dir)) != 1) { |
|
1477 | 1477 | // ----- Return status |
1478 | 1478 | TrFctEnd(__FILE__, __LINE__, $v_result); |
1479 | 1479 | |
@@ -1484,10 +1484,10 @@ discard block |
||
1484 | 1484 | $p_list_detail[$v_nb++] = $v_header; |
1485 | 1485 | } // ----- Recursive call to PclTarHandleAddFile() |
1486 | 1486 | else { |
1487 | - TrFctMessage(__FILE__, __LINE__, 4, "'" . $v_path . $p_hitem . "' is a directory"); |
|
1487 | + TrFctMessage(__FILE__, __LINE__, 4, "'".$v_path.$p_hitem."' is a directory"); |
|
1488 | 1488 | |
1489 | 1489 | // ----- Need an array as parameter |
1490 | - $p_temp_list[0] = $v_path . $p_hitem; |
|
1490 | + $p_temp_list[0] = $v_path.$p_hitem; |
|
1491 | 1491 | $v_result = PclTarHandleAddList($p_tar, $p_temp_list, $p_mode, $p_list_detail, $p_add_dir, $p_remove_dir); |
1492 | 1492 | } |
1493 | 1493 | } |
@@ -1495,7 +1495,7 @@ discard block |
||
1495 | 1495 | // ----- Free memory for the recursive loop |
1496 | 1496 | unset($p_temp_list, $p_hdir, $p_hitem); |
1497 | 1497 | } else { |
1498 | - TrFctMessage(__FILE__, __LINE__, 4, 'File position after blocks =' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1498 | + TrFctMessage(__FILE__, __LINE__, 4, 'File position after blocks ='.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1499 | 1499 | } |
1500 | 1500 | } |
1501 | 1501 | |
@@ -1531,7 +1531,7 @@ discard block |
||
1531 | 1531 | // ----- Check the parameters |
1532 | 1532 | if ($p_tar == 0) { |
1533 | 1533 | // ----- Error log |
1534 | - PclErrorLog(-3, 'Invalid file descriptor in file ' . __FILE__ . ', line ' . __LINE__); |
|
1534 | + PclErrorLog(-3, 'Invalid file descriptor in file '.__FILE__.', line '.__LINE__); |
|
1535 | 1535 | |
1536 | 1536 | // ----- Return |
1537 | 1537 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -1559,7 +1559,7 @@ discard block |
||
1559 | 1559 | |
1560 | 1560 | if ((0 === strpos($p_filename, './')) || (0 === strpos($p_remove_dir, './'))) { |
1561 | 1561 | if ((0 === strpos($p_filename, './')) && (0 !== strpos($p_remove_dir, './'))) { |
1562 | - $p_remove_dir = './' . $p_remove_dir; |
|
1562 | + $p_remove_dir = './'.$p_remove_dir; |
|
1563 | 1563 | } |
1564 | 1564 | if ((0 !== strpos($p_filename, './')) && (0 === strpos($p_remove_dir, './'))) { |
1565 | 1565 | $p_remove_dir = substr($p_remove_dir, 2); |
@@ -1573,9 +1573,9 @@ discard block |
||
1573 | 1573 | } |
1574 | 1574 | if ($p_add_dir != '') { |
1575 | 1575 | if (substr($p_add_dir, -1) === '/') { |
1576 | - $v_stored_filename = $p_add_dir . $v_stored_filename; |
|
1576 | + $v_stored_filename = $p_add_dir.$v_stored_filename; |
|
1577 | 1577 | } else { |
1578 | - $v_stored_filename = $p_add_dir . '/' . $v_stored_filename; |
|
1578 | + $v_stored_filename = $p_add_dir.'/'.$v_stored_filename; |
|
1579 | 1579 | } |
1580 | 1580 | TrFctMessage(__FILE__, __LINE__, 3, "Add path '$p_add_dir' in file '$p_filename' = '$v_stored_filename'"); |
1581 | 1581 | } |
@@ -1612,7 +1612,7 @@ discard block |
||
1612 | 1612 | return $v_result; |
1613 | 1613 | } |
1614 | 1614 | |
1615 | - TrFctMessage(__FILE__, __LINE__, 4, 'File position after header =' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1615 | + TrFctMessage(__FILE__, __LINE__, 4, 'File position after header ='.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1616 | 1616 | |
1617 | 1617 | // ----- Read the file by 512 octets blocks |
1618 | 1618 | $i = 0; |
@@ -1630,7 +1630,7 @@ discard block |
||
1630 | 1630 | // ----- Close the file |
1631 | 1631 | fclose($v_file); |
1632 | 1632 | |
1633 | - TrFctMessage(__FILE__, __LINE__, 4, 'File position after blocks =' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1633 | + TrFctMessage(__FILE__, __LINE__, 4, 'File position after blocks ='.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1634 | 1634 | } // ----- Look for a directory |
1635 | 1635 | else { |
1636 | 1636 | // ----- Call the header generation |
@@ -1641,7 +1641,7 @@ discard block |
||
1641 | 1641 | return $v_result; |
1642 | 1642 | } |
1643 | 1643 | |
1644 | - TrFctMessage(__FILE__, __LINE__, 4, 'File position after header =' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1644 | + TrFctMessage(__FILE__, __LINE__, 4, 'File position after header ='.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1645 | 1645 | } |
1646 | 1646 | |
1647 | 1647 | // ----- Return |
@@ -1688,7 +1688,7 @@ discard block |
||
1688 | 1688 | // ----- Check the parameters |
1689 | 1689 | if (($p_tar == 0) || ($p_filename == '')) { |
1690 | 1690 | // ----- Error log |
1691 | - PclErrorLog(-3, 'Invalid file descriptor in file ' . __FILE__ . ', line ' . __LINE__); |
|
1691 | + PclErrorLog(-3, 'Invalid file descriptor in file '.__FILE__.', line '.__LINE__); |
|
1692 | 1692 | |
1693 | 1693 | // ----- Return |
1694 | 1694 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -1701,7 +1701,7 @@ discard block |
||
1701 | 1701 | $p_stored_filename = $p_filename; |
1702 | 1702 | } |
1703 | 1703 | $v_reduce_filename = PclTarHandlePathReduction($p_stored_filename); |
1704 | - TrFctMessage(__FILE__, __LINE__, 2, "Filename (reduced) '$v_reduce_filename', strlen " . strlen($v_reduce_filename)); |
|
1704 | + TrFctMessage(__FILE__, __LINE__, 2, "Filename (reduced) '$v_reduce_filename', strlen ".strlen($v_reduce_filename)); |
|
1705 | 1705 | |
1706 | 1706 | // ----- Get file info |
1707 | 1707 | $v_info = stat($p_filename); |
@@ -1902,7 +1902,7 @@ discard block |
||
1902 | 1902 | // ----- Check the path |
1903 | 1903 | //if (($p_path == "") || ((substr($p_path, 0, 1) != "/") && (substr($p_path, 0, 3) != "../"))) |
1904 | 1904 | if ($p_path == '') { |
1905 | - $p_path = './' . $p_path; |
|
1905 | + $p_path = './'.$p_path; |
|
1906 | 1906 | } |
1907 | 1907 | |
1908 | 1908 | // ----- Look for path to remove format (should end by /) |
@@ -1997,29 +1997,29 @@ discard block |
||
1997 | 1997 | continue; |
1998 | 1998 | } |
1999 | 1999 | |
2000 | - TrFctMessage(__FILE__, __LINE__, 2, "Found file '" . $v_header['filename'] . "', size '" . $v_header['size'] . "'"); |
|
2000 | + TrFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'"); |
|
2001 | 2001 | |
2002 | 2002 | // ----- Look for partial extract |
2003 | 2003 | if ((!$v_extract_all) && is_array($p_file_list)) { |
2004 | - TrFctMessage(__FILE__, __LINE__, 2, 'Look if the file ' . $v_header['filename'] . ' need to be extracted'); |
|
2004 | + TrFctMessage(__FILE__, __LINE__, 2, 'Look if the file '.$v_header['filename'].' need to be extracted'); |
|
2005 | 2005 | |
2006 | 2006 | // ----- By default no unzip if the file is not found |
2007 | 2007 | $v_extract_file = false; |
2008 | 2008 | |
2009 | 2009 | // ----- Look into the file list |
2010 | 2010 | for ($i = 0, $iMax = count($p_file_list); $i < $iMax; ++$i) { |
2011 | - TrFctMessage(__FILE__, __LINE__, 2, 'Compare archived file ' . $v_header['filename'] . " from asked list file '" . $p_file_list[$i] . "'"); |
|
2011 | + TrFctMessage(__FILE__, __LINE__, 2, 'Compare archived file '.$v_header['filename']." from asked list file '".$p_file_list[$i]."'"); |
|
2012 | 2012 | |
2013 | 2013 | // ----- Look if it is a directory |
2014 | 2014 | if (substr($p_file_list[$i], -1) === '/') { |
2015 | - TrFctMessage(__FILE__, __LINE__, 3, 'Compare file ' . $v_header['filename'] . " with directory '$p_file_list[$i]'"); |
|
2015 | + TrFctMessage(__FILE__, __LINE__, 3, 'Compare file '.$v_header['filename']." with directory '$p_file_list[$i]'"); |
|
2016 | 2016 | |
2017 | 2017 | // ----- Look if the directory is in the filename path |
2018 | 2018 | if ((strlen($v_header['filename']) > strlen($p_file_list[$i])) |
2019 | 2019 | && (0 === strpos($v_header['filename'], $p_file_list[$i])) |
2020 | 2020 | ) { |
2021 | 2021 | // ----- The file is in the directory, so extract it |
2022 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . " is in directory '$p_file_list[$i]' : extract it"); |
|
2022 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename']." is in directory '$p_file_list[$i]' : extract it"); |
|
2023 | 2023 | $v_extract_file = true; |
2024 | 2024 | |
2025 | 2025 | // ----- End of loop |
@@ -2029,7 +2029,7 @@ discard block |
||
2029 | 2029 | else { |
2030 | 2030 | if ($p_file_list[$i] == $v_header['filename']) { |
2031 | 2031 | // ----- File found |
2032 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' should be extracted'); |
|
2032 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' should be extracted'); |
|
2033 | 2033 | $v_extract_file = true; |
2034 | 2034 | |
2035 | 2035 | // ----- End of loop |
@@ -2040,7 +2040,7 @@ discard block |
||
2040 | 2040 | |
2041 | 2041 | // ----- Trace |
2042 | 2042 | if (!$v_extract_file) { |
2043 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' should not be extracted'); |
|
2043 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' should not be extracted'); |
|
2044 | 2044 | } |
2045 | 2045 | } else { |
2046 | 2046 | // ----- All files need to be extracted |
@@ -2051,10 +2051,10 @@ discard block |
||
2051 | 2051 | if ($v_extract_file && (!$v_listing)) { |
2052 | 2052 | // ----- Look for path to remove |
2053 | 2053 | if (($p_remove_path != '') && (0 === strpos($v_header['filename'], $p_remove_path))) { |
2054 | - TrFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file " . $v_header['filename'] . ''); |
|
2054 | + TrFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file ".$v_header['filename'].''); |
|
2055 | 2055 | // ----- Remove the path |
2056 | 2056 | $v_header['filename'] = substr($v_header['filename'], $p_remove_path_size); |
2057 | - TrFctMessage(__FILE__, __LINE__, 3, 'Reslting file is ' . $v_header['filename'] . ''); |
|
2057 | + TrFctMessage(__FILE__, __LINE__, 3, 'Reslting file is '.$v_header['filename'].''); |
|
2058 | 2058 | } |
2059 | 2059 | |
2060 | 2060 | // ----- Add the path to the file |
@@ -2068,22 +2068,22 @@ discard block |
||
2068 | 2068 | |
2069 | 2069 | // ----- Add the path |
2070 | 2070 | if (0 === strpos($v_header['filename'], '/')) { |
2071 | - $v_header['filename'] = $p_path . $v_header['filename']; |
|
2071 | + $v_header['filename'] = $p_path.$v_header['filename']; |
|
2072 | 2072 | } else { |
2073 | - $v_header['filename'] = $p_path . '/' . $v_header['filename']; |
|
2073 | + $v_header['filename'] = $p_path.'/'.$v_header['filename']; |
|
2074 | 2074 | } |
2075 | 2075 | } |
2076 | 2076 | |
2077 | 2077 | // ----- Trace |
2078 | - TrFctMessage(__FILE__, __LINE__, 2, 'Extracting file (with path) ' . $v_header['filename'] . ", size '" . $v_header['size'] . "'"); |
|
2078 | + TrFctMessage(__FILE__, __LINE__, 2, 'Extracting file (with path) '.$v_header['filename'].", size '".$v_header['size']."'"); |
|
2079 | 2079 | |
2080 | 2080 | // ----- Check that the file does not exists |
2081 | 2081 | if (file_exists($v_header['filename'])) { |
2082 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' already exists'); |
|
2082 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' already exists'); |
|
2083 | 2083 | |
2084 | 2084 | // ----- Look if file is a directory |
2085 | 2085 | if (is_dir($v_header['filename'])) { |
2086 | - TrFctMessage(__FILE__, __LINE__, 2, 'Existing file ' . $v_header['filename'] . ' is a directory'); |
|
2086 | + TrFctMessage(__FILE__, __LINE__, 2, 'Existing file '.$v_header['filename'].' is a directory'); |
|
2087 | 2087 | |
2088 | 2088 | // ----- Change the file status |
2089 | 2089 | $v_header['status'] = 'already_a_directory'; |
@@ -2094,7 +2094,7 @@ discard block |
||
2094 | 2094 | } // ----- Look if file is write protected |
2095 | 2095 | else { |
2096 | 2096 | if (!s_writable($v_header['filename'])) { |
2097 | - TrFctMessage(__FILE__, __LINE__, 2, 'Existing file ' . $v_header['filename'] . ' is write protected'); |
|
2097 | + TrFctMessage(__FILE__, __LINE__, 2, 'Existing file '.$v_header['filename'].' is write protected'); |
|
2098 | 2098 | |
2099 | 2099 | // ----- Change the file status |
2100 | 2100 | $v_header['status'] = 'write_protected'; |
@@ -2128,7 +2128,7 @@ discard block |
||
2128 | 2128 | } |
2129 | 2129 | |
2130 | 2130 | if (($v_result = PclTarHandlerDirCheck($v_dir_to_check)) != 1) { |
2131 | - TrFctMessage(__FILE__, __LINE__, 2, 'Unable to create path for ' . $v_header['filename'] . ''); |
|
2131 | + TrFctMessage(__FILE__, __LINE__, 2, 'Unable to create path for '.$v_header['filename'].''); |
|
2132 | 2132 | |
2133 | 2133 | // ----- Change the file status |
2134 | 2134 | $v_header['status'] = 'path_creation_fail'; |
@@ -2143,7 +2143,7 @@ discard block |
||
2143 | 2143 | if ($v_extract_file && ($v_header['typeflag'] != '5')) { |
2144 | 2144 | // ----- Open the destination file in write mode |
2145 | 2145 | if (($v_dest_file = @fopen($v_header['filename'], 'wb')) == 0) { |
2146 | - TrFctMessage(__FILE__, __LINE__, 2, 'Error while opening ' . $v_header['filename'] . ' in write binary mode'); |
|
2146 | + TrFctMessage(__FILE__, __LINE__, 2, 'Error while opening '.$v_header['filename'].' in write binary mode'); |
|
2147 | 2147 | |
2148 | 2148 | // ----- Change the file status |
2149 | 2149 | $v_header['status'] = 'write_error'; |
@@ -2156,12 +2156,12 @@ discard block |
||
2156 | 2156 | gzseek($v_tar, gztell($v_tar) + (ceil($v_header['size'] / 512) * 512)); |
2157 | 2157 | } |
2158 | 2158 | } else { |
2159 | - TrFctMessage(__FILE__, __LINE__, 2, 'Start extraction of ' . $v_header['filename'] . ''); |
|
2159 | + TrFctMessage(__FILE__, __LINE__, 2, 'Start extraction of '.$v_header['filename'].''); |
|
2160 | 2160 | |
2161 | 2161 | // ----- Read data |
2162 | 2162 | $n = floor($v_header['size'] / 512); |
2163 | 2163 | for ($i = 0; $i < $n; ++$i) { |
2164 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number ' . ($i + 1)); |
|
2164 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number '.($i + 1)); |
|
2165 | 2165 | if ($p_tar_mode === 'tar') { |
2166 | 2166 | $v_content = fread($v_tar, 512); |
2167 | 2167 | } else { |
@@ -2170,7 +2170,7 @@ discard block |
||
2170 | 2170 | fwrite($v_dest_file, $v_content, 512); |
2171 | 2171 | } |
2172 | 2172 | if (($v_header['size'] % 512) != 0) { |
2173 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read last ' . ($v_header['size'] % 512) . ' bytes in a 512 block'); |
|
2173 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read last '.($v_header['size'] % 512).' bytes in a 512 block'); |
|
2174 | 2174 | if ($p_tar_mode === 'tar') { |
2175 | 2175 | $v_content = fread($v_tar, 512); |
2176 | 2176 | } else { |
@@ -2198,7 +2198,7 @@ discard block |
||
2198 | 2198 | } |
2199 | 2199 | |
2200 | 2200 | // ----- Error log |
2201 | - PclErrorLog(-7, 'Extracted file ' . $v_header['filename'] . " does not have the correct file size '" . filesize($v_filename) . "' ('" . $v_header['size'] . "' expected). Archive may be corrupted."); |
|
2201 | + PclErrorLog(-7, 'Extracted file '.$v_header['filename']." does not have the correct file size '".filesize($v_filename)."' ('".$v_header['size']."' expected). Archive may be corrupted."); |
|
2202 | 2202 | |
2203 | 2203 | // ----- Return |
2204 | 2204 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -2209,7 +2209,7 @@ discard block |
||
2209 | 2209 | // ----- Trace |
2210 | 2210 | TrFctMessage(__FILE__, __LINE__, 2, 'Extraction done'); |
2211 | 2211 | } else { |
2212 | - TrFctMessage(__FILE__, __LINE__, 2, 'Extraction of file ' . $v_header['filename'] . ' skipped.'); |
|
2212 | + TrFctMessage(__FILE__, __LINE__, 2, 'Extraction of file '.$v_header['filename'].' skipped.'); |
|
2213 | 2213 | |
2214 | 2214 | // ----- Jump to next file |
2215 | 2215 | TrFctMessage(__FILE__, __LINE__, 2, 'Jump to next file'); |
@@ -2222,8 +2222,8 @@ discard block |
||
2222 | 2222 | } // ----- Look for file that is not to be unzipped |
2223 | 2223 | else { |
2224 | 2224 | // ----- Trace |
2225 | - TrFctMessage(__FILE__, __LINE__, 2, 'Jump file ' . $v_header['filename'] . ''); |
|
2226 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2225 | + TrFctMessage(__FILE__, __LINE__, 2, 'Jump file '.$v_header['filename'].''); |
|
2226 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2227 | 2227 | |
2228 | 2228 | // ----- Jump to next file |
2229 | 2229 | if ($p_tar_mode === 'tar') { |
@@ -2232,7 +2232,7 @@ discard block |
||
2232 | 2232 | gzseek($v_tar, gztell($v_tar) + (ceil($v_header['size'] / 512) * 512)); |
2233 | 2233 | } |
2234 | 2234 | |
2235 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2235 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2236 | 2236 | } |
2237 | 2237 | |
2238 | 2238 | if ($p_tar_mode === 'tar') { |
@@ -2243,7 +2243,7 @@ discard block |
||
2243 | 2243 | |
2244 | 2244 | // ----- File name and properties are logged if listing mode or file is extracted |
2245 | 2245 | if ($v_listing || $v_extract_file || $v_extraction_stopped) { |
2246 | - TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file ' . $v_header['filename'] . ''); |
|
2246 | + TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file '.$v_header['filename'].''); |
|
2247 | 2247 | |
2248 | 2248 | // ----- Log extracted files |
2249 | 2249 | if (($v_file_dir = dirname($v_header['filename'])) == $v_header['filename']) { |
@@ -2318,7 +2318,7 @@ discard block |
||
2318 | 2318 | || ((0 !== strpos($p_path, '/')) && (0 !== strpos($p_path, '../')) |
2319 | 2319 | && (0 !== strpos($p_path, './'))) |
2320 | 2320 | ) { |
2321 | - $p_path = './' . $p_path; |
|
2321 | + $p_path = './'.$p_path; |
|
2322 | 2322 | } |
2323 | 2323 | |
2324 | 2324 | // ----- Look for path to remove format (should end by /) |
@@ -2466,14 +2466,14 @@ discard block |
||
2466 | 2466 | continue; |
2467 | 2467 | } |
2468 | 2468 | |
2469 | - TrFctMessage(__FILE__, __LINE__, 2, 'Found file ' . $v_header['filename'] . ", size '" . $v_header['size'] . "'"); |
|
2469 | + TrFctMessage(__FILE__, __LINE__, 2, 'Found file '.$v_header['filename'].", size '".$v_header['size']."'"); |
|
2470 | 2470 | |
2471 | 2471 | // ----- Look if file is in the range to be extracted |
2472 | 2472 | if (($p_index_current >= $p_index_start) && ($p_index_current <= $p_index_stop)) { |
2473 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' is in the range to be extracted'); |
|
2473 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' is in the range to be extracted'); |
|
2474 | 2474 | $v_extract_file = true; |
2475 | 2475 | } else { |
2476 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' is out of the range'); |
|
2476 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' is out of the range'); |
|
2477 | 2477 | $v_extract_file = false; |
2478 | 2478 | } |
2479 | 2479 | |
@@ -2488,8 +2488,8 @@ discard block |
||
2488 | 2488 | } // ----- Look for file that is not to be extracted |
2489 | 2489 | else { |
2490 | 2490 | // ----- Trace |
2491 | - TrFctMessage(__FILE__, __LINE__, 2, 'Jump file ' . $v_header['filename'] . ''); |
|
2492 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2491 | + TrFctMessage(__FILE__, __LINE__, 2, 'Jump file '.$v_header['filename'].''); |
|
2492 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2493 | 2493 | |
2494 | 2494 | // ----- Jump to next file |
2495 | 2495 | if ($p_tar_mode === 'tar') { |
@@ -2498,7 +2498,7 @@ discard block |
||
2498 | 2498 | gzseek($v_tar, gztell($v_tar) + (ceil($v_header['size'] / 512) * 512)); |
2499 | 2499 | } |
2500 | 2500 | |
2501 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2501 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2502 | 2502 | } |
2503 | 2503 | |
2504 | 2504 | if ($p_tar_mode === 'tar') { |
@@ -2509,7 +2509,7 @@ discard block |
||
2509 | 2509 | |
2510 | 2510 | // ----- File name and properties are logged if listing mode or file is extracted |
2511 | 2511 | if ($v_extract_file) { |
2512 | - TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file ' . $v_header['filename'] . ''); |
|
2512 | + TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file '.$v_header['filename'].''); |
|
2513 | 2513 | |
2514 | 2514 | // ----- Log extracted files |
2515 | 2515 | if (($v_file_dir = dirname($v_header['filename'])) == $v_header['filename']) { |
@@ -2566,10 +2566,10 @@ discard block |
||
2566 | 2566 | |
2567 | 2567 | // ----- Look for path to remove |
2568 | 2568 | if (($p_remove_path != '') && (0 === strpos($v_header['filename'], $p_remove_path))) { |
2569 | - TrFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file " . $v_header['filename'] . ''); |
|
2569 | + TrFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file ".$v_header['filename'].''); |
|
2570 | 2570 | // ----- Remove the path |
2571 | 2571 | $v_header['filename'] = substr($v_header['filename'], $p_remove_path_size); |
2572 | - TrFctMessage(__FILE__, __LINE__, 3, 'Resulting file is ' . $v_header['filename'] . ''); |
|
2572 | + TrFctMessage(__FILE__, __LINE__, 3, 'Resulting file is '.$v_header['filename'].''); |
|
2573 | 2573 | } |
2574 | 2574 | |
2575 | 2575 | // ----- Add the path to the file |
@@ -2583,22 +2583,22 @@ discard block |
||
2583 | 2583 | |
2584 | 2584 | // ----- Add the path |
2585 | 2585 | if (0 === strpos($v_header['filename'], '/')) { |
2586 | - $v_header['filename'] = $p_path . $v_header['filename']; |
|
2586 | + $v_header['filename'] = $p_path.$v_header['filename']; |
|
2587 | 2587 | } else { |
2588 | - $v_header['filename'] = $p_path . '/' . $v_header['filename']; |
|
2588 | + $v_header['filename'] = $p_path.'/'.$v_header['filename']; |
|
2589 | 2589 | } |
2590 | 2590 | } |
2591 | 2591 | |
2592 | 2592 | // ----- Trace |
2593 | - TrFctMessage(__FILE__, __LINE__, 2, 'Extracting file (with path) ' . $v_header['filename'] . ", size '" . $v_header['size'] . "'"); |
|
2593 | + TrFctMessage(__FILE__, __LINE__, 2, 'Extracting file (with path) '.$v_header['filename'].", size '".$v_header['size']."'"); |
|
2594 | 2594 | |
2595 | 2595 | // ----- Check that the file does not exists |
2596 | 2596 | if (file_exists($v_header['filename'])) { |
2597 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' already exists'); |
|
2597 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' already exists'); |
|
2598 | 2598 | |
2599 | 2599 | // ----- Look if file is a directory |
2600 | 2600 | if (is_dir($v_header['filename'])) { |
2601 | - TrFctMessage(__FILE__, __LINE__, 2, 'Existing file ' . $v_header['filename'] . ' is a directory'); |
|
2601 | + TrFctMessage(__FILE__, __LINE__, 2, 'Existing file '.$v_header['filename'].' is a directory'); |
|
2602 | 2602 | |
2603 | 2603 | // ----- Change the file status |
2604 | 2604 | $v_header['status'] = 'already_a_directory'; |
@@ -2609,7 +2609,7 @@ discard block |
||
2609 | 2609 | } // ----- Look if file is write protected |
2610 | 2610 | else { |
2611 | 2611 | if (!s_writable($v_header['filename'])) { |
2612 | - TrFctMessage(__FILE__, __LINE__, 2, 'Existing file ' . $v_header['filename'] . ' is write protected'); |
|
2612 | + TrFctMessage(__FILE__, __LINE__, 2, 'Existing file '.$v_header['filename'].' is write protected'); |
|
2613 | 2613 | |
2614 | 2614 | // ----- Change the file status |
2615 | 2615 | $v_header['status'] = 'write_protected'; |
@@ -2621,7 +2621,7 @@ discard block |
||
2621 | 2621 | else { |
2622 | 2622 | if (filemtime($v_header['filename']) > $v_header['mtime']) { |
2623 | 2623 | TrFctMessage(__FILE__, __LINE__, 2, |
2624 | - 'Existing file ' . $v_header['filename'] . ' is newer (' . date('l dS of F Y h:i:s A', filemtime($v_header['filename'])) . ') than the extracted file (' . date('l dS of F Y h:i:s A', $v_header['mtime']) . ')'); |
|
2624 | + 'Existing file '.$v_header['filename'].' is newer ('.date('l dS of F Y h:i:s A', filemtime($v_header['filename'])).') than the extracted file ('.date('l dS of F Y h:i:s A', $v_header['mtime']).')'); |
|
2625 | 2625 | |
2626 | 2626 | // ----- Change the file status |
2627 | 2627 | $v_header['status'] = 'newer_exist'; |
@@ -2645,7 +2645,7 @@ discard block |
||
2645 | 2645 | } |
2646 | 2646 | |
2647 | 2647 | if (($v_result = PclTarHandlerDirCheck($v_dir_to_check)) != 1) { |
2648 | - TrFctMessage(__FILE__, __LINE__, 2, 'Unable to create path for ' . $v_header['filename'] . ''); |
|
2648 | + TrFctMessage(__FILE__, __LINE__, 2, 'Unable to create path for '.$v_header['filename'].''); |
|
2649 | 2649 | |
2650 | 2650 | // ----- Change the file status |
2651 | 2651 | $v_header['status'] = 'path_creation_fail'; |
@@ -2660,7 +2660,7 @@ discard block |
||
2660 | 2660 | if ($v_extract_file && ($v_header['typeflag'] != '5')) { |
2661 | 2661 | // ----- Open the destination file in write mode |
2662 | 2662 | if (($v_dest_file = @fopen($v_header['filename'], 'wb')) == 0) { |
2663 | - TrFctMessage(__FILE__, __LINE__, 2, 'Error while opening ' . $v_header['filename'] . ' in write binary mode'); |
|
2663 | + TrFctMessage(__FILE__, __LINE__, 2, 'Error while opening '.$v_header['filename'].' in write binary mode'); |
|
2664 | 2664 | |
2665 | 2665 | // ----- Change the file status |
2666 | 2666 | $v_header['status'] = 'write_error'; |
@@ -2673,12 +2673,12 @@ discard block |
||
2673 | 2673 | gzseek($v_tar, gztell($v_tar) + (ceil($v_header['size'] / 512) * 512)); |
2674 | 2674 | } |
2675 | 2675 | } else { |
2676 | - TrFctMessage(__FILE__, __LINE__, 2, 'Start extraction of ' . $v_header['filename'] . ''); |
|
2676 | + TrFctMessage(__FILE__, __LINE__, 2, 'Start extraction of '.$v_header['filename'].''); |
|
2677 | 2677 | |
2678 | 2678 | // ----- Read data |
2679 | 2679 | $n = floor($v_header['size'] / 512); |
2680 | 2680 | for ($i = 0; $i < $n; ++$i) { |
2681 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number ' . ($i + 1)); |
|
2681 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number '.($i + 1)); |
|
2682 | 2682 | if ($p_tar_mode === 'tar') { |
2683 | 2683 | $v_content = fread($v_tar, 512); |
2684 | 2684 | } else { |
@@ -2687,7 +2687,7 @@ discard block |
||
2687 | 2687 | fwrite($v_dest_file, $v_content, 512); |
2688 | 2688 | } |
2689 | 2689 | if (($v_header['size'] % 512) != 0) { |
2690 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read last ' . ($v_header['size'] % 512) . ' bytes in a 512 block'); |
|
2690 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read last '.($v_header['size'] % 512).' bytes in a 512 block'); |
|
2691 | 2691 | if ($p_tar_mode === 'tar') { |
2692 | 2692 | $v_content = fread($v_tar, 512); |
2693 | 2693 | } else { |
@@ -2708,7 +2708,7 @@ discard block |
||
2708 | 2708 | clearstatcache(); |
2709 | 2709 | if (filesize($v_header['filename']) != $v_header['size']) { |
2710 | 2710 | // ----- Error log |
2711 | - PclErrorLog(-7, 'Extracted file ' . $v_header['filename'] . " does not have the correct file size '" . filesize($v_filename) . "' ('" . $v_header['size'] . "' expected). Archive may be corrupted."); |
|
2711 | + PclErrorLog(-7, 'Extracted file '.$v_header['filename']." does not have the correct file size '".filesize($v_filename)."' ('".$v_header['size']."' expected). Archive may be corrupted."); |
|
2712 | 2712 | |
2713 | 2713 | // ----- Return |
2714 | 2714 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -2719,7 +2719,7 @@ discard block |
||
2719 | 2719 | // ----- Trace |
2720 | 2720 | TrFctMessage(__FILE__, __LINE__, 2, 'Extraction done'); |
2721 | 2721 | } else { |
2722 | - TrFctMessage(__FILE__, __LINE__, 2, 'Extraction of file ' . $v_header['filename'] . ' skipped.'); |
|
2722 | + TrFctMessage(__FILE__, __LINE__, 2, 'Extraction of file '.$v_header['filename'].' skipped.'); |
|
2723 | 2723 | |
2724 | 2724 | // ----- Jump to next file |
2725 | 2725 | TrFctMessage(__FILE__, __LINE__, 2, 'Jump to next file'); |
@@ -2773,7 +2773,7 @@ discard block |
||
2773 | 2773 | } |
2774 | 2774 | |
2775 | 2775 | // ----- Open a temporary file in write mode |
2776 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
2776 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
2777 | 2777 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
2778 | 2778 | if (($v_temp_tar = @fopen($v_temp_tarname, 'wb')) == 0) { |
2779 | 2779 | // ----- Close tar file |
@@ -2802,7 +2802,7 @@ discard block |
||
2802 | 2802 | } |
2803 | 2803 | |
2804 | 2804 | // ----- Open a temporary file in write mode |
2805 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
2805 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
2806 | 2806 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
2807 | 2807 | if (($v_temp_tar = @gzopen($v_temp_tarname, 'wb')) == 0) { |
2808 | 2808 | // ----- Close tar file |
@@ -2859,7 +2859,7 @@ discard block |
||
2859 | 2859 | continue; |
2860 | 2860 | } |
2861 | 2861 | |
2862 | - TrFctMessage(__FILE__, __LINE__, 2, 'Found file ' . $v_header['filename'] . ", size '" . $v_header['size'] . "'"); |
|
2862 | + TrFctMessage(__FILE__, __LINE__, 2, 'Found file '.$v_header['filename'].", size '".$v_header['size']."'"); |
|
2863 | 2863 | |
2864 | 2864 | // ----- Look for filenames to delete |
2865 | 2865 | for ($i = 0, $v_delete_file = false; ($i < count($p_file_list)) && (!$v_delete_file); ++$i) { |
@@ -2867,12 +2867,12 @@ discard block |
||
2867 | 2867 | // if ($p_file_list[$i] == $v_header['filename']) |
2868 | 2868 | if (($v_len = strcmp($p_file_list[$i], $v_header['filename'])) <= 0) { |
2869 | 2869 | if ($v_len == 0) { |
2870 | - TrFctMessage(__FILE__, __LINE__, 3, 'Found that ' . $v_header['filename'] . ' need to be deleted'); |
|
2870 | + TrFctMessage(__FILE__, __LINE__, 3, 'Found that '.$v_header['filename'].' need to be deleted'); |
|
2871 | 2871 | $v_delete_file = true; |
2872 | 2872 | } else { |
2873 | - TrFctMessage(__FILE__, __LINE__, 3, 'Look if ' . $v_header['filename'] . " is a file in $p_file_list[$i]"); |
|
2873 | + TrFctMessage(__FILE__, __LINE__, 3, 'Look if '.$v_header['filename']." is a file in $p_file_list[$i]"); |
|
2874 | 2874 | if (substr($v_header['filename'], strlen($p_file_list[$i]), 1) === '/') { |
2875 | - TrFctMessage(__FILE__, __LINE__, 3, '' . $v_header['filename'] . " is a file in $p_file_list[$i]"); |
|
2875 | + TrFctMessage(__FILE__, __LINE__, 3, ''.$v_header['filename']." is a file in $p_file_list[$i]"); |
|
2876 | 2876 | $v_delete_file = true; |
2877 | 2877 | } |
2878 | 2878 | } |
@@ -2881,7 +2881,7 @@ discard block |
||
2881 | 2881 | |
2882 | 2882 | // ----- Copy files that do not need to be deleted |
2883 | 2883 | if (!$v_delete_file) { |
2884 | - TrFctMessage(__FILE__, __LINE__, 2, 'Keep file ' . $v_header['filename'] . ''); |
|
2884 | + TrFctMessage(__FILE__, __LINE__, 2, 'Keep file '.$v_header['filename'].''); |
|
2885 | 2885 | |
2886 | 2886 | // ----- Write the file header |
2887 | 2887 | if ($p_tar_mode === 'tar') { |
@@ -2893,7 +2893,7 @@ discard block |
||
2893 | 2893 | // ----- Write the file data |
2894 | 2894 | $n = ceil($v_header['size'] / 512); |
2895 | 2895 | for ($i = 0; $i < $n; ++$i) { |
2896 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number ' . ($i + 1)); |
|
2896 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number '.($i + 1)); |
|
2897 | 2897 | if ($p_tar_mode === 'tar') { |
2898 | 2898 | $v_content = fread($v_tar, 512); |
2899 | 2899 | fwrite($v_temp_tar, $v_content, 512); |
@@ -2904,7 +2904,7 @@ discard block |
||
2904 | 2904 | } |
2905 | 2905 | |
2906 | 2906 | // ----- File name and properties are logged if listing mode or file is extracted |
2907 | - TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file ' . $v_header['filename'] . ''); |
|
2907 | + TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file '.$v_header['filename'].''); |
|
2908 | 2908 | |
2909 | 2909 | // ----- Add the array describing the file into the list |
2910 | 2910 | $p_list_detail[$v_nb] = $v_header; |
@@ -2915,8 +2915,8 @@ discard block |
||
2915 | 2915 | } // ----- Look for file that is to be deleted |
2916 | 2916 | else { |
2917 | 2917 | // ----- Trace |
2918 | - TrFctMessage(__FILE__, __LINE__, 2, 'Start deletion of ' . $v_header['filename'] . ''); |
|
2919 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2918 | + TrFctMessage(__FILE__, __LINE__, 2, 'Start deletion of '.$v_header['filename'].''); |
|
2919 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2920 | 2920 | |
2921 | 2921 | // ----- Jump to next file |
2922 | 2922 | if ($p_tar_mode === 'tar') { |
@@ -2925,7 +2925,7 @@ discard block |
||
2925 | 2925 | gzseek($v_tar, gztell($v_tar) + (ceil($v_header['size'] / 512) * 512)); |
2926 | 2926 | } |
2927 | 2927 | |
2928 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2928 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2929 | 2929 | } |
2930 | 2930 | |
2931 | 2931 | // ----- Look for end of file |
@@ -3011,7 +3011,7 @@ discard block |
||
3011 | 3011 | } |
3012 | 3012 | |
3013 | 3013 | // ----- Open a temporary file in write mode |
3014 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
3014 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
3015 | 3015 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
3016 | 3016 | if (($v_temp_tar = @fopen($v_temp_tarname, 'wb')) == 0) { |
3017 | 3017 | // ----- Close tar file |
@@ -3040,7 +3040,7 @@ discard block |
||
3040 | 3040 | } |
3041 | 3041 | |
3042 | 3042 | // ----- Open a temporary file in write mode |
3043 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
3043 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
3044 | 3044 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
3045 | 3045 | if (($v_temp_tar = @gzopen($v_temp_tarname, 'wb')) == 0) { |
3046 | 3046 | // ----- Close tar file |
@@ -3075,9 +3075,9 @@ discard block |
||
3075 | 3075 | } |
3076 | 3076 | if ($p_add_dir != '') { |
3077 | 3077 | if (substr($p_add_dir, -1) === '/') { |
3078 | - $v_stored_list[$i] = $p_add_dir . $v_stored_list[$i]; |
|
3078 | + $v_stored_list[$i] = $p_add_dir.$v_stored_list[$i]; |
|
3079 | 3079 | } else { |
3080 | - $v_stored_list[$i] = $p_add_dir . '/' . $v_stored_list[$i]; |
|
3080 | + $v_stored_list[$i] = $p_add_dir.'/'.$v_stored_list[$i]; |
|
3081 | 3081 | } |
3082 | 3082 | TrFctMessage(__FILE__, __LINE__, 3, "Add path '$p_add_dir' in file '$p_file_list[$i]' = '$v_stored_list[$i]'"); |
3083 | 3083 | } |
@@ -3132,7 +3132,7 @@ discard block |
||
3132 | 3132 | continue; |
3133 | 3133 | } |
3134 | 3134 | |
3135 | - TrFctMessage(__FILE__, __LINE__, 2, 'Found file ' . $v_header['filename'] . ", size '" . $v_header['size'] . "'"); |
|
3135 | + TrFctMessage(__FILE__, __LINE__, 2, 'Found file '.$v_header['filename'].", size '".$v_header['size']."'"); |
|
3136 | 3136 | |
3137 | 3137 | // ----- Look for filenames to update |
3138 | 3138 | for ($i = 0, $v_update_file = false, $v_found_file = false; ($i < count($v_stored_list)) && (!$v_update_file); ++$i) { |
@@ -3141,8 +3141,8 @@ discard block |
||
3141 | 3141 | // ----- Compare the file names |
3142 | 3142 | if ($v_stored_list[$i] == $v_header['filename']) { |
3143 | 3143 | TrFctMessage(__FILE__, __LINE__, 3, "File '$v_stored_list[$i]' is present in archive"); |
3144 | - TrFctMessage(__FILE__, __LINE__, 3, "File '$v_stored_list[$i]' mtime=" . filemtime($p_file_list[$i]) . ' ' . date('l dS of F Y h:i:s A', filemtime($p_file_list[$i]))); |
|
3145 | - TrFctMessage(__FILE__, __LINE__, 3, 'Archived mtime=' . $v_header['mtime'] . ' ' . date('l dS of F Y h:i:s A', $v_header['mtime'])); |
|
3144 | + TrFctMessage(__FILE__, __LINE__, 3, "File '$v_stored_list[$i]' mtime=".filemtime($p_file_list[$i]).' '.date('l dS of F Y h:i:s A', filemtime($p_file_list[$i]))); |
|
3145 | + TrFctMessage(__FILE__, __LINE__, 3, 'Archived mtime='.$v_header['mtime'].' '.date('l dS of F Y h:i:s A', $v_header['mtime'])); |
|
3146 | 3146 | |
3147 | 3147 | // ----- Store found informations |
3148 | 3148 | $v_found_file = true; |
@@ -3160,13 +3160,13 @@ discard block |
||
3160 | 3160 | // ----- Flag the name in order not to add the file at the end |
3161 | 3161 | $v_found_list[$i] = 1; |
3162 | 3162 | } else { |
3163 | - TrFctMessage(__FILE__, __LINE__, 4, "File '$p_file_list[$i]' is not " . $v_header['filename'] . ''); |
|
3163 | + TrFctMessage(__FILE__, __LINE__, 4, "File '$p_file_list[$i]' is not ".$v_header['filename'].''); |
|
3164 | 3164 | } |
3165 | 3165 | } |
3166 | 3166 | |
3167 | 3167 | // ----- Copy files that do not need to be updated |
3168 | 3168 | if (!$v_update_file) { |
3169 | - TrFctMessage(__FILE__, __LINE__, 2, 'Keep file ' . $v_header['filename'] . ''); |
|
3169 | + TrFctMessage(__FILE__, __LINE__, 2, 'Keep file '.$v_header['filename'].''); |
|
3170 | 3170 | |
3171 | 3171 | // ----- Write the file header |
3172 | 3172 | if ($p_tar_mode === 'tar') { |
@@ -3178,7 +3178,7 @@ discard block |
||
3178 | 3178 | // ----- Write the file data |
3179 | 3179 | $n = ceil($v_header['size'] / 512); |
3180 | 3180 | for ($j = 0; $j < $n; ++$j) { |
3181 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number ' . ($j + 1)); |
|
3181 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number '.($j + 1)); |
|
3182 | 3182 | if ($p_tar_mode === 'tar') { |
3183 | 3183 | $v_content = fread($v_tar, 512); |
3184 | 3184 | fwrite($v_temp_tar, $v_content, 512); |
@@ -3189,7 +3189,7 @@ discard block |
||
3189 | 3189 | } |
3190 | 3190 | |
3191 | 3191 | // ----- File name and properties are logged if listing mode or file is extracted |
3192 | - TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file ' . $v_header['filename'] . ''); |
|
3192 | + TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file '.$v_header['filename'].''); |
|
3193 | 3193 | |
3194 | 3194 | // ----- Add the array describing the file into the list |
3195 | 3195 | $p_list_detail[$v_nb] = $v_header; |
@@ -3224,7 +3224,7 @@ discard block |
||
3224 | 3224 | } |
3225 | 3225 | |
3226 | 3226 | // ----- Trace |
3227 | - TrFctMessage(__FILE__, __LINE__, 2, 'Skip old file ' . $v_header['filename'] . ''); |
|
3227 | + TrFctMessage(__FILE__, __LINE__, 2, 'Skip old file '.$v_header['filename'].''); |
|
3228 | 3228 | |
3229 | 3229 | // ----- Jump to next file |
3230 | 3230 | if ($p_tar_mode === 'tar') { |
@@ -3361,10 +3361,10 @@ discard block |
||
3361 | 3361 | if (strlen($v_binary_data) != 512) { |
3362 | 3362 | $v_header['filename'] = ''; |
3363 | 3363 | $v_header['status'] = 'invalid_header'; |
3364 | - TrFctMessage(__FILE__, __LINE__, 2, 'Invalid block size : ' . strlen($v_binary_data)); |
|
3364 | + TrFctMessage(__FILE__, __LINE__, 2, 'Invalid block size : '.strlen($v_binary_data)); |
|
3365 | 3365 | |
3366 | 3366 | // ----- Error log |
3367 | - PclErrorLog(-10, 'Invalid block size : ' . strlen($v_binary_data)); |
|
3367 | + PclErrorLog(-10, 'Invalid block size : '.strlen($v_binary_data)); |
|
3368 | 3368 | |
3369 | 3369 | // ----- Return |
3370 | 3370 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -3394,9 +3394,9 @@ discard block |
||
3394 | 3394 | |
3395 | 3395 | // ----- Extract the checksum for check |
3396 | 3396 | $v_header['checksum'] = octdec(trim($v_data['checksum'])); |
3397 | - TrFctMessage(__FILE__, __LINE__, 3, 'File checksum : ' . $v_header['checksum'] . ''); |
|
3397 | + TrFctMessage(__FILE__, __LINE__, 3, 'File checksum : '.$v_header['checksum'].''); |
|
3398 | 3398 | if ($v_header['checksum'] != $v_checksum) { |
3399 | - TrFctMessage(__FILE__, __LINE__, 2, "File checksum is invalid : $v_checksum calculated, " . $v_header['checksum'] . ' expected'); |
|
3399 | + TrFctMessage(__FILE__, __LINE__, 2, "File checksum is invalid : $v_checksum calculated, ".$v_header['checksum'].' expected'); |
|
3400 | 3400 | |
3401 | 3401 | $v_header['filename'] = ''; |
3402 | 3402 | $v_header['status'] = 'invalid_header'; |
@@ -3411,7 +3411,7 @@ discard block |
||
3411 | 3411 | } |
3412 | 3412 | |
3413 | 3413 | // ----- Error log |
3414 | - PclErrorLog(-13, "Invalid checksum : $v_checksum calculated, " . $v_header['checksum'] . ' expected'); |
|
3414 | + PclErrorLog(-13, "Invalid checksum : $v_checksum calculated, ".$v_header['checksum'].' expected'); |
|
3415 | 3415 | |
3416 | 3416 | // ----- Return |
3417 | 3417 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -3422,22 +3422,22 @@ discard block |
||
3422 | 3422 | |
3423 | 3423 | // ----- Extract the properties |
3424 | 3424 | $v_header['filename'] = trim($v_data['filename']); |
3425 | - TrFctMessage(__FILE__, __LINE__, 2, 'Name : ' . $v_header['filename'] . ''); |
|
3425 | + TrFctMessage(__FILE__, __LINE__, 2, 'Name : '.$v_header['filename'].''); |
|
3426 | 3426 | $v_header['mode'] = octdec(trim($v_data['mode'])); |
3427 | - TrFctMessage(__FILE__, __LINE__, 2, "Mode : '" . decoct($v_header['mode']) . "'"); |
|
3427 | + TrFctMessage(__FILE__, __LINE__, 2, "Mode : '".decoct($v_header['mode'])."'"); |
|
3428 | 3428 | $v_header['uid'] = octdec(trim($v_data['uid'])); |
3429 | - TrFctMessage(__FILE__, __LINE__, 2, "Uid : '" . $v_header['uid'] . "'"); |
|
3429 | + TrFctMessage(__FILE__, __LINE__, 2, "Uid : '".$v_header['uid']."'"); |
|
3430 | 3430 | $v_header['gid'] = octdec(trim($v_data['gid'])); |
3431 | - TrFctMessage(__FILE__, __LINE__, 2, "Gid : '" . $v_header['gid'] . "'"); |
|
3431 | + TrFctMessage(__FILE__, __LINE__, 2, "Gid : '".$v_header['gid']."'"); |
|
3432 | 3432 | $v_header['size'] = octdec(trim($v_data['size'])); |
3433 | - TrFctMessage(__FILE__, __LINE__, 2, "Size : '" . $v_header['size'] . "'"); |
|
3433 | + TrFctMessage(__FILE__, __LINE__, 2, "Size : '".$v_header['size']."'"); |
|
3434 | 3434 | $v_header['mtime'] = octdec(trim($v_data['mtime'])); |
3435 | - TrFctMessage(__FILE__, __LINE__, 2, 'Date : ' . date('l dS of F Y h:i:s A', $v_header['mtime'])); |
|
3435 | + TrFctMessage(__FILE__, __LINE__, 2, 'Date : '.date('l dS of F Y h:i:s A', $v_header['mtime'])); |
|
3436 | 3436 | if (($v_header['typeflag'] = $v_data['typeflag']) == '5') { |
3437 | 3437 | $v_header['size'] = 0; |
3438 | - TrFctMessage(__FILE__, __LINE__, 2, "Size (folder) : '" . $v_header['size'] . "'"); |
|
3438 | + TrFctMessage(__FILE__, __LINE__, 2, "Size (folder) : '".$v_header['size']."'"); |
|
3439 | 3439 | } |
3440 | - TrFctMessage(__FILE__, __LINE__, 2, 'File typeflag : ' . $v_header['typeflag'] . ''); |
|
3440 | + TrFctMessage(__FILE__, __LINE__, 2, 'File typeflag : '.$v_header['typeflag'].''); |
|
3441 | 3441 | /* ----- All these fields are removed form the header because they do not carry interesting info |
3442 | 3442 | $v_header[link] = trim($v_data[link]); |
3443 | 3443 | TrFctMessage(__FILE__, __LINE__, 2, "Linkname : $v_header[linkname]"); |
@@ -3617,7 +3617,7 @@ discard block |
||
3617 | 3617 | // ----- Ignore only the double '//' in path, |
3618 | 3618 | // but not the first and last '/' |
3619 | 3619 | } else { |
3620 | - $v_result = $v_list[$i] . ($i != (count($v_list) - 1) ? '/' . $v_result : ''); |
|
3620 | + $v_result = $v_list[$i].($i != (count($v_list) - 1) ? '/'.$v_result : ''); |
|
3621 | 3621 | } |
3622 | 3622 | } |
3623 | 3623 | } |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | // ------------------------------------------------------------------------ // |
27 | 27 | |
28 | 28 | $path = dirname(dirname(dirname(__DIR__))); |
29 | -include_once $path . '/mainfile.php'; |
|
30 | -include_once $path . '/include/cp_functions.php'; |
|
31 | -require_once $path . '/include/cp_header.php'; |
|
29 | +include_once $path.'/mainfile.php'; |
|
30 | +include_once $path.'/include/cp_functions.php'; |
|
31 | +require_once $path.'/include/cp_header.php'; |
|
32 | 32 | |
33 | 33 | global $xoopsModule; |
34 | 34 | |
@@ -41,10 +41,10 @@ discard block |
||
41 | 41 | xoops_loadLanguage('modinfo', $moduleDirName); |
42 | 42 | xoops_loadLanguage('main', $moduleDirName); |
43 | 43 | |
44 | -$pathIcon16 = $GLOBALS['xoops']->url('www/' . $GLOBALS['xoopsModule']->getInfo('sysicons16')); |
|
45 | -$pathIcon32 = $GLOBALS['xoops']->url('www/' . $GLOBALS['xoopsModule']->getInfo('sysicons32')); |
|
46 | -$xoopsModuleAdminPath = $GLOBALS['xoops']->path('www/' . $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin')); |
|
47 | -require_once $xoopsModuleAdminPath . '/moduleadmin.php'; |
|
44 | +$pathIcon16 = $GLOBALS['xoops']->url('www/'.$GLOBALS['xoopsModule']->getInfo('sysicons16')); |
|
45 | +$pathIcon32 = $GLOBALS['xoops']->url('www/'.$GLOBALS['xoopsModule']->getInfo('sysicons32')); |
|
46 | +$xoopsModuleAdminPath = $GLOBALS['xoops']->path('www/'.$GLOBALS['xoopsModule']->getInfo('dirmoduleadmin')); |
|
47 | +require_once $xoopsModuleAdminPath.'/moduleadmin.php'; |
|
48 | 48 | |
49 | 49 | /** @var ExtcalCatHandler $catHandler */ |
50 | 50 | $catHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * @author Mamba (www.xoops.org) |
19 | 19 | **/ |
20 | 20 | |
21 | -echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='http://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . ' ' |
|
22 | - . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>'; |
|
21 | +echo "<div class='adminfooter'>\n"." <div style='text-align: center;'>\n"." <a href='http://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"." </div>\n".' ' |
|
22 | + . _AM_MODULEADMIN_ADMIN_FOOTER."\n".'</div>'; |
|
23 | 23 | |
24 | 24 | xoops_cp_footer(); |
@@ -17,16 +17,16 @@ discard block |
||
17 | 17 | * @author XOOPS Development Team |
18 | 18 | */ |
19 | 19 | |
20 | -include_once __DIR__ . '/admin_header.php'; |
|
20 | +include_once __DIR__.'/admin_header.php'; |
|
21 | 21 | // Display Admin header |
22 | 22 | xoops_cp_header(); |
23 | 23 | |
24 | -$classUtilities = ucfirst($moduleDirName) . 'Utilities'; |
|
24 | +$classUtilities = ucfirst($moduleDirName).'Utilities'; |
|
25 | 25 | if (!class_exists($classUtilities)) { |
26 | 26 | xoops_load('utilities', $moduleDirName); |
27 | 27 | } |
28 | 28 | |
29 | -$configurator = include __DIR__ . '/../include/config.php'; |
|
29 | +$configurator = include __DIR__.'/../include/config.php'; |
|
30 | 30 | |
31 | 31 | foreach (array_keys($configurator['uploadFolders']) as $i) { |
32 | 32 | $classUtilities::createFolder($configurator['uploadFolders'][$i]); |
@@ -40,4 +40,4 @@ discard block |
||
40 | 40 | echo $adminObject->addNavigation(basename(__FILE__)); |
41 | 41 | echo $adminObject->renderIndex(); |
42 | 42 | |
43 | -include_once __DIR__ . '/admin_footer.php'; |
|
43 | +include_once __DIR__.'/admin_footer.php'; |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | { |
9 | 9 | list($usec, $sec) = explode(' ', microtime()); |
10 | 10 | |
11 | - return (float)$usec + (float)$sec; |
|
11 | + return (float) $usec + (float) $sec; |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | $start = getmicrotime(); |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | if (!@include 'Calendar/Calendar.php') { |
17 | 17 | define('CALENDAR_ROOT', '../../'); |
18 | 18 | } |
19 | -require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
|
20 | -require_once CALENDAR_ROOT . 'Day.php'; |
|
19 | +require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
|
20 | +require_once CALENDAR_ROOT.'Day.php'; |
|
21 | 21 | |
22 | 22 | if (!isset($_GET['y'])) { |
23 | 23 | $_GET['y'] = date('Y'); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | <anchor> |
49 | 49 | Back to Month View |
50 | 50 | <go href="<?php |
51 | - echo '?y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() . '&mime=wml'; ?>"/> |
|
51 | + echo '?y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay().'&mime=wml'; ?>"/> |
|
52 | 52 | </anchor> |
53 | 53 | </p> |
54 | 54 | <table> |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $Day->build(); |
57 | 57 | while ($Hour = $Day->fetch()) { |
58 | 58 | echo "<tr>\n"; |
59 | - echo '<td>' . date('g a', $Hour->getTimestamp()) . "</td><td>Free time!</td>\n"; |
|
59 | + echo '<td>'.date('g a', $Hour->getTimestamp())."</td><td>Free time!</td>\n"; |
|
60 | 60 | echo "</tr>\n"; |
61 | 61 | } ?> |
62 | 62 | </table> |
@@ -84,10 +84,10 @@ discard block |
||
84 | 84 | if ($Day->isEmpty()) { |
85 | 85 | echo "<td></td>\n"; |
86 | 86 | } elseif ($Day->isSelected()) { |
87 | - echo '<td><anchor><strong><u>' . $Day->thisDay() . "</u></strong>\n<go href=\"" . $_SERVER['PHP_SELF'] . '?viewday=true&y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() |
|
87 | + echo '<td><anchor><strong><u>'.$Day->thisDay()."</u></strong>\n<go href=\"".$_SERVER['PHP_SELF'].'?viewday=true&y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay() |
|
88 | 88 | . "&mime=wml\" />\n</anchor></td>\n"; |
89 | 89 | } else { |
90 | - echo '<td><anchor>' . $Day->thisDay() . "\n<go href=\"?viewday=true&y=" . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() . "&mime=wml\" /></anchor></td>\n"; |
|
90 | + echo '<td><anchor>'.$Day->thisDay()."\n<go href=\"?viewday=true&y=".$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay()."&mime=wml\" /></anchor></td>\n"; |
|
91 | 91 | } |
92 | 92 | if ($Day->isLast()) { |
93 | 93 | echo "</tr>\n"; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | <anchor> |
99 | 99 | << |
100 | 100 | <go href="<?php |
101 | - echo '?y=' . $Month->thisYear() . '&m=' . $Month->prevMonth() . '&d=' . $Month->thisDay() . '&mime=wml'; ?>"/> |
|
101 | + echo '?y='.$Month->thisYear().'&m='.$Month->prevMonth().'&d='.$Month->thisDay().'&mime=wml'; ?>"/> |
|
102 | 102 | </anchor> |
103 | 103 | </td> |
104 | 104 | <td></td> |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | <anchor> |
111 | 111 | >> |
112 | 112 | <go href="<?php |
113 | - echo '?y=' . $Month->thisYear() . '&m=' . $Month->nextMonth() . '&d=' . $Month->thisDay() . '&mime=wml'; ?>"/> |
|
113 | + echo '?y='.$Month->thisYear().'&m='.$Month->nextMonth().'&d='.$Month->thisDay().'&mime=wml'; ?>"/> |
|
114 | 114 | </anchor> |
115 | 115 | </td> |
116 | 116 | </tr> |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | } ?> |
122 | 122 | <p><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Back to HTML</a></p> |
123 | - <?php echo '<p>Took: ' . (getmicrotime() - $start) . ' seconds</p>'; ?> |
|
123 | + <?php echo '<p>Took: '.(getmicrotime() - $start).' seconds</p>'; ?> |
|
124 | 124 | </wml> |
125 | 125 | <?php |
126 | 126 | #-----------------------------------------------------------------------------# |
@@ -144,14 +144,14 @@ discard block |
||
144 | 144 | <p> |
145 | 145 | <anchor> |
146 | 146 | <a href="<?php |
147 | - echo '?y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay(); ?>">Back to Month View</a> |
|
147 | + echo '?y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay(); ?>">Back to Month View</a> |
|
148 | 148 | </p> |
149 | 149 | <table> |
150 | 150 | <?php |
151 | 151 | $Day->build(); |
152 | 152 | while ($Hour = $Day->fetch()) { |
153 | 153 | echo "<tr>\n"; |
154 | - echo '<td>' . date('g a', $Hour->getTimestamp()) . "</td><td>Free time!</td>\n"; |
|
154 | + echo '<td>'.date('g a', $Hour->getTimestamp())."</td><td>Free time!</td>\n"; |
|
155 | 155 | echo "</tr>\n"; |
156 | 156 | } ?> |
157 | 157 | </table> |
@@ -179,9 +179,9 @@ discard block |
||
179 | 179 | if ($Day->isEmpty()) { |
180 | 180 | echo "<td></td>\n"; |
181 | 181 | } elseif ($Day->isSelected()) { |
182 | - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?viewday=true&y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() . '&wml"><strong><u>' . $Day->thisDay() . "</u></strong></a></td>\n"; |
|
182 | + echo '<td><a href="'.$_SERVER['PHP_SELF'].'?viewday=true&y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay().'&wml"><strong><u>'.$Day->thisDay()."</u></strong></a></td>\n"; |
|
183 | 183 | } else { |
184 | - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?viewday=true&y=' . $Day->thisYear() . '&m=' . $Day->thisMonth() . '&d=' . $Day->thisDay() . '">' . $Day->thisDay() . "</a></td>\n"; |
|
184 | + echo '<td><a href="'.$_SERVER['PHP_SELF'].'?viewday=true&y='.$Day->thisYear().'&m='.$Day->thisMonth().'&d='.$Day->thisDay().'">'.$Day->thisDay()."</a></td>\n"; |
|
185 | 185 | } |
186 | 186 | if ($Day->isLast()) { |
187 | 187 | echo "</tr>\n"; |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | <tr> |
191 | 191 | <td> |
192 | 192 | <a href="<?php |
193 | - echo '?y=' . $Month->thisYear() . '&m=' . $Month->prevMonth() . '&d=' . $Month->thisDay(); ?>"> |
|
193 | + echo '?y='.$Month->thisYear().'&m='.$Month->prevMonth().'&d='.$Month->thisDay(); ?>"> |
|
194 | 194 | <<</a> |
195 | 195 | </td> |
196 | 196 | <td></td> |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | <td></td> |
201 | 201 | <td> |
202 | 202 | <a href="<?php |
203 | - echo '?y=' . $Month->thisYear() . '&m=' . $Month->nextMonth() . '&d=' . $Month->thisDay(); ?>">>></a> |
|
203 | + echo '?y='.$Month->thisYear().'&m='.$Month->nextMonth().'&d='.$Month->thisDay(); ?>">>></a> |
|
204 | 204 | </td> |
205 | 205 | </tr> |
206 | 206 | </table> |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | |
210 | 210 | } ?> |
211 | 211 | |
212 | - <?php echo '<p><b>Took: ' . (getmicrotime() - $start) . ' seconds</b></p>'; ?> |
|
212 | + <?php echo '<p><b>Took: '.(getmicrotime() - $start).' seconds</b></p>'; ?> |
|
213 | 213 | </body> |
214 | 214 | </html> |
215 | 215 | <?php |