@@ -144,8 +144,8 @@ |
||
144 | 144 | // Flag current day |
145 | 145 | $selectedDays = array( |
146 | 146 | new Calendar_Day(date('Y', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($GLOBALS['xoopsUser']))), |
147 | - date('n', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($GLOBALS['xoopsUser']))), |
|
148 | - date('j', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($GLOBALS['xoopsUser'])))), |
|
147 | + date('n', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($GLOBALS['xoopsUser']))), |
|
148 | + date('j', xoops_getUserTimestamp(time(), $extcalTimeHandler->_getUserTimeZone($GLOBALS['xoopsUser'])))), |
|
149 | 149 | ); |
150 | 150 | |
151 | 151 | // Build calendar object |
@@ -450,11 +450,11 @@ |
||
450 | 450 | * @param array $event |
451 | 451 | * @param array $eventsArray |
452 | 452 | * @param ExtcalTime $extcalTimeHandler |
453 | - * @param $startMonth |
|
454 | - * @param $endMonth |
|
453 | + * @param integer $startMonth |
|
454 | + * @param integer $endMonth |
|
455 | 455 | * @param $cats |
456 | 456 | * |
457 | - * @return bool |
|
457 | + * @return false|null |
|
458 | 458 | */ |
459 | 459 | function bExtcalMinicalAddEventToArray($event, &$eventsArray, $extcalTimeHandler, $startMonth, $endMonth, $cats) |
460 | 460 | { |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | */ |
19 | 19 | |
20 | 20 | global $extcalConfig, $xoopsUser; |
21 | -require_once __DIR__ . '/../include/constantes.php'; |
|
22 | -require_once __DIR__ . '/../class/utility.php'; |
|
23 | -require_once __DIR__ . '/../class/tableForm.php'; |
|
21 | +require_once __DIR__.'/../include/constantes.php'; |
|
22 | +require_once __DIR__.'/../class/utility.php'; |
|
23 | +require_once __DIR__.'/../class/tableForm.php'; |
|
24 | 24 | //--------------------------------------------------------------------------- |
25 | 25 | /** |
26 | 26 | * @param $options |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | |
34 | 34 | extcal_getDefautminicalOption($options); |
35 | 35 | |
36 | - require_once __DIR__ . '/../class/config.php'; |
|
36 | + require_once __DIR__.'/../class/config.php'; |
|
37 | 37 | |
38 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Util/Textual.php'; |
|
39 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Month/Weeks.php'; |
|
40 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Day.php'; |
|
38 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Util/Textual.php'; |
|
39 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Month/Weeks.php'; |
|
40 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Day.php'; |
|
41 | 41 | // require_once CALENDAR_ROOT . 'Month/Weeks.php'; |
42 | 42 | // require_once CALENDAR_ROOT . 'Day.php'; |
43 | 43 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'cat' => $tCatSelected, |
125 | 125 | 'externalKeys' => 'cat_id', |
126 | 126 | ); |
127 | - $events = $eventHandler->getEventsOnPeriode($criteres); |
|
127 | + $events = $eventHandler->getEventsOnPeriode($criteres); |
|
128 | 128 | } else { |
129 | 129 | $events = array(); |
130 | 130 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | 'number' => $dayCalObj->thisDay(), |
188 | 188 | 'isSelected' => $dayCalObj->isSelected(), |
189 | 189 | ); |
190 | - $day = $dayCalObj->thisDay(); |
|
190 | + $day = $dayCalObj->thisDay(); |
|
191 | 191 | if (isset($eventsArray[$day]) && !$dayCalObj->isEmpty()) { |
192 | 192 | $tableRows[$rowId]['week'][$cellId]['haveEvents'] = true; |
193 | 193 | $tableRows[$rowId]['week'][$cellId]['color'] = $eventsArray[$day]['color']; |
@@ -217,15 +217,15 @@ discard block |
||
217 | 217 | // Making navig data |
218 | 218 | $navig = array( |
219 | 219 | 'page' => $extcalConfig['start_page'], |
220 | - 'uri' => 'year=' . $monthCalObj->thisYear() . '&month=' . $monthCalObj->thisMonth(), |
|
220 | + 'uri' => 'year='.$monthCalObj->thisYear().'&month='.$monthCalObj->thisMonth(), |
|
221 | 221 | 'name' => $extcalTimeHandler->getFormatedDate($extcalConfig['nav_date_month'], $monthCalObj->getTimestamp()), |
222 | 222 | ); |
223 | 223 | |
224 | 224 | $horloge = array(); |
225 | 225 | $horloge['display'] = (trim($options[11]) != ''); |
226 | - $horloge['fullName'] = XOOPS_URL . _EXTCAL_PATH_HORLOGES . $options[11]; |
|
227 | - $horloge['width'] = $options[12] . 'px'; |
|
228 | - $horloge['height'] = $options[13] . 'px'; |
|
226 | + $horloge['fullName'] = XOOPS_URL._EXTCAL_PATH_HORLOGES.$options[11]; |
|
227 | + $horloge['width'] = $options[12].'px'; |
|
228 | + $horloge['height'] = $options[13].'px'; |
|
229 | 229 | |
230 | 230 | $ret = array( |
231 | 231 | 'imageParam' => $imageParam, |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | */ |
252 | 252 | function bExtcalMinicalEdit($options) |
253 | 253 | { |
254 | - require_once __DIR__ . '/../class/form/spin/formspin.php'; |
|
254 | + require_once __DIR__.'/../class/form/spin/formspin.php'; |
|
255 | 255 | global $xoopsUser; |
256 | 256 | |
257 | 257 | // $t = print_r(get_defined_vars(),true); |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $imageCatHandler = xoops_getHandler('imagecategory'); |
273 | 273 | |
274 | 274 | //===================================================================== |
275 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_OPT_SLIDE_SHOW . '</div>', 'head'); |
|
275 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_OPT_SLIDE_SHOW.'</div>', 'head'); |
|
276 | 276 | |
277 | 277 | $k = 0; |
278 | 278 | $xfValue[$k] = new XoopsFormRadio(_MB_EXTCAL_DISPLAY_IMG, "options[{$k}]", $options[$k]); |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | $xfValue[$k] = new ExtcalFormSpin(_MB_EXTCAL_SS_NB_PHOTOS, "options[{$k}]", $options[$k], 0, 50, 1, 0, 8, _MB_EXTCAL_PX, $imgFolder = ''); |
314 | 314 | $form->addElement($xfValue[$k], false); |
315 | 315 | //===================================================================== |
316 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_OPT_SHOW . '</div>', 'head'); |
|
316 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_OPT_SHOW.'</div>', 'head'); |
|
317 | 317 | |
318 | 318 | $t = array( |
319 | 319 | -1 => _MB_EXTCAL_PREVIEW, |
@@ -352,9 +352,9 @@ discard block |
||
352 | 352 | $form->addElement($xfValue[$k], false); |
353 | 353 | |
354 | 354 | //===================================================================== |
355 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_HORLOGE_OPT . '</div>', 'head'); |
|
355 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_HORLOGE_OPT.'</div>', 'head'); |
|
356 | 356 | //--------------------------------------------------------------------- |
357 | - $t = XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH . _EXTCAL_PATH_HORLOGES); |
|
357 | + $t = XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH._EXTCAL_PATH_HORLOGES); |
|
358 | 358 | $t = array_merge(array(' ' => _NONE), $t); |
359 | 359 | |
360 | 360 | $k = 11; |
@@ -437,12 +437,12 @@ discard block |
||
437 | 437 | // $src = $doc->createElement('src'); |
438 | 438 | $src = clone $tempSrc; |
439 | 439 | $src = $photo->appendChild($src); |
440 | - $value = $doc->createTextNode(XOOPS_URL . '/uploads/' . $images->getVar('image_name')); |
|
440 | + $value = $doc->createTextNode(XOOPS_URL.'/uploads/'.$images->getVar('image_name')); |
|
441 | 441 | $src->appendChild($value); |
442 | 442 | } |
443 | 443 | |
444 | 444 | // get completed xml document |
445 | - $xml_string = $doc->save(XOOPS_ROOT_PATH . '/cache/extcalSlideShowParam.xml'); |
|
445 | + $xml_string = $doc->save(XOOPS_ROOT_PATH.'/cache/extcalSlideShowParam.xml'); |
|
446 | 446 | } |
447 | 447 | |
448 | 448 | /**************************************************************************/ |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | define('_AM_EXTCAL_MD_FILE_DONT_EXIST_SHORT', "Module files don't exist"); |
94 | 94 | define('_AM_EXTCAL_MODULE_ADMIN_SUMMARY', 'eXtCal Administration Summary'); |
95 | 95 | define('_AM_EXTCAL_MULTIUPLOADS_NOT_OK', |
96 | - "The multiuploads component is not installed.<br><br><a href='http://xoops.kiolo.com/modules/mydownloads/'>Download here the multiuploads component</a><br><br>and install it in the folder 'class/xoopsform/'"); |
|
96 | + "The multiuploads component is not installed.<br><br><a href='http://xoops.kiolo.com/modules/mydownloads/'>Download here the multiuploads component</a><br><br>and install it in the folder 'class/xoopsform/'"); |
|
97 | 97 | define('_AM_EXTCAL_NAME', 'Name'); |
98 | 98 | define('_AM_EXTCAL_NOPERMSSET', 'Permission cannot be set: There are no Categories created yet! Please create a Category first.'); |
99 | 99 | define('_AM_EXTCAL_PENDING', 'Pending'); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | define('_AM_EXTCAL_PREFERENCES', 'Preferences'); |
104 | 104 | define('_AM_EXTCAL_PUBLIC_PERM_MASK', 'Public permissions mask'); |
105 | 105 | define('_AM_EXTCAL_PUBLIC_PERM_MASK_INFO', |
106 | - "You can set here the default mask permission who will be apply to new category. Be careful to don't give excessive permissions here because all new category will give them."); |
|
106 | + "You can set here the default mask permission who will be apply to new category. Be careful to don't give excessive permissions here because all new category will give them."); |
|
107 | 107 | define('_AM_EXTCAL_REDIRECT_DELOK', 'successfully deleted'); |
108 | 108 | define('_AM_EXTCAL_START_DATE', 'Start Date'); |
109 | 109 | define('_AM_EXTCAL_SUBMIT_PERMISSION', 'Submit permission'); |
@@ -2314,7 +2314,7 @@ discard block |
||
2314 | 2314 | $p_tar_mode |
2315 | 2315 | ) { |
2316 | 2316 | TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtractByIndexList', |
2317 | - "archive='$p_tarname', index_string='$p_index_string', list, path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode"); |
|
2317 | + "archive='$p_tarname', index_string='$p_index_string', list, path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode"); |
|
2318 | 2318 | $v_result = 1; |
2319 | 2319 | $v_nb = 0; |
2320 | 2320 | |
@@ -2425,7 +2425,7 @@ discard block |
||
2425 | 2425 | $p_tar_mode |
2426 | 2426 | ) { |
2427 | 2427 | TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtractByIndex', |
2428 | - "archive_descr='$p_tar', index_current=$p_index_current, index_start='$p_index_start', index_stop='$p_index_stop', list, path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode"); |
|
2428 | + "archive_descr='$p_tar', index_current=$p_index_current, index_start='$p_index_start', index_stop='$p_index_stop', list, path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode"); |
|
2429 | 2429 | $v_result = 1; |
2430 | 2430 | $v_nb = 0; |
2431 | 2431 |
@@ -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 { |
@@ -2215,7 +2215,7 @@ discard block |
||
2215 | 2215 | // ----- Trace |
2216 | 2216 | TrFctMessage(__FILE__, __LINE__, 2, 'Extraction done'); |
2217 | 2217 | } else { |
2218 | - TrFctMessage(__FILE__, __LINE__, 2, 'Extraction of file ' . $v_header['filename'] . ' skipped.'); |
|
2218 | + TrFctMessage(__FILE__, __LINE__, 2, 'Extraction of file '.$v_header['filename'].' skipped.'); |
|
2219 | 2219 | |
2220 | 2220 | // ----- Jump to next file |
2221 | 2221 | TrFctMessage(__FILE__, __LINE__, 2, 'Jump to next file'); |
@@ -2228,8 +2228,8 @@ discard block |
||
2228 | 2228 | } // ----- Look for file that is not to be unzipped |
2229 | 2229 | else { |
2230 | 2230 | // ----- Trace |
2231 | - TrFctMessage(__FILE__, __LINE__, 2, 'Jump file ' . $v_header['filename'] . ''); |
|
2232 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2231 | + TrFctMessage(__FILE__, __LINE__, 2, 'Jump file '.$v_header['filename'].''); |
|
2232 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2233 | 2233 | |
2234 | 2234 | // ----- Jump to next file |
2235 | 2235 | if ($p_tar_mode === 'tar') { |
@@ -2238,7 +2238,7 @@ discard block |
||
2238 | 2238 | gzseek($v_tar, gztell($v_tar) + (ceil($v_header['size'] / 512) * 512)); |
2239 | 2239 | } |
2240 | 2240 | |
2241 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2241 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2242 | 2242 | } |
2243 | 2243 | |
2244 | 2244 | if ($p_tar_mode === 'tar') { |
@@ -2249,7 +2249,7 @@ discard block |
||
2249 | 2249 | |
2250 | 2250 | // ----- File name and properties are logged if listing mode or file is extracted |
2251 | 2251 | if ($v_listing || $v_extract_file || $v_extraction_stopped) { |
2252 | - TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file ' . $v_header['filename'] . ''); |
|
2252 | + TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file '.$v_header['filename'].''); |
|
2253 | 2253 | |
2254 | 2254 | // ----- Log extracted files |
2255 | 2255 | if (($v_file_dir = dirname($v_header['filename'])) == $v_header['filename']) { |
@@ -2325,7 +2325,7 @@ discard block |
||
2325 | 2325 | || ((0 !== strpos($p_path, '/')) && (0 !== strpos($p_path, '../')) |
2326 | 2326 | && (0 !== strpos($p_path, './'))) |
2327 | 2327 | ) { |
2328 | - $p_path = './' . $p_path; |
|
2328 | + $p_path = './'.$p_path; |
|
2329 | 2329 | } |
2330 | 2330 | |
2331 | 2331 | // ----- Look for path to remove format (should end by /) |
@@ -2473,14 +2473,14 @@ discard block |
||
2473 | 2473 | continue; |
2474 | 2474 | } |
2475 | 2475 | |
2476 | - TrFctMessage(__FILE__, __LINE__, 2, 'Found file ' . $v_header['filename'] . ", size '" . $v_header['size'] . "'"); |
|
2476 | + TrFctMessage(__FILE__, __LINE__, 2, 'Found file '.$v_header['filename'].", size '".$v_header['size']."'"); |
|
2477 | 2477 | |
2478 | 2478 | // ----- Look if file is in the range to be extracted |
2479 | 2479 | if (($p_index_current >= $p_index_start) && ($p_index_current <= $p_index_stop)) { |
2480 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' is in the range to be extracted'); |
|
2480 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' is in the range to be extracted'); |
|
2481 | 2481 | $v_extract_file = true; |
2482 | 2482 | } else { |
2483 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' is out of the range'); |
|
2483 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' is out of the range'); |
|
2484 | 2484 | $v_extract_file = false; |
2485 | 2485 | } |
2486 | 2486 | |
@@ -2495,8 +2495,8 @@ discard block |
||
2495 | 2495 | } // ----- Look for file that is not to be extracted |
2496 | 2496 | else { |
2497 | 2497 | // ----- Trace |
2498 | - TrFctMessage(__FILE__, __LINE__, 2, 'Jump file ' . $v_header['filename'] . ''); |
|
2499 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2498 | + TrFctMessage(__FILE__, __LINE__, 2, 'Jump file '.$v_header['filename'].''); |
|
2499 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2500 | 2500 | |
2501 | 2501 | // ----- Jump to next file |
2502 | 2502 | if ($p_tar_mode === 'tar') { |
@@ -2505,7 +2505,7 @@ discard block |
||
2505 | 2505 | gzseek($v_tar, gztell($v_tar) + (ceil($v_header['size'] / 512) * 512)); |
2506 | 2506 | } |
2507 | 2507 | |
2508 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2508 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2509 | 2509 | } |
2510 | 2510 | |
2511 | 2511 | if ($p_tar_mode === 'tar') { |
@@ -2516,7 +2516,7 @@ discard block |
||
2516 | 2516 | |
2517 | 2517 | // ----- File name and properties are logged if listing mode or file is extracted |
2518 | 2518 | if ($v_extract_file) { |
2519 | - TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file ' . $v_header['filename'] . ''); |
|
2519 | + TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file '.$v_header['filename'].''); |
|
2520 | 2520 | |
2521 | 2521 | // ----- Log extracted files |
2522 | 2522 | if (($v_file_dir = dirname($v_header['filename'])) == $v_header['filename']) { |
@@ -2573,10 +2573,10 @@ discard block |
||
2573 | 2573 | |
2574 | 2574 | // ----- Look for path to remove |
2575 | 2575 | if (($p_remove_path != '') && (0 === strpos($v_header['filename'], $p_remove_path))) { |
2576 | - TrFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file " . $v_header['filename'] . ''); |
|
2576 | + TrFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file ".$v_header['filename'].''); |
|
2577 | 2577 | // ----- Remove the path |
2578 | 2578 | $v_header['filename'] = substr($v_header['filename'], $p_remove_path_size); |
2579 | - TrFctMessage(__FILE__, __LINE__, 3, 'Resulting file is ' . $v_header['filename'] . ''); |
|
2579 | + TrFctMessage(__FILE__, __LINE__, 3, 'Resulting file is '.$v_header['filename'].''); |
|
2580 | 2580 | } |
2581 | 2581 | |
2582 | 2582 | // ----- Add the path to the file |
@@ -2590,22 +2590,22 @@ discard block |
||
2590 | 2590 | |
2591 | 2591 | // ----- Add the path |
2592 | 2592 | if (0 === strpos($v_header['filename'], '/')) { |
2593 | - $v_header['filename'] = $p_path . $v_header['filename']; |
|
2593 | + $v_header['filename'] = $p_path.$v_header['filename']; |
|
2594 | 2594 | } else { |
2595 | - $v_header['filename'] = $p_path . '/' . $v_header['filename']; |
|
2595 | + $v_header['filename'] = $p_path.'/'.$v_header['filename']; |
|
2596 | 2596 | } |
2597 | 2597 | } |
2598 | 2598 | |
2599 | 2599 | // ----- Trace |
2600 | - TrFctMessage(__FILE__, __LINE__, 2, 'Extracting file (with path) ' . $v_header['filename'] . ", size '" . $v_header['size'] . "'"); |
|
2600 | + TrFctMessage(__FILE__, __LINE__, 2, 'Extracting file (with path) '.$v_header['filename'].", size '".$v_header['size']."'"); |
|
2601 | 2601 | |
2602 | 2602 | // ----- Check that the file does not exists |
2603 | 2603 | if (file_exists($v_header['filename'])) { |
2604 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' already exists'); |
|
2604 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' already exists'); |
|
2605 | 2605 | |
2606 | 2606 | // ----- Look if file is a directory |
2607 | 2607 | if (is_dir($v_header['filename'])) { |
2608 | - TrFctMessage(__FILE__, __LINE__, 2, 'Existing file ' . $v_header['filename'] . ' is a directory'); |
|
2608 | + TrFctMessage(__FILE__, __LINE__, 2, 'Existing file '.$v_header['filename'].' is a directory'); |
|
2609 | 2609 | |
2610 | 2610 | // ----- Change the file status |
2611 | 2611 | $v_header['status'] = 'already_a_directory'; |
@@ -2616,7 +2616,7 @@ discard block |
||
2616 | 2616 | } // ----- Look if file is write protected |
2617 | 2617 | else { |
2618 | 2618 | if (!s_writable($v_header['filename'])) { |
2619 | - TrFctMessage(__FILE__, __LINE__, 2, 'Existing file ' . $v_header['filename'] . ' is write protected'); |
|
2619 | + TrFctMessage(__FILE__, __LINE__, 2, 'Existing file '.$v_header['filename'].' is write protected'); |
|
2620 | 2620 | |
2621 | 2621 | // ----- Change the file status |
2622 | 2622 | $v_header['status'] = 'write_protected'; |
@@ -2657,7 +2657,7 @@ discard block |
||
2657 | 2657 | } |
2658 | 2658 | |
2659 | 2659 | if (($v_result = PclTarHandlerDirCheck($v_dir_to_check)) != 1) { |
2660 | - TrFctMessage(__FILE__, __LINE__, 2, 'Unable to create path for ' . $v_header['filename'] . ''); |
|
2660 | + TrFctMessage(__FILE__, __LINE__, 2, 'Unable to create path for '.$v_header['filename'].''); |
|
2661 | 2661 | |
2662 | 2662 | // ----- Change the file status |
2663 | 2663 | $v_header['status'] = 'path_creation_fail'; |
@@ -2672,7 +2672,7 @@ discard block |
||
2672 | 2672 | if ($v_extract_file && ($v_header['typeflag'] != '5')) { |
2673 | 2673 | // ----- Open the destination file in write mode |
2674 | 2674 | if (($v_dest_file = @fopen($v_header['filename'], 'wb')) == 0) { |
2675 | - TrFctMessage(__FILE__, __LINE__, 2, 'Error while opening ' . $v_header['filename'] . ' in write binary mode'); |
|
2675 | + TrFctMessage(__FILE__, __LINE__, 2, 'Error while opening '.$v_header['filename'].' in write binary mode'); |
|
2676 | 2676 | |
2677 | 2677 | // ----- Change the file status |
2678 | 2678 | $v_header['status'] = 'write_error'; |
@@ -2685,12 +2685,12 @@ discard block |
||
2685 | 2685 | gzseek($v_tar, gztell($v_tar) + (ceil($v_header['size'] / 512) * 512)); |
2686 | 2686 | } |
2687 | 2687 | } else { |
2688 | - TrFctMessage(__FILE__, __LINE__, 2, 'Start extraction of ' . $v_header['filename'] . ''); |
|
2688 | + TrFctMessage(__FILE__, __LINE__, 2, 'Start extraction of '.$v_header['filename'].''); |
|
2689 | 2689 | |
2690 | 2690 | // ----- Read data |
2691 | 2691 | $n = floor($v_header['size'] / 512); |
2692 | 2692 | for ($i = 0; $i < $n; ++$i) { |
2693 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number ' . ($i + 1)); |
|
2693 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number '.($i + 1)); |
|
2694 | 2694 | if ($p_tar_mode === 'tar') { |
2695 | 2695 | $v_content = fread($v_tar, 512); |
2696 | 2696 | } else { |
@@ -2699,7 +2699,7 @@ discard block |
||
2699 | 2699 | fwrite($v_dest_file, $v_content, 512); |
2700 | 2700 | } |
2701 | 2701 | if (($v_header['size'] % 512) != 0) { |
2702 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read last ' . ($v_header['size'] % 512) . ' bytes in a 512 block'); |
|
2702 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read last '.($v_header['size'] % 512).' bytes in a 512 block'); |
|
2703 | 2703 | if ($p_tar_mode === 'tar') { |
2704 | 2704 | $v_content = fread($v_tar, 512); |
2705 | 2705 | } else { |
@@ -2737,7 +2737,7 @@ discard block |
||
2737 | 2737 | // ----- Trace |
2738 | 2738 | TrFctMessage(__FILE__, __LINE__, 2, 'Extraction done'); |
2739 | 2739 | } else { |
2740 | - TrFctMessage(__FILE__, __LINE__, 2, 'Extraction of file ' . $v_header['filename'] . ' skipped.'); |
|
2740 | + TrFctMessage(__FILE__, __LINE__, 2, 'Extraction of file '.$v_header['filename'].' skipped.'); |
|
2741 | 2741 | |
2742 | 2742 | // ----- Jump to next file |
2743 | 2743 | TrFctMessage(__FILE__, __LINE__, 2, 'Jump to next file'); |
@@ -2791,7 +2791,7 @@ discard block |
||
2791 | 2791 | } |
2792 | 2792 | |
2793 | 2793 | // ----- Open a temporary file in write mode |
2794 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
2794 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
2795 | 2795 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
2796 | 2796 | if (($v_temp_tar = @fopen($v_temp_tarname, 'wb')) == 0) { |
2797 | 2797 | // ----- Close tar file |
@@ -2820,7 +2820,7 @@ discard block |
||
2820 | 2820 | } |
2821 | 2821 | |
2822 | 2822 | // ----- Open a temporary file in write mode |
2823 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
2823 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
2824 | 2824 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
2825 | 2825 | if (($v_temp_tar = @gzopen($v_temp_tarname, 'wb')) == 0) { |
2826 | 2826 | // ----- Close tar file |
@@ -2877,7 +2877,7 @@ discard block |
||
2877 | 2877 | continue; |
2878 | 2878 | } |
2879 | 2879 | |
2880 | - TrFctMessage(__FILE__, __LINE__, 2, 'Found file ' . $v_header['filename'] . ", size '" . $v_header['size'] . "'"); |
|
2880 | + TrFctMessage(__FILE__, __LINE__, 2, 'Found file '.$v_header['filename'].", size '".$v_header['size']."'"); |
|
2881 | 2881 | |
2882 | 2882 | // ----- Look for filenames to delete |
2883 | 2883 | for ($i = 0, $v_delete_file = false; ($i < count($p_file_list)) && (!$v_delete_file); ++$i) { |
@@ -2885,12 +2885,12 @@ discard block |
||
2885 | 2885 | // if ($p_file_list[$i] == $v_header['filename']) |
2886 | 2886 | if (($v_len = strcmp($p_file_list[$i], $v_header['filename'])) <= 0) { |
2887 | 2887 | if ($v_len == 0) { |
2888 | - TrFctMessage(__FILE__, __LINE__, 3, 'Found that ' . $v_header['filename'] . ' need to be deleted'); |
|
2888 | + TrFctMessage(__FILE__, __LINE__, 3, 'Found that '.$v_header['filename'].' need to be deleted'); |
|
2889 | 2889 | $v_delete_file = true; |
2890 | 2890 | } else { |
2891 | - TrFctMessage(__FILE__, __LINE__, 3, 'Look if ' . $v_header['filename'] . " is a file in $p_file_list[$i]"); |
|
2891 | + TrFctMessage(__FILE__, __LINE__, 3, 'Look if '.$v_header['filename']." is a file in $p_file_list[$i]"); |
|
2892 | 2892 | if (substr($v_header['filename'], strlen($p_file_list[$i]), 1) === '/') { |
2893 | - TrFctMessage(__FILE__, __LINE__, 3, '' . $v_header['filename'] . " is a file in $p_file_list[$i]"); |
|
2893 | + TrFctMessage(__FILE__, __LINE__, 3, ''.$v_header['filename']." is a file in $p_file_list[$i]"); |
|
2894 | 2894 | $v_delete_file = true; |
2895 | 2895 | } |
2896 | 2896 | } |
@@ -2899,7 +2899,7 @@ discard block |
||
2899 | 2899 | |
2900 | 2900 | // ----- Copy files that do not need to be deleted |
2901 | 2901 | if (!$v_delete_file) { |
2902 | - TrFctMessage(__FILE__, __LINE__, 2, 'Keep file ' . $v_header['filename'] . ''); |
|
2902 | + TrFctMessage(__FILE__, __LINE__, 2, 'Keep file '.$v_header['filename'].''); |
|
2903 | 2903 | |
2904 | 2904 | // ----- Write the file header |
2905 | 2905 | if ($p_tar_mode === 'tar') { |
@@ -2911,7 +2911,7 @@ discard block |
||
2911 | 2911 | // ----- Write the file data |
2912 | 2912 | $n = ceil($v_header['size'] / 512); |
2913 | 2913 | for ($i = 0; $i < $n; ++$i) { |
2914 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number ' . ($i + 1)); |
|
2914 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number '.($i + 1)); |
|
2915 | 2915 | if ($p_tar_mode === 'tar') { |
2916 | 2916 | $v_content = fread($v_tar, 512); |
2917 | 2917 | fwrite($v_temp_tar, $v_content, 512); |
@@ -2922,7 +2922,7 @@ discard block |
||
2922 | 2922 | } |
2923 | 2923 | |
2924 | 2924 | // ----- File name and properties are logged if listing mode or file is extracted |
2925 | - TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file ' . $v_header['filename'] . ''); |
|
2925 | + TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file '.$v_header['filename'].''); |
|
2926 | 2926 | |
2927 | 2927 | // ----- Add the array describing the file into the list |
2928 | 2928 | $p_list_detail[$v_nb] = $v_header; |
@@ -2933,8 +2933,8 @@ discard block |
||
2933 | 2933 | } // ----- Look for file that is to be deleted |
2934 | 2934 | else { |
2935 | 2935 | // ----- Trace |
2936 | - TrFctMessage(__FILE__, __LINE__, 2, 'Start deletion of ' . $v_header['filename'] . ''); |
|
2937 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2936 | + TrFctMessage(__FILE__, __LINE__, 2, 'Start deletion of '.$v_header['filename'].''); |
|
2937 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2938 | 2938 | |
2939 | 2939 | // ----- Jump to next file |
2940 | 2940 | if ($p_tar_mode === 'tar') { |
@@ -2943,7 +2943,7 @@ discard block |
||
2943 | 2943 | gzseek($v_tar, gztell($v_tar) + (ceil($v_header['size'] / 512) * 512)); |
2944 | 2944 | } |
2945 | 2945 | |
2946 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2946 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2947 | 2947 | } |
2948 | 2948 | |
2949 | 2949 | // ----- Look for end of file |
@@ -3029,7 +3029,7 @@ discard block |
||
3029 | 3029 | } |
3030 | 3030 | |
3031 | 3031 | // ----- Open a temporary file in write mode |
3032 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
3032 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
3033 | 3033 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
3034 | 3034 | if (($v_temp_tar = @fopen($v_temp_tarname, 'wb')) == 0) { |
3035 | 3035 | // ----- Close tar file |
@@ -3058,7 +3058,7 @@ discard block |
||
3058 | 3058 | } |
3059 | 3059 | |
3060 | 3060 | // ----- Open a temporary file in write mode |
3061 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
3061 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
3062 | 3062 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
3063 | 3063 | if (($v_temp_tar = @gzopen($v_temp_tarname, 'wb')) == 0) { |
3064 | 3064 | // ----- Close tar file |
@@ -3093,9 +3093,9 @@ discard block |
||
3093 | 3093 | } |
3094 | 3094 | if ($p_add_dir != '') { |
3095 | 3095 | if (substr($p_add_dir, -1) === '/') { |
3096 | - $v_stored_list[$i] = $p_add_dir . $v_stored_list[$i]; |
|
3096 | + $v_stored_list[$i] = $p_add_dir.$v_stored_list[$i]; |
|
3097 | 3097 | } else { |
3098 | - $v_stored_list[$i] = $p_add_dir . '/' . $v_stored_list[$i]; |
|
3098 | + $v_stored_list[$i] = $p_add_dir.'/'.$v_stored_list[$i]; |
|
3099 | 3099 | } |
3100 | 3100 | TrFctMessage(__FILE__, __LINE__, 3, "Add path '$p_add_dir' in file '$p_file_list[$i]' = '$v_stored_list[$i]'"); |
3101 | 3101 | } |
@@ -3150,7 +3150,7 @@ discard block |
||
3150 | 3150 | continue; |
3151 | 3151 | } |
3152 | 3152 | |
3153 | - TrFctMessage(__FILE__, __LINE__, 2, 'Found file ' . $v_header['filename'] . ", size '" . $v_header['size'] . "'"); |
|
3153 | + TrFctMessage(__FILE__, __LINE__, 2, 'Found file '.$v_header['filename'].", size '".$v_header['size']."'"); |
|
3154 | 3154 | |
3155 | 3155 | // ----- Look for filenames to update |
3156 | 3156 | for ($i = 0, $v_update_file = false, $v_found_file = false; ($i < count($v_stored_list)) && (!$v_update_file); ++$i) { |
@@ -3159,8 +3159,8 @@ discard block |
||
3159 | 3159 | // ----- Compare the file names |
3160 | 3160 | if ($v_stored_list[$i] == $v_header['filename']) { |
3161 | 3161 | TrFctMessage(__FILE__, __LINE__, 3, "File '$v_stored_list[$i]' is present in archive"); |
3162 | - 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]))); |
|
3163 | - TrFctMessage(__FILE__, __LINE__, 3, 'Archived mtime=' . $v_header['mtime'] . ' ' . date('l dS of F Y h:i:s A', $v_header['mtime'])); |
|
3162 | + 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]))); |
|
3163 | + TrFctMessage(__FILE__, __LINE__, 3, 'Archived mtime='.$v_header['mtime'].' '.date('l dS of F Y h:i:s A', $v_header['mtime'])); |
|
3164 | 3164 | |
3165 | 3165 | // ----- Store found informations |
3166 | 3166 | $v_found_file = true; |
@@ -3178,13 +3178,13 @@ discard block |
||
3178 | 3178 | // ----- Flag the name in order not to add the file at the end |
3179 | 3179 | $v_found_list[$i] = 1; |
3180 | 3180 | } else { |
3181 | - TrFctMessage(__FILE__, __LINE__, 4, "File '$p_file_list[$i]' is not " . $v_header['filename'] . ''); |
|
3181 | + TrFctMessage(__FILE__, __LINE__, 4, "File '$p_file_list[$i]' is not ".$v_header['filename'].''); |
|
3182 | 3182 | } |
3183 | 3183 | } |
3184 | 3184 | |
3185 | 3185 | // ----- Copy files that do not need to be updated |
3186 | 3186 | if (!$v_update_file) { |
3187 | - TrFctMessage(__FILE__, __LINE__, 2, 'Keep file ' . $v_header['filename'] . ''); |
|
3187 | + TrFctMessage(__FILE__, __LINE__, 2, 'Keep file '.$v_header['filename'].''); |
|
3188 | 3188 | |
3189 | 3189 | // ----- Write the file header |
3190 | 3190 | if ($p_tar_mode === 'tar') { |
@@ -3196,7 +3196,7 @@ discard block |
||
3196 | 3196 | // ----- Write the file data |
3197 | 3197 | $n = ceil($v_header['size'] / 512); |
3198 | 3198 | for ($j = 0; $j < $n; ++$j) { |
3199 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number ' . ($j + 1)); |
|
3199 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number '.($j + 1)); |
|
3200 | 3200 | if ($p_tar_mode === 'tar') { |
3201 | 3201 | $v_content = fread($v_tar, 512); |
3202 | 3202 | fwrite($v_temp_tar, $v_content, 512); |
@@ -3207,7 +3207,7 @@ discard block |
||
3207 | 3207 | } |
3208 | 3208 | |
3209 | 3209 | // ----- File name and properties are logged if listing mode or file is extracted |
3210 | - TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file ' . $v_header['filename'] . ''); |
|
3210 | + TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file '.$v_header['filename'].''); |
|
3211 | 3211 | |
3212 | 3212 | // ----- Add the array describing the file into the list |
3213 | 3213 | $p_list_detail[$v_nb] = $v_header; |
@@ -3242,7 +3242,7 @@ discard block |
||
3242 | 3242 | } |
3243 | 3243 | |
3244 | 3244 | // ----- Trace |
3245 | - TrFctMessage(__FILE__, __LINE__, 2, 'Skip old file ' . $v_header['filename'] . ''); |
|
3245 | + TrFctMessage(__FILE__, __LINE__, 2, 'Skip old file '.$v_header['filename'].''); |
|
3246 | 3246 | |
3247 | 3247 | // ----- Jump to next file |
3248 | 3248 | if ($p_tar_mode === 'tar') { |
@@ -3379,10 +3379,10 @@ discard block |
||
3379 | 3379 | if (strlen($v_binary_data) != 512) { |
3380 | 3380 | $v_header['filename'] = ''; |
3381 | 3381 | $v_header['status'] = 'invalid_header'; |
3382 | - TrFctMessage(__FILE__, __LINE__, 2, 'Invalid block size : ' . strlen($v_binary_data)); |
|
3382 | + TrFctMessage(__FILE__, __LINE__, 2, 'Invalid block size : '.strlen($v_binary_data)); |
|
3383 | 3383 | |
3384 | 3384 | // ----- Error log |
3385 | - PclErrorLog(-10, 'Invalid block size : ' . strlen($v_binary_data)); |
|
3385 | + PclErrorLog(-10, 'Invalid block size : '.strlen($v_binary_data)); |
|
3386 | 3386 | |
3387 | 3387 | // ----- Return |
3388 | 3388 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -3412,9 +3412,9 @@ discard block |
||
3412 | 3412 | |
3413 | 3413 | // ----- Extract the checksum for check |
3414 | 3414 | $v_header['checksum'] = octdec(trim($v_data['checksum'])); |
3415 | - TrFctMessage(__FILE__, __LINE__, 3, 'File checksum : ' . $v_header['checksum'] . ''); |
|
3415 | + TrFctMessage(__FILE__, __LINE__, 3, 'File checksum : '.$v_header['checksum'].''); |
|
3416 | 3416 | if ($v_header['checksum'] != $v_checksum) { |
3417 | - TrFctMessage(__FILE__, __LINE__, 2, "File checksum is invalid : $v_checksum calculated, " . $v_header['checksum'] . ' expected'); |
|
3417 | + TrFctMessage(__FILE__, __LINE__, 2, "File checksum is invalid : $v_checksum calculated, ".$v_header['checksum'].' expected'); |
|
3418 | 3418 | |
3419 | 3419 | $v_header['filename'] = ''; |
3420 | 3420 | $v_header['status'] = 'invalid_header'; |
@@ -3429,7 +3429,7 @@ discard block |
||
3429 | 3429 | } |
3430 | 3430 | |
3431 | 3431 | // ----- Error log |
3432 | - PclErrorLog(-13, "Invalid checksum : $v_checksum calculated, " . $v_header['checksum'] . ' expected'); |
|
3432 | + PclErrorLog(-13, "Invalid checksum : $v_checksum calculated, ".$v_header['checksum'].' expected'); |
|
3433 | 3433 | |
3434 | 3434 | // ----- Return |
3435 | 3435 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -3440,22 +3440,22 @@ discard block |
||
3440 | 3440 | |
3441 | 3441 | // ----- Extract the properties |
3442 | 3442 | $v_header['filename'] = trim($v_data['filename']); |
3443 | - TrFctMessage(__FILE__, __LINE__, 2, 'Name : ' . $v_header['filename'] . ''); |
|
3443 | + TrFctMessage(__FILE__, __LINE__, 2, 'Name : '.$v_header['filename'].''); |
|
3444 | 3444 | $v_header['mode'] = octdec(trim($v_data['mode'])); |
3445 | - TrFctMessage(__FILE__, __LINE__, 2, "Mode : '" . decoct($v_header['mode']) . "'"); |
|
3445 | + TrFctMessage(__FILE__, __LINE__, 2, "Mode : '".decoct($v_header['mode'])."'"); |
|
3446 | 3446 | $v_header['uid'] = octdec(trim($v_data['uid'])); |
3447 | - TrFctMessage(__FILE__, __LINE__, 2, "Uid : '" . $v_header['uid'] . "'"); |
|
3447 | + TrFctMessage(__FILE__, __LINE__, 2, "Uid : '".$v_header['uid']."'"); |
|
3448 | 3448 | $v_header['gid'] = octdec(trim($v_data['gid'])); |
3449 | - TrFctMessage(__FILE__, __LINE__, 2, "Gid : '" . $v_header['gid'] . "'"); |
|
3449 | + TrFctMessage(__FILE__, __LINE__, 2, "Gid : '".$v_header['gid']."'"); |
|
3450 | 3450 | $v_header['size'] = octdec(trim($v_data['size'])); |
3451 | - TrFctMessage(__FILE__, __LINE__, 2, "Size : '" . $v_header['size'] . "'"); |
|
3451 | + TrFctMessage(__FILE__, __LINE__, 2, "Size : '".$v_header['size']."'"); |
|
3452 | 3452 | $v_header['mtime'] = octdec(trim($v_data['mtime'])); |
3453 | - TrFctMessage(__FILE__, __LINE__, 2, 'Date : ' . date('l dS of F Y h:i:s A', $v_header['mtime'])); |
|
3453 | + TrFctMessage(__FILE__, __LINE__, 2, 'Date : '.date('l dS of F Y h:i:s A', $v_header['mtime'])); |
|
3454 | 3454 | if (($v_header['typeflag'] = $v_data['typeflag']) == '5') { |
3455 | 3455 | $v_header['size'] = 0; |
3456 | - TrFctMessage(__FILE__, __LINE__, 2, "Size (folder) : '" . $v_header['size'] . "'"); |
|
3456 | + TrFctMessage(__FILE__, __LINE__, 2, "Size (folder) : '".$v_header['size']."'"); |
|
3457 | 3457 | } |
3458 | - TrFctMessage(__FILE__, __LINE__, 2, 'File typeflag : ' . $v_header['typeflag'] . ''); |
|
3458 | + TrFctMessage(__FILE__, __LINE__, 2, 'File typeflag : '.$v_header['typeflag'].''); |
|
3459 | 3459 | /* ----- All these fields are removed form the header because they do not carry interesting info |
3460 | 3460 | $v_header[link] = trim($v_data[link]); |
3461 | 3461 | TrFctMessage(__FILE__, __LINE__, 2, "Linkname : $v_header[linkname]"); |
@@ -3635,7 +3635,7 @@ discard block |
||
3635 | 3635 | // ----- Ignore only the double '//' in path, |
3636 | 3636 | // but not the first and last '/' |
3637 | 3637 | } else { |
3638 | - $v_result = $v_list[$i] . ($i != (count($v_list) - 1) ? '/' . $v_result : ''); |
|
3638 | + $v_result = $v_list[$i].($i != (count($v_list) - 1) ? '/'.$v_result : ''); |
|
3639 | 3639 | } |
3640 | 3640 | } |
3641 | 3641 | } |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
4 | 4 | |
5 | -require_once XOOPS_ROOT_PATH . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/calendar.php'; |
|
5 | +require_once XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/calendar.php'; |
|
6 | 6 | |
7 | 7 | $moduleDirName = basename(dirname(__DIR__)); |
8 | 8 | xoops_loadLanguage('main', $moduleDirName); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function getFormatedDate($format, $timestamp) |
92 | 92 | { |
93 | - $patterns = array( |
|
93 | + $patterns = array( |
|
94 | 94 | '/January/', |
95 | 95 | '/February/', |
96 | 96 | '/March/', |
@@ -143,18 +143,18 @@ discard block |
||
143 | 143 | _CAL_OCTOBER, |
144 | 144 | _CAL_NOVEMBER, |
145 | 145 | _CAL_DECEMBER, |
146 | - substr(_CAL_JANUARY, 0, 3) . ' ', |
|
147 | - substr(_CAL_FEBRUARY, 0, 3) . ' ', |
|
148 | - substr(_CAL_MARCH, 0, 3) . ' ', |
|
149 | - substr(_CAL_APRIL, 0, 3) . ' ', |
|
150 | - substr(_CAL_MAY, 0, 3) . ' ', |
|
151 | - substr(_CAL_JUNE, 0, 3) . ' ', |
|
152 | - substr(_CAL_JULY, 0, 3) . ' ', |
|
153 | - substr(_CAL_AUGUST, 0, 3) . ' ', |
|
154 | - substr(_CAL_SEPTEMBER, 0, 3) . ' ', |
|
155 | - substr(_CAL_OCTOBER, 0, 3) . ' ', |
|
156 | - substr(_CAL_NOVEMBER, 0, 3) . ' ', |
|
157 | - substr(_CAL_DECEMBER, 0, 3) . ' ', |
|
146 | + substr(_CAL_JANUARY, 0, 3).' ', |
|
147 | + substr(_CAL_FEBRUARY, 0, 3).' ', |
|
148 | + substr(_CAL_MARCH, 0, 3).' ', |
|
149 | + substr(_CAL_APRIL, 0, 3).' ', |
|
150 | + substr(_CAL_MAY, 0, 3).' ', |
|
151 | + substr(_CAL_JUNE, 0, 3).' ', |
|
152 | + substr(_CAL_JULY, 0, 3).' ', |
|
153 | + substr(_CAL_AUGUST, 0, 3).' ', |
|
154 | + substr(_CAL_SEPTEMBER, 0, 3).' ', |
|
155 | + substr(_CAL_OCTOBER, 0, 3).' ', |
|
156 | + substr(_CAL_NOVEMBER, 0, 3).' ', |
|
157 | + substr(_CAL_DECEMBER, 0, 3).' ', |
|
158 | 158 | _CAL_SUNDAY, |
159 | 159 | _CAL_MONDAY, |
160 | 160 | _CAL_TUESDAY, |
@@ -162,13 +162,13 @@ discard block |
||
162 | 162 | _CAL_THURSDAY, |
163 | 163 | _CAL_FRIDAY, |
164 | 164 | _CAL_SATURDAY, |
165 | - substr(_CAL_SUNDAY, 0, 3) . ' ', |
|
166 | - substr(_CAL_MONDAY, 0, 3) . ' ', |
|
167 | - substr(_CAL_TUESDAY, 0, 3) . ' ', |
|
168 | - substr(_CAL_WEDNESDAY, 0, 3) . ' ', |
|
169 | - substr(_CAL_THURSDAY, 0, 3) . ' ', |
|
170 | - substr(_CAL_FRIDAY, 0, 3) . ' ', |
|
171 | - substr(_CAL_SATURDAY, 0, 3) . ' ', |
|
165 | + substr(_CAL_SUNDAY, 0, 3).' ', |
|
166 | + substr(_CAL_MONDAY, 0, 3).' ', |
|
167 | + substr(_CAL_TUESDAY, 0, 3).' ', |
|
168 | + substr(_CAL_WEDNESDAY, 0, 3).' ', |
|
169 | + substr(_CAL_THURSDAY, 0, 3).' ', |
|
170 | + substr(_CAL_FRIDAY, 0, 3).' ', |
|
171 | + substr(_CAL_SATURDAY, 0, 3).' ', |
|
172 | 172 | ); |
173 | 173 | |
174 | 174 | return preg_replace($patterns, $replacements, date($format, $timestamp)); |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | array_shift($eventOptions); |
211 | 211 | $day = ''; |
212 | 212 | foreach ($eventOptions as $option) { |
213 | - $day .= ' ' . $daysName[$option] . ', '; |
|
213 | + $day .= ' '.$daysName[$option].', '; |
|
214 | 214 | } |
215 | 215 | $ret = sprintf(_MD_EXTCAL_RR_WEEKLY, $day, $interval); |
216 | 216 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | array_shift($eventOptions); |
330 | 330 | $month = ''; |
331 | 331 | foreach ($eventOptions as $option) { |
332 | - $month .= ' ' . $monthName[$option] . ', '; |
|
332 | + $month .= ' '.$monthName[$option].', '; |
|
333 | 333 | } |
334 | 334 | $dayString = $day; |
335 | 335 | if (array_key_exists($day, $monthDays)) { |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * Load Calendar base class. |
51 | 51 | */ |
52 | -require_once CALENDAR_ROOT . 'Calendar.php'; |
|
52 | +require_once CALENDAR_ROOT.'Calendar.php'; |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * Represents a Month and builds Days |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function build($sDates = array()) |
97 | 97 | { |
98 | - require_once CALENDAR_ROOT . 'Day.php'; |
|
98 | + require_once CALENDAR_ROOT.'Day.php'; |
|
99 | 99 | $daysInMonth = $this->cE->getDaysInMonth($this->year, $this->month); |
100 | 100 | for ($i = 1; $i <= $daysInMonth; ++$i) { |
101 | 101 | $this->children[$i] = new Calendar_Day($this->year, $this->month, $i); |
@@ -50,12 +50,12 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * Load Calendar base class. |
52 | 52 | */ |
53 | -require_once CALENDAR_ROOT . 'Calendar.php'; |
|
53 | +require_once CALENDAR_ROOT.'Calendar.php'; |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * Load base month. |
57 | 57 | */ |
58 | -require_once CALENDAR_ROOT . 'Month.php'; |
|
58 | +require_once CALENDAR_ROOT.'Month.php'; |
|
59 | 59 | |
60 | 60 | /** |
61 | 61 | * Represents a Month and builds Weeks |
@@ -116,9 +116,9 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function build($sDates = array()) |
118 | 118 | { |
119 | - require_once CALENDAR_ROOT . 'Table/Helper.php'; |
|
119 | + require_once CALENDAR_ROOT.'Table/Helper.php'; |
|
120 | 120 | $this->tableHelper = new Calendar_Table_Helper($this, $this->firstDay); |
121 | - require_once CALENDAR_ROOT . 'Week.php'; |
|
121 | + require_once CALENDAR_ROOT.'Week.php'; |
|
122 | 122 | $numWeeks = $this->tableHelper->getNumWeeks(); |
123 | 123 | for ($i = 1, $d = 1; $i <= $numWeeks; ++$i, $d += $this->cE->getDaysInWeek($this->thisYear(), $this->thisMonth(), $this->thisDay())) { |
124 | 124 | $this->children[$i] = new Calendar_Week($this->year, $this->month, $d, $this->tableHelper->getFirstDay()); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * Load Calendar base class. |
51 | 51 | */ |
52 | -require_once CALENDAR_ROOT . 'Calendar.php'; |
|
52 | +require_once CALENDAR_ROOT.'Calendar.php'; |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * Represents a Year and builds Months<br> |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public function build($sDates = array(), $firstDay = null) |
105 | 105 | { |
106 | - require_once CALENDAR_ROOT . 'Factory.php'; |
|
106 | + require_once CALENDAR_ROOT.'Factory.php'; |
|
107 | 107 | $this->firstDay = $this->defineFirstDayOfWeek($firstDay); |
108 | 108 | $monthsInYear = $this->cE->getMonthsInYear($this->thisYear()); |
109 | 109 | for ($i = 1; $i <= $monthsInYear; ++$i) { |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * Load Calendar base class. |
52 | 52 | */ |
53 | -require_once CALENDAR_ROOT . 'Calendar.php'; |
|
53 | +require_once CALENDAR_ROOT.'Calendar.php'; |
|
54 | 54 | |
55 | 55 | /** |
56 | 56 | * Represents a Week and builds Days in tabular format<br> |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function __construct($y, $m, $d, $firstDay = null) |
140 | 140 | { |
141 | - require_once CALENDAR_ROOT . 'Table/Helper.php'; |
|
141 | + require_once CALENDAR_ROOT.'Table/Helper.php'; |
|
142 | 142 | parent::__construct($y, $m, $d); |
143 | 143 | $this->firstDay = $this->defineFirstDayOfWeek($firstDay); |
144 | 144 | $this->tableHelper = new Calendar_Table_Helper($this, $this->firstDay); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | */ |
171 | 171 | public function build($sDates = array()) |
172 | 172 | { |
173 | - require_once CALENDAR_ROOT . 'Day.php'; |
|
173 | + require_once CALENDAR_ROOT.'Day.php'; |
|
174 | 174 | $year = $this->cE->stampToYear($this->thisWeek); |
175 | 175 | $month = $this->cE->stampToMonth($this->thisWeek); |
176 | 176 | $day = $this->cE->stampToDay($this->thisWeek); |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | case 'array': |
296 | 296 | return $this->toArray($this->prevWeek); |
297 | 297 | case 'object': |
298 | - require_once CALENDAR_ROOT . 'Factory.php'; |
|
298 | + require_once CALENDAR_ROOT.'Factory.php'; |
|
299 | 299 | |
300 | 300 | return Calendar_Factory::createByTimestamp('Week', $this->prevWeek); |
301 | 301 | case 'timestamp': |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | case 'array': |
330 | 330 | return $this->toArray($this->thisWeek); |
331 | 331 | case 'object': |
332 | - require_once CALENDAR_ROOT . 'Factory.php'; |
|
332 | + require_once CALENDAR_ROOT.'Factory.php'; |
|
333 | 333 | |
334 | 334 | return Calendar_Factory::createByTimestamp('Week', $this->thisWeek); |
335 | 335 | case 'timestamp': |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | case 'array': |
357 | 357 | return $this->toArray($this->nextWeek); |
358 | 358 | case 'object': |
359 | - require_once CALENDAR_ROOT . 'Factory.php'; |
|
359 | + require_once CALENDAR_ROOT.'Factory.php'; |
|
360 | 360 | |
361 | 361 | return Calendar_Factory::createByTimestamp('Week', $this->nextWeek); |
362 | 362 | case 'timestamp': |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * Load Calendar base class. |
51 | 51 | */ |
52 | -require_once CALENDAR_ROOT . 'Calendar.php'; |
|
52 | +require_once CALENDAR_ROOT.'Calendar.php'; |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * Represents an Hour and builds Minutes |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function build($sDates = array()) |
96 | 96 | { |
97 | - require_once CALENDAR_ROOT . 'Minute.php'; |
|
97 | + require_once CALENDAR_ROOT.'Minute.php'; |
|
98 | 98 | $mIH = $this->cE->getMinutesInHour($this->year, $this->month, $this->day, $this->hour); |
99 | 99 | for ($i = 0; $i < $mIH; ++$i) { |
100 | 100 | $this->children[$i] = new Calendar_Minute($this->year, $this->month, $this->day, $this->hour, $i); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | && $this->day == $sDate->thisDay() |
120 | 120 | && $this->hour == $sDate->thisHour() |
121 | 121 | ) { |
122 | - $key = (int)$sDate->thisMinute(); |
|
122 | + $key = (int) $sDate->thisMinute(); |
|
123 | 123 | if (isset($this->children[$key])) { |
124 | 124 | $sDate->setSelected(); |
125 | 125 | $this->children[$key] = $sDate; |