@@ -1190,7 +1190,7 @@ discard block |
||
1190 | 1190 | /** |
1191 | 1191 | * @param $p_tarname |
1192 | 1192 | * @param $p_list |
1193 | - * @param $p_mode |
|
1193 | + * @param string $p_mode |
|
1194 | 1194 | * @param string $p_add_dir |
1195 | 1195 | * @param string $p_remove_dir |
1196 | 1196 | * |
@@ -1290,10 +1290,10 @@ discard block |
||
1290 | 1290 | /** |
1291 | 1291 | * @param $p_tarname |
1292 | 1292 | * @param $p_list |
1293 | - * @param $p_mode |
|
1293 | + * @param string $p_mode |
|
1294 | 1294 | * @param $p_list_detail |
1295 | - * @param $p_add_dir |
|
1296 | - * @param $p_remove_dir |
|
1295 | + * @param string $p_add_dir |
|
1296 | + * @param string $p_remove_dir |
|
1297 | 1297 | * |
1298 | 1298 | * @return int |
1299 | 1299 | */ |
@@ -2092,10 +2092,10 @@ discard block |
||
2092 | 2092 | * @param $p_tarname |
2093 | 2093 | * @param $p_file_list |
2094 | 2094 | * @param $p_list_detail |
2095 | - * @param $p_mode |
|
2096 | - * @param $p_path |
|
2095 | + * @param string $p_mode |
|
2096 | + * @param string $p_path |
|
2097 | 2097 | * @param $p_tar_mode |
2098 | - * @param $p_remove_path |
|
2098 | + * @param string $p_remove_path |
|
2099 | 2099 | * |
2100 | 2100 | * @return int |
2101 | 2101 | */ |
@@ -2648,8 +2648,8 @@ discard block |
||
2648 | 2648 | * @param $p_tarname |
2649 | 2649 | * @param $p_index_string |
2650 | 2650 | * @param $p_list_detail |
2651 | - * @param $p_path |
|
2652 | - * @param $p_remove_path |
|
2651 | + * @param string $p_path |
|
2652 | + * @param string $p_remove_path |
|
2653 | 2653 | * @param $p_tar_mode |
2654 | 2654 | * |
2655 | 2655 | * @return int |
@@ -3219,7 +3219,7 @@ discard block |
||
3219 | 3219 | * @param $p_tarname |
3220 | 3220 | * @param $p_file_list |
3221 | 3221 | * @param $p_list_detail |
3222 | - * @param $p_tar_mode |
|
3222 | + * @param string $p_tar_mode |
|
3223 | 3223 | * |
3224 | 3224 | * @return int |
3225 | 3225 | */ |
@@ -3513,9 +3513,9 @@ discard block |
||
3513 | 3513 | * @param $p_tarname |
3514 | 3514 | * @param $p_file_list |
3515 | 3515 | * @param $p_list_detail |
3516 | - * @param $p_tar_mode |
|
3517 | - * @param $p_add_dir |
|
3518 | - * @param $p_remove_dir |
|
3516 | + * @param string $p_tar_mode |
|
3517 | + * @param string $p_add_dir |
|
3518 | + * @param string $p_remove_dir |
|
3519 | 3519 | * |
3520 | 3520 | * @return int |
3521 | 3521 | */ |
@@ -3922,7 +3922,7 @@ discard block |
||
3922 | 3922 | // Return Values : |
3923 | 3923 | // -------------------------------------------------------------------------------- |
3924 | 3924 | /** |
3925 | - * @param $v_binary_data |
|
3925 | + * @param string $v_binary_data |
|
3926 | 3926 | * @param $v_header |
3927 | 3927 | * |
3928 | 3928 | * @return int |
@@ -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 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | public $entry; |
20 | 20 | |
21 | 21 | /** |
22 | - * @param $calendar |
|
22 | + * @param Calendar_Day $calendar |
|
23 | 23 | */ |
24 | 24 | public function __construct($calendar) |
25 | 25 | { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
38 | - * @return mixed |
|
38 | + * @return boolean |
|
39 | 39 | */ |
40 | 40 | public function getEntry() |
41 | 41 | { |
@@ -159,9 +159,9 @@ |
||
159 | 159 | $tHex = array('', '', '', ''); |
160 | 160 | |
161 | 161 | $tHex[0] = $aColors[0]; |
162 | - $tHex[1] = substr('00' . dechex($aColors[1]), -2); |
|
163 | - $tHex[2] = substr('00' . dechex($aColors[2]), -2); |
|
164 | - $tHex[3] = substr('00' . dechex($aColors[3]), -2); |
|
162 | + $tHex[1] = substr('00'.dechex($aColors[1]), -2); |
|
163 | + $tHex[2] = substr('00'.dechex($aColors[2]), -2); |
|
164 | + $tHex[3] = substr('00'.dechex($aColors[3]), -2); |
|
165 | 165 | |
166 | 166 | $colorHexa = implode('', $tHex); |
167 | 167 |
@@ -255,6 +255,10 @@ |
||
255 | 255 | * @param $max |
256 | 256 | * @return mixed |
257 | 257 | */ |
258 | + |
|
259 | + /** |
|
260 | + * @param integer $min |
|
261 | + */ |
|
258 | 262 | public static function bornerValeur($val, $min, $max) |
259 | 263 | { |
260 | 264 | if ($val < $min) { |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | */ |
204 | 204 | public function setMin($min) |
205 | 205 | { |
206 | - $this->_min = (int)$min; |
|
206 | + $this->_min = (int) $min; |
|
207 | 207 | } |
208 | 208 | /*-----------------------------------------------------------------*/ |
209 | 209 | /** |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | */ |
222 | 222 | public function setMax($max) |
223 | 223 | { |
224 | - $this->_max = (int)$max; |
|
224 | + $this->_max = (int) $max; |
|
225 | 225 | } |
226 | 226 | |
227 | 227 | /*-----------------------------------------------------------------*/ |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | */ |
243 | 243 | public function setSmallIncrement($smallIncrement) |
244 | 244 | { |
245 | - $this->_smallIncrement = (int)$smallIncrement; |
|
245 | + $this->_smallIncrement = (int) $smallIncrement; |
|
246 | 246 | if ($this->_smallIncrement == 0) { |
247 | 247 | $this->_smallIncrement = 1; |
248 | 248 | } |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | */ |
265 | 265 | public function setLargeIncrement($largeIncrement) |
266 | 266 | { |
267 | - $this->_largeIncrement = (int)$largeIncrement; |
|
267 | + $this->_largeIncrement = (int) $largeIncrement; |
|
268 | 268 | if ($this->_largeIncrement == 0) { |
269 | 269 | $this->_largeIncrement = 10; |
270 | 270 | } |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | $sFolderImg = "{$sSpinFolder}/images/{$this->getImgFolder()}/"; |
406 | 406 | |
407 | 407 | $prefixe = $this->getName(); |
408 | - $prefixe2 = 'spin' . $prefixe; |
|
408 | + $prefixe2 = 'spin'.$prefixe; |
|
409 | 409 | |
410 | 410 | $smallIncrement = $this->getSmallIncrement(); |
411 | 411 | $largeIncrement = $this->getLargeIncrement(); |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | $t = array(); |
425 | 425 | |
426 | 426 | if ($this->_loadJS) { |
427 | - $js = $sSpinFolder . '/js/spin.js'; |
|
427 | + $js = $sSpinFolder.'/js/spin.js'; |
|
428 | 428 | $t[] = "<script src='{$js}' type='text/javascript'></script>"; |
429 | 429 | } |
430 | 430 | |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | //------------------------------------------------------- |
470 | 470 | |
471 | 471 | $t[] = ' </tr>'; |
472 | - $t[] = '</table>' . "\n"; |
|
472 | + $t[] = '</table>'."\n"; |
|
473 | 473 | $t[] = '</div>'; |
474 | 474 | //------------------------------------------- |
475 | 475 | $html = implode("\n", $t); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | /** |
179 | 179 | * Set the value. |
180 | 180 | * |
181 | - * @param $value int |
|
181 | + * @param integer $value int |
|
182 | 182 | */ |
183 | 183 | public function setValue($value) |
184 | 184 | { |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | /** |
198 | 198 | * Set the min value. |
199 | 199 | * |
200 | - * @param $min int |
|
200 | + * @param integer $min int |
|
201 | 201 | */ |
202 | 202 | public function setMin($min) |
203 | 203 | { |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | /** |
216 | 216 | * Set the max value - must be more great then min. |
217 | 217 | * |
218 | - * @param $max int |
|
218 | + * @param integer $max int |
|
219 | 219 | */ |
220 | 220 | public function setMax($max) |
221 | 221 | { |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | * Set the small increment when click a short time on up down nutton |
236 | 236 | * must be " > 0 ". |
237 | 237 | * |
238 | - * @param $smallIncrement |
|
238 | + * @param integer $smallIncrement |
|
239 | 239 | * |
240 | 240 | * @internal param int $value |
241 | 241 | */ |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | /** |
260 | 260 | * Set the large increment when click a long time on up down nutton. |
261 | 261 | * |
262 | - * @param $largeIncrement int |
|
262 | + * @param integer $largeIncrement int |
|
263 | 263 | */ |
264 | 264 | public function setLargeIncrement($largeIncrement) |
265 | 265 | { |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | * Set the size in nb car of the input text for the value |
283 | 283 | * must be 2 car min. |
284 | 284 | * |
285 | - * @param $size mixed |
|
285 | + * @param integer $size mixed |
|
286 | 286 | */ |
287 | 287 | public function setSize($size) |
288 | 288 | { |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | /** |
308 | 308 | * Set the shortname of the folder images. |
309 | 309 | * |
310 | - * @param $folder string |
|
310 | + * @param string $folder string |
|
311 | 311 | */ |
312 | 312 | public function setImgFolder($folder) |
313 | 313 | { |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | /** |
328 | 328 | * Set the label of unites between value and buttons. |
329 | 329 | * |
330 | - * @param $unite string |
|
330 | + * @param string $unite string |
|
331 | 331 | */ |
332 | 332 | public function setUnite($unite) |
333 | 333 | { |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | /** |
346 | 346 | * Set the style CSS of the text. |
347 | 347 | * |
348 | - * @param $style string |
|
348 | + * @param string $style string |
|
349 | 349 | */ |
350 | 350 | public function setStyleText($style) |
351 | 351 | { |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | /** |
366 | 366 | * Set the style CSS of the frame. |
367 | 367 | * |
368 | - * @param $style string |
|
368 | + * @param string $style string |
|
369 | 369 | */ |
370 | 370 | public function setStyleBordure($style) |
371 | 371 | { |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | /** |
386 | 386 | * Set MinMaxVisible : show the button to go min and max value. |
387 | 387 | * |
388 | - * @param $visible bool |
|
388 | + * @param boolean $visible bool |
|
389 | 389 | */ |
390 | 390 | public function setMinMaxVisible($visible) |
391 | 391 | { |
@@ -494,6 +494,11 @@ discard block |
||
494 | 494 | * @param string $default |
495 | 495 | * @return string |
496 | 496 | */ |
497 | + |
|
498 | + /** |
|
499 | + * @param string $attribut |
|
500 | + * @param string $value |
|
501 | + */ |
|
497 | 502 | public function htmlAddAttribut($attribut, $value, $default = '') |
498 | 503 | { |
499 | 504 | $r = ''; |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $eventHandler = xoops_getModuleHandler(_EXTCAL_CLS_EVENT, _EXTCAL_MODULE); |
22 | 22 | $event = $eventHandler->getEvent($itemId, 0, true); |
23 | 23 | $item['name'] = $event->getVar('event_title'); |
24 | - $item['url'] = XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'); |
|
24 | + $item['url'] = XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'); |
|
25 | 25 | |
26 | 26 | return $item; |
27 | 27 | } |
@@ -536,7 +536,7 @@ |
||
536 | 536 | |
537 | 537 | /** |
538 | 538 | * @param $objects |
539 | - * @param array $externalKeys |
|
539 | + * @param string[] $externalKeys |
|
540 | 540 | * @param string $format |
541 | 541 | * |
542 | 542 | * @return array |
@@ -100,10 +100,10 @@ discard block |
||
100 | 100 | if (is_array($this->keyName)) { |
101 | 101 | $criteria = new CriteriaCompo(); |
102 | 102 | for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) { |
103 | - $criteria->add(new Criteria($this->keyName[$i], (int)$id[$i])); |
|
103 | + $criteria->add(new Criteria($this->keyName[$i], (int) $id[$i])); |
|
104 | 104 | } |
105 | 105 | } else { |
106 | - $criteria = new Criteria($this->keyName, (int)$id); |
|
106 | + $criteria = new Criteria($this->keyName, (int) $id); |
|
107 | 107 | } |
108 | 108 | $criteria->setLimit(1); |
109 | 109 | $objectArray = $this->getObjects($criteria, false, true); |
@@ -127,11 +127,11 @@ discard block |
||
127 | 127 | { |
128 | 128 | $ret = array(); |
129 | 129 | $limit = $start = 0; |
130 | - $sql = 'SELECT * FROM ' . $this->table; |
|
130 | + $sql = 'SELECT * FROM '.$this->table; |
|
131 | 131 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
132 | - $sql .= ' ' . $criteria->renderWhere(); |
|
132 | + $sql .= ' '.$criteria->renderWhere(); |
|
133 | 133 | if ($criteria->getSort() != '') { |
134 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
134 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
135 | 135 | } |
136 | 136 | $limit = $criteria->getLimit(); |
137 | 137 | $start = $criteria->getStart(); |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $ret[] = $obj; |
167 | 167 | } else { |
168 | 168 | $row = array(); |
169 | - $vars =& $obj->getVars(); |
|
169 | + $vars = & $obj->getVars(); |
|
170 | 170 | foreach (array_keys($vars) as $i) { |
171 | 171 | $row[$i] = $obj->getVar($i); |
172 | 172 | } |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $ret[$myrow[$this->keyName]] = $obj; |
178 | 178 | } else { |
179 | 179 | $row = array(); |
180 | - $vars =& $obj->getVars(); |
|
180 | + $vars = & $obj->getVars(); |
|
181 | 181 | foreach (array_keys($vars) as $i) { |
182 | 182 | $row[$i] = $obj->getVar($i); |
183 | 183 | } |
@@ -210,15 +210,15 @@ discard block |
||
210 | 210 | $criteria->setSort($this->identifierName); |
211 | 211 | } |
212 | 212 | |
213 | - $sql = 'SELECT ' . $this->keyName; |
|
213 | + $sql = 'SELECT '.$this->keyName; |
|
214 | 214 | if (!empty($this->identifierName)) { |
215 | - $sql .= ', ' . $this->identifierName; |
|
215 | + $sql .= ', '.$this->identifierName; |
|
216 | 216 | } |
217 | - $sql .= ' FROM ' . $this->table; |
|
217 | + $sql .= ' FROM '.$this->table; |
|
218 | 218 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
219 | - $sql .= ' ' . $criteria->renderWhere(); |
|
219 | + $sql .= ' '.$criteria->renderWhere(); |
|
220 | 220 | if ($criteria->getSort() != '') { |
221 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
221 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
222 | 222 | } |
223 | 223 | $limit = $criteria->getLimit(); |
224 | 224 | $start = $criteria->getStart(); |
@@ -251,12 +251,12 @@ discard block |
||
251 | 251 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
252 | 252 | if ($criteria->groupby != '') { |
253 | 253 | $groupby = true; |
254 | - $field = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
254 | + $field = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
255 | 255 | } |
256 | 256 | } |
257 | - $sql = 'SELECT ' . $field . 'COUNT(*) FROM ' . $this->table; |
|
257 | + $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table; |
|
258 | 258 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
259 | - $sql .= ' ' . $criteria->renderWhere(); |
|
259 | + $sql .= ' '.$criteria->renderWhere(); |
|
260 | 260 | if ($criteria->groupby != '') { |
261 | 261 | $sql .= $criteria->getGroupby(); |
262 | 262 | } |
@@ -292,13 +292,13 @@ discard block |
||
292 | 292 | if (is_array($this->keyName)) { |
293 | 293 | $clause = array(); |
294 | 294 | for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) { |
295 | - $clause[] = $this->keyName[$i] . ' = ' . $id[$i]; |
|
295 | + $clause[] = $this->keyName[$i].' = '.$id[$i]; |
|
296 | 296 | } |
297 | 297 | $whereclause = implode(' AND ', $clause); |
298 | 298 | } else { |
299 | - $whereclause = $this->keyName . ' = ' . $id; |
|
299 | + $whereclause = $this->keyName.' = '.$id; |
|
300 | 300 | } |
301 | - $sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $whereclause; |
|
301 | + $sql = 'DELETE FROM '.$this->table.' WHERE '.$whereclause; |
|
302 | 302 | if (false !== $force) { |
303 | 303 | $result = $this->db->queryF($sql); |
304 | 304 | } else { |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | } |
330 | 330 | |
331 | 331 | if (!($obj instanceof $this->className && class_exists($this->className))) { |
332 | - $obj->setErrors(get_class($obj) . ' Differs from ' . $this->className); |
|
332 | + $obj->setErrors(get_class($obj).' Differs from '.$this->className); |
|
333 | 333 | |
334 | 334 | return false; |
335 | 335 | } |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | |
341 | 341 | foreach ($obj->cleanVars as $k => $v) { |
342 | 342 | if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) { |
343 | - $cleanvars[$k] = (int)$v; |
|
343 | + $cleanvars[$k] = (int) $v; |
|
344 | 344 | } elseif (is_array($v)) { |
345 | 345 | $cleanvars[$k] = $this->db->quoteString(implode(',', $v)); |
346 | 346 | } else { |
@@ -350,12 +350,12 @@ discard block |
||
350 | 350 | if ($obj->isNew()) { |
351 | 351 | if (!is_array($this->keyName)) { |
352 | 352 | if ($cleanvars[$this->keyName] < 1) { |
353 | - $cleanvars[$this->keyName] = $this->db->genId($this->table . '_' . $this->keyName . '_seq'); |
|
353 | + $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq'); |
|
354 | 354 | } |
355 | 355 | } |
356 | - $sql = 'INSERT INTO ' . $this->table . ' (' . implode(',', array_keys($cleanvars)) . ') VALUES (' . implode(',', array_values($cleanvars)) . ')'; |
|
356 | + $sql = 'INSERT INTO '.$this->table.' ('.implode(',', array_keys($cleanvars)).') VALUES ('.implode(',', array_values($cleanvars)).')'; |
|
357 | 357 | } else { |
358 | - $sql = 'UPDATE ' . $this->table . ' SET'; |
|
358 | + $sql = 'UPDATE '.$this->table.' SET'; |
|
359 | 359 | foreach ($cleanvars as $key => $value) { |
360 | 360 | if ((!is_array($this->keyName) && $key == $this->keyName) |
361 | 361 | || (is_array($this->keyName) |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | if (isset($notfirst)) { |
367 | 367 | $sql .= ','; |
368 | 368 | } |
369 | - $sql .= ' ' . $key . ' = ' . $value; |
|
369 | + $sql .= ' '.$key.' = '.$value; |
|
370 | 370 | $notfirst = true; |
371 | 371 | } |
372 | 372 | if (is_array($this->keyName)) { |
@@ -375,12 +375,12 @@ discard block |
||
375 | 375 | if ($i > 0) { |
376 | 376 | $whereclause .= ' AND '; |
377 | 377 | } |
378 | - $whereclause .= $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]); |
|
378 | + $whereclause .= $this->keyName[$i].' = '.$obj->getVar($this->keyName[$i]); |
|
379 | 379 | } |
380 | 380 | } else { |
381 | - $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName); |
|
381 | + $whereclause = $this->keyName.' = '.$obj->getVar($this->keyName); |
|
382 | 382 | } |
383 | - $sql .= ' WHERE ' . $whereclause; |
|
383 | + $sql .= ' WHERE '.$whereclause; |
|
384 | 384 | } |
385 | 385 | if (false !== $force) { |
386 | 386 | $result = $this->db->queryF($sql); |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | */ |
410 | 410 | public function updateAll($fieldname, $fieldvalue, CriteriaElement $criteria = null, $force = false) |
411 | 411 | { |
412 | - $setClause = $fieldname . ' = '; |
|
412 | + $setClause = $fieldname.' = '; |
|
413 | 413 | if (is_numeric($fieldvalue)) { |
414 | 414 | $setClause .= $fieldvalue; |
415 | 415 | } elseif (is_array($fieldvalue)) { |
@@ -417,9 +417,9 @@ discard block |
||
417 | 417 | } else { |
418 | 418 | $setClause .= $this->db->quoteString($fieldvalue); |
419 | 419 | } |
420 | - $sql = 'UPDATE ' . $this->table . ' SET ' . $setClause; |
|
420 | + $sql = 'UPDATE '.$this->table.' SET '.$setClause; |
|
421 | 421 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
422 | - $sql .= ' ' . $criteria->renderWhere(); |
|
422 | + $sql .= ' '.$criteria->renderWhere(); |
|
423 | 423 | } |
424 | 424 | if (false !== $force) { |
425 | 425 | $result = $this->db->queryF($sql); |
@@ -443,9 +443,9 @@ discard block |
||
443 | 443 | */ |
444 | 444 | public function updateFieldValue($fieldname, $fieldvalue, $criteria = null, $force = true) |
445 | 445 | { |
446 | - $sql = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldvalue; |
|
446 | + $sql = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldvalue; |
|
447 | 447 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
448 | - $sql .= ' ' . $criteria->renderWhere(); |
|
448 | + $sql .= ' '.$criteria->renderWhere(); |
|
449 | 449 | } |
450 | 450 | if (false !== $force) { |
451 | 451 | $result = $this->db->queryF($sql); |
@@ -472,8 +472,8 @@ discard block |
||
472 | 472 | public function deleteAll(CriteriaElement $criteria = null, $force = true, $asObject = false) |
473 | 473 | { |
474 | 474 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
475 | - $sql = 'DELETE FROM ' . $this->table; |
|
476 | - $sql .= ' ' . $criteria->renderWhere(); |
|
475 | + $sql = 'DELETE FROM '.$this->table; |
|
476 | + $sql .= ' '.$criteria->renderWhere(); |
|
477 | 477 | if (!$this->db->query($sql)) { |
478 | 478 | return false; |
479 | 479 | } |
@@ -607,8 +607,8 @@ discard block |
||
607 | 607 | */ |
608 | 608 | public function updateCounter($fieldname, $criteria, $op = '+') |
609 | 609 | { |
610 | - $sql = 'UPDATE ' . $this->table . ' SET ' . $fieldname . ' = ' . $fieldname . $op . '1'; |
|
611 | - $sql .= ' ' . $criteria->renderWhere(); |
|
610 | + $sql = 'UPDATE '.$this->table.' SET '.$fieldname.' = '.$fieldname.$op.'1'; |
|
611 | + $sql .= ' '.$criteria->renderWhere(); |
|
612 | 612 | $result = $this->db->queryF($sql); |
613 | 613 | if (!$result) { |
614 | 614 | return false; |
@@ -630,12 +630,12 @@ discard block |
||
630 | 630 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
631 | 631 | if ($criteria->groupby != '') { |
632 | 632 | $groupby = true; |
633 | - $field = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
633 | + $field = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
634 | 634 | } |
635 | 635 | } |
636 | - $sql = 'SELECT ' . $field . "SUM($sum) FROM " . $this->table; |
|
636 | + $sql = 'SELECT '.$field."SUM($sum) FROM ".$this->table; |
|
637 | 637 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
638 | - $sql .= ' ' . $criteria->renderWhere(); |
|
638 | + $sql .= ' '.$criteria->renderWhere(); |
|
639 | 639 | if ($criteria->groupby != '') { |
640 | 640 | $sql .= $criteria->getGroupby(); |
641 | 641 | } |
@@ -671,12 +671,12 @@ discard block |
||
671 | 671 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
672 | 672 | if ($criteria->groupby != '') { |
673 | 673 | $groupby = true; |
674 | - $field = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
674 | + $field = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
675 | 675 | } |
676 | 676 | } |
677 | - $sql = 'SELECT ' . $field . "MAX($max) FROM " . $this->table; |
|
677 | + $sql = 'SELECT '.$field."MAX($max) FROM ".$this->table; |
|
678 | 678 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
679 | - $sql .= ' ' . $criteria->renderWhere(); |
|
679 | + $sql .= ' '.$criteria->renderWhere(); |
|
680 | 680 | if ($criteria->groupby != '') { |
681 | 681 | $sql .= $criteria->getGroupby(); |
682 | 682 | } |
@@ -709,9 +709,9 @@ discard block |
||
709 | 709 | { |
710 | 710 | $field = ''; |
711 | 711 | |
712 | - $sql = 'SELECT ' . $field . "AVG($avg) FROM " . $this->table; |
|
712 | + $sql = 'SELECT '.$field."AVG($avg) FROM ".$this->table; |
|
713 | 713 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
714 | - $sql .= ' ' . $criteria->renderWhere(); |
|
714 | + $sql .= ' '.$criteria->renderWhere(); |
|
715 | 715 | } |
716 | 716 | $result = $this->db->query($sql); |
717 | 717 | if (!$result) { |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | /** |
137 | 137 | * Returns the date as an associative array (helper method). |
138 | 138 | * |
139 | - * @param mixed $stamp timestamp (leave empty for current timestamp) |
|
139 | + * @param integer $stamp timestamp (leave empty for current timestamp) |
|
140 | 140 | * |
141 | 141 | * @return array |
142 | 142 | */ |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | * |
243 | 243 | * @param array $sDates array containing Calendar objects to select (optional) |
244 | 244 | * |
245 | - * @return bool |
|
245 | + * @return boolean|null |
|
246 | 246 | * @abstract |
247 | 247 | */ |
248 | 248 | public function build($sDates = array()) |
@@ -346,7 +346,7 @@ |
||
346 | 346 | * |
347 | 347 | * @param int timestamp (depending on implementation) |
348 | 348 | * |
349 | - * @return bool |
|
349 | + * @return boolean|null |
|
350 | 350 | */ |
351 | 351 | public function isToday($stamp) |
352 | 352 | { |
@@ -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 | /**************************************************************************/ |