@@ -15,11 +15,11 @@ discard block |
||
15 | 15 | * L'utilisation de ce formulaire d'adminitration suppose |
16 | 16 | * que la classe correspondante de la table a été générées avec classGenerator |
17 | 17 | **/ |
18 | -include_once __DIR__ . '/../../../class/uploader.php'; |
|
19 | -require __DIR__ . '/../../../class/mail/phpmailer/class.phpmailer.php'; // First we require the PHPMailer libary in our script |
|
20 | -include_once __DIR__ . '/../class/utilities.php'; |
|
21 | -include_once __DIR__ . '/constantes.php'; |
|
22 | -include_once __DIR__ . '/../../../class/template.php'; |
|
18 | +include_once __DIR__.'/../../../class/uploader.php'; |
|
19 | +require __DIR__.'/../../../class/mail/phpmailer/class.phpmailer.php'; // First we require the PHPMailer libary in our script |
|
20 | +include_once __DIR__.'/../class/utilities.php'; |
|
21 | +include_once __DIR__.'/constantes.php'; |
|
22 | +include_once __DIR__.'/../../../class/template.php'; |
|
23 | 23 | |
24 | 24 | /******************************************************************** |
25 | 25 | * |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $action = ''; //a voir JJD |
134 | 134 | $message = sprintf($tplMessage, $acteur['name']); |
135 | 135 | //$subject .= ' (' . rand(1, 100) . ')'; |
136 | - $subject .= ' - ' . $acteur['name']; |
|
136 | + $subject .= ' - '.$acteur['name']; |
|
137 | 137 | //-------------------------------------------------------------- |
138 | 138 | //Chargement du template dans le dossier de langue |
139 | 139 | //$f = _EXTCAL_PATH_LG . $xoopsConfig['language'] . '\mail_inscription.html'; |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | if ($mode == _EXTCAL_HEADER_HTML) { |
175 | 175 | $template = 'extcal_mail_member_html.tpl'; |
176 | 176 | } |
177 | - $mail_body = $tpl->fetch('db:' . $template); |
|
177 | + $mail_body = $tpl->fetch('db:'.$template); |
|
178 | 178 | |
179 | 179 | extcal_SendMail($destinataires, $mail_fromName, $mail_fromemail, $mail_subject, $mail_body, $bEcho = false, $mode = 0, $sep = '|'); |
180 | 180 | |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | //----------------------------- |
227 | 227 | $myts = MyTextSanitizer::getInstance(); |
228 | 228 | //$xoopsMailer = getMailer(); |
229 | - $xoopsMailer =& xoops_getMailer(); |
|
229 | + $xoopsMailer = & xoops_getMailer(); |
|
230 | 230 | |
231 | 231 | //$xoopsMailer->setToUsers($destinataires[$i]); |
232 | 232 | |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | $header = array(); |
307 | 307 | $header[] = "From: {$emailSender}"; |
308 | 308 | $header[] = "Reply-To: {$emailSender}"; |
309 | - $header[] = 'X-Mailer: PHP/' . phpversion(); |
|
309 | + $header[] = 'X-Mailer: PHP/'.phpversion(); |
|
310 | 310 | |
311 | 311 | if ($mode == _EXTCAL_HEADER_HTML) { |
312 | 312 | $header[] = 'MIME-Version: 1.0'; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | function xoops_module_pre_install_extcal(XoopsModule $module) |
26 | 26 | { |
27 | 27 | $moduleDirName = basename(dirname(__DIR__)); |
28 | - $className = ucfirst($moduleDirName) . 'Utilities'; |
|
28 | + $className = ucfirst($moduleDirName).'Utilities'; |
|
29 | 29 | if (!class_exists($className)) { |
30 | 30 | xoops_load('utilities', $moduleDirName); |
31 | 31 | } |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | return false; |
40 | 40 | } |
41 | 41 | |
42 | - $mod_tables =& $module->getInfo('tables'); |
|
42 | + $mod_tables = & $module->getInfo('tables'); |
|
43 | 43 | foreach ($mod_tables as $table) { |
44 | - $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' . $GLOBALS['xoopsDB']->prefix($table) . ';'); |
|
44 | + $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS '.$GLOBALS['xoopsDB']->prefix($table).';'); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | return true; |
@@ -70,20 +70,20 @@ discard block |
||
70 | 70 | */ |
71 | 71 | |
72 | 72 | // Access right |
73 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
74 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 1, XOOPS_GROUP_USERS, $moduleId); |
|
75 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 1, XOOPS_GROUP_ANONYMOUS, $moduleId); |
|
73 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
74 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 1, XOOPS_GROUP_USERS, $moduleId); |
|
75 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 1, XOOPS_GROUP_ANONYMOUS, $moduleId); |
|
76 | 76 | |
77 | 77 | // Can submit |
78 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 2, XOOPS_GROUP_ADMIN, $moduleId); |
|
78 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 2, XOOPS_GROUP_ADMIN, $moduleId); |
|
79 | 79 | |
80 | 80 | // Auto approve |
81 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 4, XOOPS_GROUP_ADMIN, $moduleId); |
|
81 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 4, XOOPS_GROUP_ADMIN, $moduleId); |
|
82 | 82 | |
83 | 83 | // $moduleDirName = $xoopsModule->getVar('dirname'); |
84 | - $configurator = include $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/include/config.php'); |
|
84 | + $configurator = include $GLOBALS['xoops']->path('modules/'.$moduleDirName.'/include/config.php'); |
|
85 | 85 | |
86 | - $classUtilities = ucfirst($moduleDirName) . 'Utilities'; |
|
86 | + $classUtilities = ucfirst($moduleDirName).'Utilities'; |
|
87 | 87 | if (!class_exists($classUtilities)) { |
88 | 88 | xoops_load('utilities', $moduleDirName); |
89 | 89 | } |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | } |
96 | 96 | } |
97 | 97 | if (count($configurator['copyFiles']) > 0) { |
98 | - $file = __DIR__ . '/../assets/images/blank.png'; |
|
98 | + $file = __DIR__.'/../assets/images/blank.png'; |
|
99 | 99 | foreach (array_keys($configurator['copyFiles']) as $i) { |
100 | - $dest = $configurator['copyFiles'][$i] . '/blank.png'; |
|
100 | + $dest = $configurator['copyFiles'][$i].'/blank.png'; |
|
101 | 101 | $classUtilities::copyFile($file, $dest); |
102 | 102 | } |
103 | 103 | } |
@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | // defined('XOOPS_ROOT_PATH') || die('XOOPS Root Path not defined'); |
4 | -include_once __DIR__ . '/include/constantes.php'; |
|
5 | -include_once __DIR__ . '/include/agenda_fnc.php'; |
|
6 | -include_once __DIR__ . '/class/config.php'; |
|
4 | +include_once __DIR__.'/include/constantes.php'; |
|
5 | +include_once __DIR__.'/include/agenda_fnc.php'; |
|
6 | +include_once __DIR__.'/class/config.php'; |
|
7 | 7 | //$loc_de = setlocale (LC_ALL, 'french'); |
8 | 8 | |
9 | 9 | //echo "local :" . setlocale(LC_TIME, $xoopsConfig['language'])."</ br>"; |
@@ -78,12 +78,12 @@ discard block |
||
78 | 78 | |
79 | 79 | // Tables created by sql file (without prefix!) |
80 | 80 | $modversion['tables'] = array( |
81 | - $moduleDirName . '_' . 'cat', |
|
82 | - $moduleDirName . '_' . 'event', |
|
83 | - $moduleDirName . '_' . 'eventmember', |
|
84 | - $moduleDirName . '_' . 'eventnotmember', |
|
85 | - $moduleDirName . '_' . 'file', |
|
86 | - $moduleDirName . '_' . 'etablissement' |
|
81 | + $moduleDirName.'_'.'cat', |
|
82 | + $moduleDirName.'_'.'event', |
|
83 | + $moduleDirName.'_'.'eventmember', |
|
84 | + $moduleDirName.'_'.'eventnotmember', |
|
85 | + $moduleDirName.'_'.'file', |
|
86 | + $moduleDirName.'_'.'etablissement' |
|
87 | 87 | ); |
88 | 88 | |
89 | 89 | // SQL |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | $modversion['config'][$i]['default'] = 5; |
497 | 497 | |
498 | 498 | ++$i; |
499 | -$modversion['config'][$i]['name'] = 'break' . $i; |
|
499 | +$modversion['config'][$i]['name'] = 'break'.$i; |
|
500 | 500 | $modversion['config'][$i]['title'] = '_MI_EXTCAL_SHOW_OTHEROPTIONS'; |
501 | 501 | $modversion['config'][$i]['description'] = ''; |
502 | 502 | $modversion['config'][$i]['formtype'] = 'line_break'; |
@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | global $extcalConfig, $xoopsUser; |
4 | -include_once __DIR__ . '/../include/constantes.php'; |
|
5 | -include_once __DIR__ . '/../class/utilities.php'; |
|
6 | -include_once __DIR__ . '/../class/tableForm.php'; |
|
4 | +include_once __DIR__.'/../include/constantes.php'; |
|
5 | +include_once __DIR__.'/../class/utilities.php'; |
|
6 | +include_once __DIR__.'/../class/tableForm.php'; |
|
7 | 7 | //--------------------------------------------------------------------------- |
8 | 8 | /** |
9 | 9 | * @param $options |
@@ -16,11 +16,11 @@ discard block |
||
16 | 16 | |
17 | 17 | extcal_getDefautminicalOption($options); |
18 | 18 | |
19 | - include_once __DIR__ . '/../class/config.php'; |
|
19 | + include_once __DIR__.'/../class/config.php'; |
|
20 | 20 | |
21 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Util/Textual.php'; |
|
22 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Month/Weeks.php'; |
|
23 | - require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Day.php'; |
|
21 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Util/Textual.php'; |
|
22 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Month/Weeks.php'; |
|
23 | + require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Day.php'; |
|
24 | 24 | // require_once CALENDAR_ROOT . 'Month/Weeks.php'; |
25 | 25 | // require_once CALENDAR_ROOT . 'Day.php'; |
26 | 26 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | 'cat' => $tCatSelected, |
107 | 107 | 'externalKeys' => 'cat_id', |
108 | 108 | ); |
109 | - $events = $eventHandler->getEventsOnPeriode($criteres); |
|
109 | + $events = $eventHandler->getEventsOnPeriode($criteres); |
|
110 | 110 | } else { |
111 | 111 | $events = array(); |
112 | 112 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | 'number' => $dayCalObj->thisDay(), |
169 | 169 | 'isSelected' => $dayCalObj->isSelected(), |
170 | 170 | ); |
171 | - $day = $dayCalObj->thisDay(); |
|
171 | + $day = $dayCalObj->thisDay(); |
|
172 | 172 | if (isset($eventsArray[$day]) && !$dayCalObj->isEmpty()) { |
173 | 173 | $tableRows[$rowId]['week'][$cellId]['haveEvents'] = true; |
174 | 174 | $tableRows[$rowId]['week'][$cellId]['color'] = $eventsArray[$day]['color']; |
@@ -198,15 +198,15 @@ discard block |
||
198 | 198 | // Making navig data |
199 | 199 | $navig = array( |
200 | 200 | 'page' => $extcalConfig['start_page'], |
201 | - 'uri' => 'year=' . $monthCalObj->thisYear() . '&month=' . $monthCalObj->thisMonth(), |
|
201 | + 'uri' => 'year='.$monthCalObj->thisYear().'&month='.$monthCalObj->thisMonth(), |
|
202 | 202 | 'name' => $extcalTimeHandler->getFormatedDate($extcalConfig['nav_date_month'], $monthCalObj->getTimestamp()), |
203 | 203 | ); |
204 | 204 | |
205 | 205 | $horloge = array(); |
206 | 206 | $horloge['display'] = (trim($options[11]) != ''); |
207 | - $horloge['fullName'] = XOOPS_URL . _EXTCAL_PATH_HORLOGES . $options[11]; |
|
208 | - $horloge['width'] = $options[12] . 'px'; |
|
209 | - $horloge['height'] = $options[13] . 'px'; |
|
207 | + $horloge['fullName'] = XOOPS_URL._EXTCAL_PATH_HORLOGES.$options[11]; |
|
208 | + $horloge['width'] = $options[12].'px'; |
|
209 | + $horloge['height'] = $options[13].'px'; |
|
210 | 210 | |
211 | 211 | $ret = array( |
212 | 212 | 'imageParam' => $imageParam, |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | */ |
233 | 233 | function bExtcalMinicalEdit($options) |
234 | 234 | { |
235 | - include_once __DIR__ . '/../class/form/spin/formspin.php'; |
|
235 | + include_once __DIR__.'/../class/form/spin/formspin.php'; |
|
236 | 236 | global $xoopsUser; |
237 | 237 | |
238 | 238 | // $t = print_r(get_defined_vars(),true); |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | $imageCatHandler = xoops_getHandler('imagecategory'); |
254 | 254 | |
255 | 255 | //===================================================================== |
256 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_OPT_SLIDE_SHOW . '</div>', 'head'); |
|
256 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_OPT_SLIDE_SHOW.'</div>', 'head'); |
|
257 | 257 | |
258 | 258 | $k = 0; |
259 | 259 | $xfValue[$k] = new XoopsFormRadio(_MB_EXTCAL_DISPLAY_IMG, "options[{$k}]", $options[$k]); |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | $xfValue[$k] = new ExtcalFormSpin(_MB_EXTCAL_SS_NB_PHOTOS, "options[{$k}]", $options[$k], 0, 50, 1, 0, 8, _MB_EXTCAL_PX, $imgFolder = ''); |
295 | 295 | $form->addElement($xfValue[$k], false); |
296 | 296 | //===================================================================== |
297 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_OPT_SHOW . '</div>', 'head'); |
|
297 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_OPT_SHOW.'</div>', 'head'); |
|
298 | 298 | |
299 | 299 | $t = array( |
300 | 300 | -1 => _MB_EXTCAL_PREVIEW, |
@@ -333,9 +333,9 @@ discard block |
||
333 | 333 | $form->addElement($xfValue[$k], false); |
334 | 334 | |
335 | 335 | //===================================================================== |
336 | - $form->insertBreak('<div style="text-align: center;font-weight: bold;">' . _MB_EXTCAL_HORLOGE_OPT . '</div>', 'head'); |
|
336 | + $form->insertBreak('<div style="text-align: center;font-weight: bold;">'._MB_EXTCAL_HORLOGE_OPT.'</div>', 'head'); |
|
337 | 337 | //--------------------------------------------------------------------- |
338 | - $t = XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH . _EXTCAL_PATH_HORLOGES); |
|
338 | + $t = XoopsLists::getFileListAsArray(XOOPS_ROOT_PATH._EXTCAL_PATH_HORLOGES); |
|
339 | 339 | $t = array_merge(array(' ' => _NONE), $t); |
340 | 340 | |
341 | 341 | $k = 11; |
@@ -418,12 +418,12 @@ discard block |
||
418 | 418 | // $src = $doc->createElement('src'); |
419 | 419 | $src = clone $tempSrc; |
420 | 420 | $src = $photo->appendChild($src); |
421 | - $value = $doc->createTextNode(XOOPS_URL . '/uploads/' . $images->getVar('image_name')); |
|
421 | + $value = $doc->createTextNode(XOOPS_URL.'/uploads/'.$images->getVar('image_name')); |
|
422 | 422 | $src->appendChild($value); |
423 | 423 | } |
424 | 424 | |
425 | 425 | // get completed xml document |
426 | - $xml_string = $doc->save(XOOPS_ROOT_PATH . '/cache/extcalSlideShowParam.xml'); |
|
426 | + $xml_string = $doc->save(XOOPS_ROOT_PATH.'/cache/extcalSlideShowParam.xml'); |
|
427 | 427 | } |
428 | 428 | |
429 | 429 | /**************************************************************************/ |
@@ -30,17 +30,17 @@ |
||
30 | 30 | global $xoopsDB; |
31 | 31 | |
32 | 32 | // Create eXtcal upload directory if don't exist |
33 | - $dir = XOOPS_ROOT_PATH . '/uploads/extcal'; |
|
33 | + $dir = XOOPS_ROOT_PATH.'/uploads/extcal'; |
|
34 | 34 | if (!is_dir($dir)) { |
35 | 35 | mkdir($dir); |
36 | 36 | |
37 | 37 | // Copy index.html files on uploads folders |
38 | - $indexFile = __DIR__ . '/index.html'; |
|
39 | - copy($indexFile, XOOPS_ROOT_PATH . '/uploads/extcal/index.html'); |
|
38 | + $indexFile = __DIR__.'/index.html'; |
|
39 | + copy($indexFile, XOOPS_ROOT_PATH.'/uploads/extcal/index.html'); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | // Create who's not going table to fix bug. If the table exist, the query will faile |
43 | - $sql = 'CREATE TABLE `' . $xoopsDB->prefix('extcal_eventnotmember') |
|
43 | + $sql = 'CREATE TABLE `'.$xoopsDB->prefix('extcal_eventnotmember') |
|
44 | 44 | . "` (`eventnotmember_id` int(11) NOT NULL auto_increment,`event_id` int(11) NOT NULL default '0',`uid` int(11) NOT NULL default '0',PRIMARY KEY (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;"; |
45 | 45 | $xoopsDB->query($sql); |
46 | 46 | } |
@@ -32,26 +32,26 @@ |
||
32 | 32 | //$xoopsDB = Database::getInstance(); |
33 | 33 | $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection(); |
34 | 34 | |
35 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . "` CHANGE `event_approved` `event_approved` TINYINT( 1 ) NOT NULL DEFAULT '0' ;"; |
|
35 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event')."` CHANGE `event_approved` `event_approved` TINYINT( 1 ) NOT NULL DEFAULT '0' ;"; |
|
36 | 36 | $xoopsDB->query($sql); |
37 | 37 | |
38 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_isrecur` TINYINT( 1 ) NOT NULL AFTER `event_nbmember` ;'; |
|
38 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_isrecur` TINYINT( 1 ) NOT NULL AFTER `event_nbmember` ;'; |
|
39 | 39 | $xoopsDB->query($sql); |
40 | 40 | |
41 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_rules` VARCHAR( 255 ) NOT NULL AFTER `event_isrecur` '; |
|
41 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_rules` VARCHAR( 255 ) NOT NULL AFTER `event_isrecur` '; |
|
42 | 42 | $xoopsDB->query($sql); |
43 | 43 | |
44 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_start` INT( 11 ) NOT NULL AFTER `event_recur_rules` ;'; |
|
44 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_start` INT( 11 ) NOT NULL AFTER `event_recur_rules` ;'; |
|
45 | 45 | $xoopsDB->query($sql); |
46 | 46 | |
47 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('extcal_event') . '` ADD `event_recur_end` INT( 11 ) NOT NULL AFTER `event_recur_start` ;'; |
|
47 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('extcal_event').'` ADD `event_recur_end` INT( 11 ) NOT NULL AFTER `event_recur_start` ;'; |
|
48 | 48 | $xoopsDB->query($sql); |
49 | 49 | |
50 | - $sql = 'CREATE TABLE `' . $xoopsDB->prefix('extcal_event') |
|
50 | + $sql = 'CREATE TABLE `'.$xoopsDB->prefix('extcal_event') |
|
51 | 51 | . "` (`eventnotmember_id` int(11) NOT NULL auto_increment,`event_id` int(11) NOT NULL default '0',`uid` int(11) NOT NULL default '0',PRIMARY KEY (`eventnotmember_id`),UNIQUE KEY `eventnotmember` (`event_id`,`uid`)) COMMENT='eXtcal By Zoullou' ;"; |
52 | 52 | $xoopsDB->query($sql); |
53 | 53 | |
54 | - $sql = 'CREATE TABLE `' . $xoopsDB->prefix('extcal_file') |
|
54 | + $sql = 'CREATE TABLE `'.$xoopsDB->prefix('extcal_file') |
|
55 | 55 | . "` (`file_id` int(11) NOT NULL auto_increment,`file_name` varchar(255) NOT NULL,`file_nicename` varchar(255) NOT NULL,`file_mimetype` varchar(255) NOT NULL,`file_size` int(11) NOT NULL,`file_download` int(11) NOT NULL,`file_date` int(11) NOT NULL,`file_approved` tinyint(1) NOT NULL,`event_id` int(11) NOT NULL,`uid` int(11) NOT NULL,PRIMARY KEY (`file_id`)) COMMENT='eXtcal By Zoullou' ;"; |
56 | 56 | $xoopsDB->query($sql); |
57 | 57 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * L'utilisation de ce formulaire d'adminitration suppose |
16 | 16 | * que la classe correspondante de la table a été générées avec classGenerator |
17 | 17 | **/ |
18 | -include_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
18 | +include_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Class ExtcalUtilities. |
@@ -48,12 +48,12 @@ discard block |
||
48 | 48 | public static function extcal_loadImg(&$REQUEST, &$event_picture1, &$event_picture2) |
49 | 49 | { |
50 | 50 | /////////////////////////////////////////////////////////////////////////////// |
51 | - $uploaddir_event = XOOPS_ROOT_PATH . '/uploads/extcal/'; |
|
52 | - $uploadurl_event = XOOPS_URL . '/uploads/extcal/'; |
|
51 | + $uploaddir_event = XOOPS_ROOT_PATH.'/uploads/extcal/'; |
|
52 | + $uploadurl_event = XOOPS_URL.'/uploads/extcal/'; |
|
53 | 53 | //$picture = ''; |
54 | 54 | for ($j = 1; $j < 3; ++$j) { |
55 | - $delimg = @$REQUEST['delimg_' . $j . '']; |
|
56 | - $delimg = isset($delimg) ? (int)$delimg : 0; |
|
55 | + $delimg = @$REQUEST['delimg_'.$j.'']; |
|
56 | + $delimg = isset($delimg) ? (int) $delimg : 0; |
|
57 | 57 | if (0 == $delimg && !empty($REQUEST['xoops_upload_file'][$j])) { |
58 | 58 | $upload = new XoopsMediaUploader($uploaddir_event, array( |
59 | 59 | 'image/gif', |
@@ -76,15 +76,15 @@ discard block |
||
76 | 76 | $event_picture2 = $upload->getSavedFileName(); |
77 | 77 | } |
78 | 78 | } |
79 | - } elseif (!empty($REQUEST['file' . $j])) { |
|
79 | + } elseif (!empty($REQUEST['file'.$j])) { |
|
80 | 80 | if ($j == 1) { |
81 | - $event_picture1 = $REQUEST['file' . $j]; |
|
81 | + $event_picture1 = $REQUEST['file'.$j]; |
|
82 | 82 | } elseif ($j == 2) { |
83 | - $event_picture2 = $REQUEST['file' . $j]; |
|
83 | + $event_picture2 = $REQUEST['file'.$j]; |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | } else { |
87 | - $url_event = XOOPS_ROOT_PATH . '/uploads/extcal/' . $REQUEST['file' . $j]; |
|
87 | + $url_event = XOOPS_ROOT_PATH.'/uploads/extcal/'.$REQUEST['file'.$j]; |
|
88 | 88 | if ($j == 1) { |
89 | 89 | $event_picture1 = ''; |
90 | 90 | } elseif ($j == 2) { |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | $name = $catList->getVar('cat_name'); |
150 | 150 | $cat_color = $catList->getVar('cat_color'); |
151 | 151 | $checked = in_array($cat_id, $cat) ? 'checked' : ''; |
152 | - $cat = '' . "<div style='float:left; margin-left:5px;'>" . "<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>" |
|
153 | - . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>" . " {$name}" . '</div>'; |
|
152 | + $cat = ''."<div style='float:left; margin-left:5px;'>"."<input type='checkbox' name='{$name}[{$cat_id}]' value='1' {$checked}>" |
|
153 | + . "<div style='absolute:left;height:12px; width:6px; background-color:#{$cat_color}; border:1px solid black; float:left; margin-right:5px;' ></div>"." {$name}".'</div>'; |
|
154 | 154 | |
155 | 155 | $t[] = $cat; |
156 | 156 | } |
@@ -176,17 +176,17 @@ discard block |
||
176 | 176 | $select->addOption('', ''); |
177 | 177 | } |
178 | 178 | |
179 | - $select->addOption('year ASC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
180 | - $select->addOption('year DESC', _MD_EXTCAL_YEAR . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
179 | + $select->addOption('year ASC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
180 | + $select->addOption('year DESC', _MD_EXTCAL_YEAR.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
181 | 181 | |
182 | - $select->addOption('month ASC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
183 | - $select->addOption('month DESC', _MD_EXTCAL_MONTH . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
182 | + $select->addOption('month ASC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
183 | + $select->addOption('month DESC', _MD_EXTCAL_MONTH.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
184 | 184 | |
185 | - $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
186 | - $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
185 | + $select->addOption('event_title ASC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
186 | + $select->addOption('event_title DESC', _MD_EXTCAL_ALPHA.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
187 | 187 | |
188 | - $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_ASC); |
|
189 | - $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY . ' ' . _MD_EXTCAL_ORDER_BY_DESC); |
|
188 | + $select->addOption('cat_name ASC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_ASC); |
|
189 | + $select->addOption('cat_name DESC', _MD_EXTCAL_CATEGORY.' '._MD_EXTCAL_ORDER_BY_DESC); |
|
190 | 190 | |
191 | 191 | return $select; |
192 | 192 | } |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | public static function echoDateArray($period) |
301 | 301 | { |
302 | 302 | foreach ($period as $dt) { |
303 | - echo $dt->format("l Y-m-d H:i:s\n") . '<br>'; |
|
303 | + echo $dt->format("l Y-m-d H:i:s\n").'<br>'; |
|
304 | 304 | } |
305 | 305 | } |
306 | 306 | |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | } |
317 | 317 | |
318 | 318 | $txt = print_r($t, true); |
319 | - echo '<pre>Number of items: ' . count($t) . "<br>{$txt}</pre>"; |
|
319 | + echo '<pre>Number of items: '.count($t)."<br>{$txt}</pre>"; |
|
320 | 320 | } |
321 | 321 | |
322 | 322 | /*****************************************************************/ |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | if ($msg != '') { |
330 | 330 | echo "<hr>{$msg}<hr>"; |
331 | 331 | } |
332 | - echo $line . '<br>'; |
|
332 | + echo $line.'<br>'; |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | /*****************************************************************/ |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | echo "<hr>{$msg}<hr>"; |
357 | 357 | } |
358 | 358 | |
359 | - echo 'date --->' . $tsName . ' = ' . $ts . ' - ' . date('d-m-Y H:m:s', $ts) . '<br>'; |
|
359 | + echo 'date --->'.$tsName.' = '.$ts.' - '.date('d-m-Y H:m:s', $ts).'<br>'; |
|
360 | 360 | } |
361 | 361 | |
362 | 362 | /*****************************************************************/ |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | */ |
471 | 471 | public static function getLighterColor($color, $plancher, $plafond) |
472 | 472 | { |
473 | - include_once __DIR__ . '/colorTools.php'; |
|
473 | + include_once __DIR__.'/colorTools.php'; |
|
474 | 474 | |
475 | 475 | //$ct = new ColorTools(); |
476 | 476 | //return $ct->eclaircir($color,$plancher,$plafond); |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | if (!mkdir($folder) && !is_dir($folder)) { |
493 | 493 | throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder)); |
494 | 494 | } else { |
495 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
495 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
496 | 496 | } |
497 | 497 | } |
498 | 498 | } catch (Exception $e) { |
@@ -530,10 +530,10 @@ discard block |
||
530 | 530 | // @mkdir($dst); |
531 | 531 | while (false !== ($file = readdir($dir))) { |
532 | 532 | if (($file !== '.') && ($file !== '..')) { |
533 | - if (is_dir($src . '/' . $file)) { |
|
534 | - self::recurseCopy($src . '/' . $file, $dst . '/' . $file); |
|
533 | + if (is_dir($src.'/'.$file)) { |
|
534 | + self::recurseCopy($src.'/'.$file, $dst.'/'.$file); |
|
535 | 535 | } else { |
536 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
536 | + copy($src.'/'.$file, $dst.'/'.$file); |
|
537 | 537 | } |
538 | 538 | } |
539 | 539 | } |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | //check for minimum XOOPS version |
555 | 555 | $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string |
556 | 556 | $currArray = explode('.', $currentVer); |
557 | - $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string |
|
557 | + $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string |
|
558 | 558 | $reqArray = explode('.', $requiredVer); |
559 | 559 | $success = true; |
560 | 560 | foreach ($reqArray as $k => $v) { |
@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | break; |
569 | 569 | } |
570 | 570 | } else { |
571 | - if ((int)$v > 0) { // handles things like x.x.x.0_RC2 |
|
571 | + if ((int) $v > 0) { // handles things like x.x.x.0_RC2 |
|
572 | 572 | $success = false; |
573 | 573 | break; |
574 | 574 | } |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | // check for minimum PHP version |
597 | 597 | $success = true; |
598 | 598 | $verNum = phpversion(); |
599 | - $reqVer =& $module->getInfo('min_php'); |
|
599 | + $reqVer = & $module->getInfo('min_php'); |
|
600 | 600 | if (false !== $reqVer && '' !== $reqVer) { |
601 | 601 | if (version_compare($verNum, $reqVer, '<')) { |
602 | 602 | $module->setErrors(sprintf(_AM_TAG_ERROR_BAD_PHP, $reqVer, $verNum)); |
@@ -2,13 +2,13 @@ discard block |
||
2 | 2 | |
3 | 3 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
4 | 4 | |
5 | -include_once __DIR__ . '/ExtcalPersistableObjectHandler.php'; |
|
6 | -include_once __DIR__ . '/perm.php'; |
|
7 | -include_once __DIR__ . '/time.php'; |
|
8 | -include_once __DIR__ . '/config.php'; |
|
9 | -include_once __DIR__ . '/extDateTime.php'; |
|
10 | -include_once __DIR__ . '/utilities.php'; |
|
11 | -include_once __DIR__ . '/../include/constantes.php'; |
|
5 | +include_once __DIR__.'/ExtcalPersistableObjectHandler.php'; |
|
6 | +include_once __DIR__.'/perm.php'; |
|
7 | +include_once __DIR__.'/time.php'; |
|
8 | +include_once __DIR__.'/config.php'; |
|
9 | +include_once __DIR__.'/extDateTime.php'; |
|
10 | +include_once __DIR__.'/utilities.php'; |
|
11 | +include_once __DIR__.'/../include/constantes.php'; |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * Class ExtcalEvent. |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $this->initVar('event_etablissement', XOBJ_DTYPE_INT, 5, false); |
50 | 50 | $this->initVar('event_icone', XOBJ_DTYPE_TXTBOX, '', false); |
51 | 51 | |
52 | - $this->externalKey['cat_id'] = array( |
|
52 | + $this->externalKey['cat_id'] = array( |
|
53 | 53 | 'className' => 'cat', |
54 | 54 | 'getMethodeName' => 'getCat', |
55 | 55 | 'keyName' => 'cat', |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | $eventArray = array(); |
383 | 383 | |
384 | 384 | while (list($k, $v) = each($events)) { |
385 | - $ordre[] = (int)$v['event_start']; |
|
385 | + $ordre[] = (int) $v['event_start']; |
|
386 | 386 | $this->formatEventDate($v, $extcalConfig['event_date_week']); |
387 | 387 | //$v['cat']['cat_light_color'] = $v['cat']['cat_color']; |
388 | 388 | $v['cat']['cat_light_color'] = ExtcalUtilities::getLighterColor($v['cat']['cat_color'], _EXTCAL_INFOBULLE_RGB_MIN, _EXTCAL_INFOBULLE_RGB_MAX); |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | |
584 | 584 | reset($period); |
585 | 585 | foreach ($period as $dt) { |
586 | - echo $dt->format("l d-m-Y H:i:s\n") . '<br>'; |
|
586 | + echo $dt->format("l d-m-Y H:i:s\n").'<br>'; |
|
587 | 587 | } |
588 | 588 | } |
589 | 589 | |
@@ -909,10 +909,10 @@ discard block |
||
909 | 909 | $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
910 | 910 | $count = count($authorizedAccessCats); |
911 | 911 | if ($count > 0) { |
912 | - $in = '(' . $authorizedAccessCats[0]; |
|
912 | + $in = '('.$authorizedAccessCats[0]; |
|
913 | 913 | array_shift($authorizedAccessCats); |
914 | 914 | foreach ($authorizedAccessCats as $authorizedAccessCat) { |
915 | - $in .= ',' . $authorizedAccessCat; |
|
915 | + $in .= ','.$authorizedAccessCat; |
|
916 | 916 | } |
917 | 917 | $in .= ')'; |
918 | 918 | $criteria->add(new Criteria('cat_id', $in, 'IN')); |
@@ -932,10 +932,10 @@ discard block |
||
932 | 932 | } |
933 | 933 | if (is_array($cats)) { |
934 | 934 | if (array_search(0, $cats) === false) { |
935 | - $in = '(' . current($cats); |
|
935 | + $in = '('.current($cats); |
|
936 | 936 | array_shift($cats); |
937 | 937 | foreach ($cats as $cat) { |
938 | - $in .= ',' . $cat; |
|
938 | + $in .= ','.$cat; |
|
939 | 939 | } |
940 | 940 | $in .= ')'; |
941 | 941 | $criteria->add(new Criteria('cat_id', $in, 'IN')); |
@@ -958,7 +958,7 @@ discard block |
||
958 | 958 | $fileHandler = xoops_getModuleHandler(_EXTCAL_CLS_FILE, _EXTCAL_MODULE); |
959 | 959 | |
960 | 960 | /***************************************************/ |
961 | - include_once __DIR__ . '/etablissement.php'; |
|
961 | + include_once __DIR__.'/etablissement.php'; |
|
962 | 962 | if ($siteSide === 'admin') { |
963 | 963 | $action = 'event.php?op=enreg'; |
964 | 964 | $cats = $catHandler->getAllCat($GLOBALS['xoopsUser'], 'all'); |
@@ -976,7 +976,7 @@ discard block |
||
976 | 976 | if ($mode === 'clone') { |
977 | 977 | $data['event_id'] = 0; |
978 | 978 | $event->setVar('event_id', 0); |
979 | - $newTitle = $event->getVar('event_title') . ' (' . _AM_EXTCAL_CLONE_OF . $data['event_id'] . ')'; |
|
979 | + $newTitle = $event->getVar('event_title').' ('._AM_EXTCAL_CLONE_OF.$data['event_id'].')'; |
|
980 | 980 | $event->setVar('event_title', $newTitle); |
981 | 981 | } |
982 | 982 | |
@@ -1160,7 +1160,7 @@ discard block |
||
1160 | 1160 | $form->addElement($catSelect, true); |
1161 | 1161 | //----------------------------------------------------------- |
1162 | 1162 | |
1163 | - $file_path = __DIR__ . '/../assets/css/images'; |
|
1163 | + $file_path = __DIR__.'/../assets/css/images'; |
|
1164 | 1164 | $tf = XoopsLists::getImgListAsArray($file_path); |
1165 | 1165 | array_unshift($tf, _MD_EXTCAL_NONE); |
1166 | 1166 | $xfIcones = new XoopsFormSelect(_MD_EXTCAL_ICONE, 'event_icone', $event_icone, ''); |
@@ -1265,7 +1265,7 @@ discard block |
||
1265 | 1265 | if (count($files) > 0) { |
1266 | 1266 | $eventFiles = new ExtcalFormFileCheckBox('', 'filetokeep'); |
1267 | 1267 | foreach ($files as $file) { |
1268 | - $name = $file['file_nicename'] . ' (<i>' . $file['file_mimetype'] . '</i>) ' . $file['formated_file_size']; |
|
1268 | + $name = $file['file_nicename'].' (<i>'.$file['file_mimetype'].'</i>) '.$file['formated_file_size']; |
|
1269 | 1269 | $eventFiles->addOption($file['file_id'], $name); |
1270 | 1270 | } |
1271 | 1271 | $fileElmtTray->addElement($eventFiles); |
@@ -1281,7 +1281,7 @@ discard block |
||
1281 | 1281 | //Picture1 |
1282 | 1282 | $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 1), ''); |
1283 | 1283 | if (!empty($event_picture1)) { |
1284 | - $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture1 . "' name='image' id='image' alt=''/><br><br>")); |
|
1284 | + $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture1."' name='image' id='image' alt=''/><br><br>")); |
|
1285 | 1285 | $check_del_img = new XoopsFormCheckBox('', 'delimg_1'); |
1286 | 1286 | $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG); |
1287 | 1287 | $file_tray->addElement($check_del_img); |
@@ -1292,8 +1292,8 @@ discard block |
||
1292 | 1292 | } |
1293 | 1293 | $file_img->setExtra("size ='40'"); |
1294 | 1294 | $file_tray->addElement($file_img); |
1295 | - $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500); |
|
1296 | - $file_label = new XoopsFormLabel('', '<br>' . $msg); |
|
1295 | + $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500); |
|
1296 | + $file_label = new XoopsFormLabel('', '<br>'.$msg); |
|
1297 | 1297 | $file_tray->addElement($file_label); |
1298 | 1298 | $form->addElement($file_tray); |
1299 | 1299 | $form->addElement(new XoopsFormHidden('file1', $event_picture1)); |
@@ -1301,7 +1301,7 @@ discard block |
||
1301 | 1301 | //Picture2 |
1302 | 1302 | $file_tray = new XoopsFormElementTray(sprintf(_MD_EXTCAL_FORM_IMG, 2), ''); |
1303 | 1303 | if (!empty($event_picture2)) { |
1304 | - $file_tray->addElement(new XoopsFormLabel('', "<img src='" . XOOPS_URL . '/uploads/extcal/' . $event_picture2 . "' name='image' id='image' alt=''/><br><br>")); |
|
1304 | + $file_tray->addElement(new XoopsFormLabel('', "<img src='".XOOPS_URL.'/uploads/extcal/'.$event_picture2."' name='image' id='image' alt=''/><br><br>")); |
|
1305 | 1305 | $check_del_img = new XoopsFormCheckBox('', 'delimg_2'); |
1306 | 1306 | $check_del_img->addOption(1, _MD_EXTCAL_DEL_IMG); |
1307 | 1307 | $file_tray->addElement($check_del_img); |
@@ -1312,8 +1312,8 @@ discard block |
||
1312 | 1312 | } |
1313 | 1313 | $file_img->setExtra("size ='40'"); |
1314 | 1314 | $file_tray->addElement($file_img); |
1315 | - $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int)(400728 / 1000), 500, 500); |
|
1316 | - $file_label = new XoopsFormLabel('', '<br>' . $msg); |
|
1315 | + $msg = sprintf(_MD_EXTCAL_IMG_CONFIG, (int) (400728 / 1000), 500, 500); |
|
1316 | + $file_label = new XoopsFormLabel('', '<br>'.$msg); |
|
1317 | 1317 | $file_tray->addElement($file_label); |
1318 | 1318 | $form->addElement($file_tray); |
1319 | 1319 | $form->addElement(new XoopsFormHidden('file2', $event_picture2)); |
@@ -1380,7 +1380,7 @@ discard block |
||
1380 | 1380 | $recurRules = 'weekly|'; |
1381 | 1381 | $recurRules .= $parm['rrule_weekly_interval']; |
1382 | 1382 | foreach ($parm['rrule_weekly_bydays'] as $day) { |
1383 | - $recurRules .= '|' . $day; |
|
1383 | + $recurRules .= '|'.$day; |
|
1384 | 1384 | } |
1385 | 1385 | |
1386 | 1386 | break; |
@@ -1390,11 +1390,11 @@ discard block |
||
1390 | 1390 | $parm['rrule_monthly_interval'] = 0; |
1391 | 1391 | } |
1392 | 1392 | $recurRules = 'monthly|'; |
1393 | - $recurRules .= $parm['rrule_monthly_interval'] . '|'; |
|
1393 | + $recurRules .= $parm['rrule_monthly_interval'].'|'; |
|
1394 | 1394 | if ($parm['rrule_monthly_byday'] != '') { |
1395 | 1395 | $recurRules .= $parm['rrule_monthly_byday']; |
1396 | 1396 | } else { |
1397 | - $recurRules .= 'MD' . $parm['rrule_bymonthday']; |
|
1397 | + $recurRules .= 'MD'.$parm['rrule_bymonthday']; |
|
1398 | 1398 | } |
1399 | 1399 | |
1400 | 1400 | break; |
@@ -1428,9 +1428,9 @@ discard block |
||
1428 | 1428 | |
1429 | 1429 | $recurRules = 'yearly|'; |
1430 | 1430 | $recurRules .= $parm['rrule_yearly_interval']; |
1431 | - $recurRules .= '|' . $parm['rrule_yearly_byday']; |
|
1431 | + $recurRules .= '|'.$parm['rrule_yearly_byday']; |
|
1432 | 1432 | foreach ($parm['rrule_yearly_bymonths'] as $month) { |
1433 | - $recurRules .= '|' . $month; |
|
1433 | + $recurRules .= '|'.$month; |
|
1434 | 1434 | } |
1435 | 1435 | |
1436 | 1436 | break; |
@@ -2363,10 +2363,10 @@ discard block |
||
2363 | 2363 | global $xoopsDB; |
2364 | 2364 | |
2365 | 2365 | //echo "<hr>{$andor}-{$limit}-{$offset}-{$userId}-{$user}<br>{$criteresPlus}"; |
2366 | - $tEvent = $xoopsDB->prefix('extcal_event') . ' AS te'; |
|
2367 | - $tCat = $xoopsDB->prefix('extcal_cat') . ' AS tc'; |
|
2366 | + $tEvent = $xoopsDB->prefix('extcal_event').' AS te'; |
|
2367 | + $tCat = $xoopsDB->prefix('extcal_cat').' AS tc'; |
|
2368 | 2368 | |
2369 | - $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, ' . 'year(FROM_UNIXTIME(event_start)) AS year,' . 'month(FROM_UNIXTIME(event_start)) AS month,' . 'day(FROM_UNIXTIME(event_start)) AS day' . " FROM {$tEvent}, {$tCat}"; |
|
2369 | + $sql = 'SELECT te.*, tc.cat_name , tc.cat_color, '.'year(FROM_UNIXTIME(event_start)) AS year,'.'month(FROM_UNIXTIME(event_start)) AS month,'.'day(FROM_UNIXTIME(event_start)) AS day'." FROM {$tEvent}, {$tCat}"; |
|
2370 | 2370 | //--------------------------------------------------- |
2371 | 2371 | $tw = array(); |
2372 | 2372 | $tw[] = 'te.cat_id = tc.cat_id'; |
@@ -2375,7 +2375,7 @@ discard block |
||
2375 | 2375 | $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
2376 | 2376 | $inCat = 'te.cat_id IN (0)'; |
2377 | 2377 | if (count($authorizedAccessCats) > 0) { |
2378 | - $inCat = 'te.cat_id IN (' . implode(',', $authorizedAccessCats) . ')'; |
|
2378 | + $inCat = 'te.cat_id IN ('.implode(',', $authorizedAccessCats).')'; |
|
2379 | 2379 | } |
2380 | 2380 | //echo $tw[count($tw)-1]; |
2381 | 2381 | |
@@ -2411,12 +2411,12 @@ discard block |
||
2411 | 2411 | 'te.event_address', |
2412 | 2412 | 'tc.cat_name', |
2413 | 2413 | ); |
2414 | - $t = array(); |
|
2414 | + $t = array(); |
|
2415 | 2415 | for ($i = 0, $count = count($queryarray); $i < $count; ++$i) { |
2416 | 2416 | $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' "; |
2417 | 2417 | } |
2418 | 2418 | |
2419 | - $flt = '(' . implode(" {$andor} ", $t1) . ')'; |
|
2419 | + $flt = '('.implode(" {$andor} ", $t1).')'; |
|
2420 | 2420 | |
2421 | 2421 | $t = array(); |
2422 | 2422 | for ($h = 0, $count = count($tFields); $h < $count; ++$h) { |
@@ -2425,10 +2425,10 @@ discard block |
||
2425 | 2425 | |
2426 | 2426 | $filtre = implode(' OR ', $t); |
2427 | 2427 | $filtre = str_replace('#', '%', $filtre); |
2428 | - $tw[] = '(' . $filtre . ')'; |
|
2428 | + $tw[] = '('.$filtre.')'; |
|
2429 | 2429 | } |
2430 | 2430 | |
2431 | - $sql .= ' WHERE ' . implode(' AND ', $tw); |
|
2431 | + $sql .= ' WHERE '.implode(' AND ', $tw); |
|
2432 | 2432 | //------------------------------------------------------------ |
2433 | 2433 | if (count($orderBy) > 0) { |
2434 | 2434 | $t = array(); |
@@ -2438,7 +2438,7 @@ discard block |
||
2438 | 2438 | } |
2439 | 2439 | } |
2440 | 2440 | if (count($t) > 0) { |
2441 | - $sql .= ' ORDER BY ' . implode(',', $t); |
|
2441 | + $sql .= ' ORDER BY '.implode(',', $t); |
|
2442 | 2442 | } |
2443 | 2443 | } |
2444 | 2444 | |
@@ -2471,7 +2471,7 @@ discard block |
||
2471 | 2471 | $i = 0; |
2472 | 2472 | while ($myrow = $xoopsDB->fetchArray($result)) { |
2473 | 2473 | $ret[$i]['image'] = 'assets/images/icons/extcal.gif'; |
2474 | - $ret[$i]['link'] = 'event.php?event=' . $myrow['event_id']; |
|
2474 | + $ret[$i]['link'] = 'event.php?event='.$myrow['event_id']; |
|
2475 | 2475 | $ret[$i]['title'] = $myrow['event_title']; |
2476 | 2476 | $ret[$i]['time'] = $myrow['event_submitdate']; |
2477 | 2477 | $ret[$i]['uid'] = $myrow['event_submitter']; |
@@ -2511,23 +2511,23 @@ discard block |
||
2511 | 2511 | // } |
2512 | 2512 | $tEvent = $xoopsDB->prefix('extcal_event'); |
2513 | 2513 | $tCat = $xoopsDB->prefix('extcal_cat'); |
2514 | - $sql = "SELECT {$tEvent}.*, {$tCat}.cat_name AS categorie, {$tCat}.cat_color " . " FROM {$tEvent}, {$tCat}" . " WHERE {$tEvent}.cat_id = {$tCat}.cat_id AND event_approved = '1'"; |
|
2514 | + $sql = "SELECT {$tEvent}.*, {$tCat}.cat_name AS categorie, {$tCat}.cat_color "." FROM {$tEvent}, {$tCat}"." WHERE {$tEvent}.cat_id = {$tCat}.cat_id AND event_approved = '1'"; |
|
2515 | 2515 | |
2516 | 2516 | $authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, 'extcal_cat_view'); |
2517 | 2517 | $count = count($authorizedAccessCats); |
2518 | 2518 | if ($count > 0) { |
2519 | - $in = '(' . $authorizedAccessCats[0]; |
|
2519 | + $in = '('.$authorizedAccessCats[0]; |
|
2520 | 2520 | array_shift($authorizedAccessCats); |
2521 | 2521 | foreach ($authorizedAccessCats as $authorizedAccessCat) { |
2522 | - $in .= ',' . $authorizedAccessCat; |
|
2522 | + $in .= ','.$authorizedAccessCat; |
|
2523 | 2523 | } |
2524 | 2524 | $in .= ')'; |
2525 | 2525 | } else { |
2526 | 2526 | $in = '(0)'; |
2527 | 2527 | } |
2528 | - $sql .= " AND {$tEvent}.cat_id IN " . $in . ''; |
|
2528 | + $sql .= " AND {$tEvent}.cat_id IN ".$in.''; |
|
2529 | 2529 | if ($userId != 0) { |
2530 | - $sql .= " AND event_submitter = '" . $userId . "'"; |
|
2530 | + $sql .= " AND event_submitter = '".$userId."'"; |
|
2531 | 2531 | } |
2532 | 2532 | |
2533 | 2533 | //echoArray($queryarray,false); |
@@ -2547,7 +2547,7 @@ discard block |
||
2547 | 2547 | $t1[] = " %1\$s LIKE '#{$queryarray[$i]}#' "; |
2548 | 2548 | } |
2549 | 2549 | |
2550 | - $flt = '(' . implode(" {$andor} ", $t1) . ')'; |
|
2550 | + $flt = '('.implode(" {$andor} ", $t1).')'; |
|
2551 | 2551 | |
2552 | 2552 | $t = array(); |
2553 | 2553 | for ($h = 0, $count = count($tFields); $h < $count; ++$h) { |
@@ -2560,7 +2560,7 @@ discard block |
||
2560 | 2560 | } |
2561 | 2561 | |
2562 | 2562 | if ($criteresPlus != '') { |
2563 | - $sql .= ' AND ' . $criteresPlus; |
|
2563 | + $sql .= ' AND '.$criteresPlus; |
|
2564 | 2564 | } |
2565 | 2565 | $sql .= ' ORDER BY event_id DESC'; |
2566 | 2566 | |
@@ -2570,7 +2570,7 @@ discard block |
||
2570 | 2570 | if ($xoopsSearch) { |
2571 | 2571 | while ($myrow = $xoopsDB->fetchArray($result)) { |
2572 | 2572 | $ret[$i]['image'] = 'assets/images/icons/extcal.gif'; |
2573 | - $ret[$i]['link'] = 'event.php?event=' . $myrow['event_id']; |
|
2573 | + $ret[$i]['link'] = 'event.php?event='.$myrow['event_id']; |
|
2574 | 2574 | $ret[$i]['title'] = $myrow['event_title']; |
2575 | 2575 | $ret[$i]['time'] = $myrow['event_submitdate']; |
2576 | 2576 | $ret[$i]['uid'] = $myrow['event_submitter']; |
@@ -60,10 +60,10 @@ discard block |
||
60 | 60 | // This library should be called by each script before the include of PhpZip |
61 | 61 | // Library in order to limit the potential 'lib' directory path problem. |
62 | 62 | if (!defined('PCLERROR_LIB')) { |
63 | - include $gPcltarLibDir . '/pclerror.lib.php'; |
|
63 | + include $gPcltarLibDir.'/pclerror.lib.php'; |
|
64 | 64 | } |
65 | 65 | if (!defined('PCLTRACE_LIB')) { |
66 | - include $gPcltarLibDir . '/pcltrace.lib.php'; |
|
66 | + include $gPcltarLibDir.'/pcltrace.lib.php'; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | // -------------------------------------------------------------------------------- |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | if (!is_file($p_tarname)) { |
824 | 824 | PclErrorLog(-4, "Archive '$p_tarname' does not exist"); |
825 | 825 | } else { |
826 | - PclErrorLog(-6, "Archive '$p_tarname' has invalid size " . filesize($p_tarname) . '(not a 512 block multiple)'); |
|
826 | + PclErrorLog(-6, "Archive '$p_tarname' has invalid size ".filesize($p_tarname).'(not a 512 block multiple)'); |
|
827 | 827 | } |
828 | 828 | |
829 | 829 | // ----- Return |
@@ -839,7 +839,7 @@ discard block |
||
839 | 839 | if (!is_file($p_tarname_add)) { |
840 | 840 | PclErrorLog(-4, "Archive '$p_tarname_add' does not exist"); |
841 | 841 | } else { |
842 | - PclErrorLog(-6, "Archive '$p_tarname_add' has invalid size " . filesize($p_tarname_add) . '(not a 512 block multiple)'); |
|
842 | + PclErrorLog(-6, "Archive '$p_tarname_add' has invalid size ".filesize($p_tarname_add).'(not a 512 block multiple)'); |
|
843 | 843 | } |
844 | 844 | |
845 | 845 | // ----- Return |
@@ -862,7 +862,7 @@ discard block |
||
862 | 862 | } |
863 | 863 | |
864 | 864 | // ----- Open a temporary file in write mode |
865 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
865 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
866 | 866 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
867 | 867 | if (($v_temp_tar = @gzopen($v_temp_tarname, 'wb')) == 0) { |
868 | 868 | // ----- Close tar file |
@@ -915,9 +915,9 @@ discard block |
||
915 | 915 | } |
916 | 916 | |
917 | 917 | // ----- Go to the beginning of last block |
918 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position before :' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
918 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position before :'.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
919 | 919 | fseek($p_tar, $v_size - 512); |
920 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position after :' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
920 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position after :'.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
921 | 921 | } // ----- Look for unknown type |
922 | 922 | else { |
923 | 923 | // ----- Error log |
@@ -1208,7 +1208,7 @@ discard block |
||
1208 | 1208 | if (!is_file($p_tarname)) { |
1209 | 1209 | PclErrorLog(-4, "Archive '$p_tarname' does not exist"); |
1210 | 1210 | } else { |
1211 | - PclErrorLog(-6, "Archive '$p_tarname' has invalid size " . filesize($p_tarname) . '(not a 512 block multiple)'); |
|
1211 | + PclErrorLog(-6, "Archive '$p_tarname' has invalid size ".filesize($p_tarname).'(not a 512 block multiple)'); |
|
1212 | 1212 | } |
1213 | 1213 | |
1214 | 1214 | // ----- Return |
@@ -1231,7 +1231,7 @@ discard block |
||
1231 | 1231 | } |
1232 | 1232 | |
1233 | 1233 | // ----- Open a temporary file in write mode |
1234 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
1234 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
1235 | 1235 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
1236 | 1236 | if (($v_temp_tar = @gzopen($v_temp_tarname, 'wb')) == 0) { |
1237 | 1237 | // ----- Close tar file |
@@ -1316,9 +1316,9 @@ discard block |
||
1316 | 1316 | } |
1317 | 1317 | |
1318 | 1318 | // ----- Go to the beginning of last block |
1319 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position before :' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1319 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position before :'.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1320 | 1320 | fseek($p_tar, $v_size - 512); |
1321 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position after :' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1321 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position after :'.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1322 | 1322 | |
1323 | 1323 | // ----- Call the adding fct inside the tar |
1324 | 1324 | if (($v_result = PclTarHandleAddList($p_tar, $p_list, $p_mode, $p_list_detail, $p_add_dir, $p_remove_dir)) == 1) { |
@@ -1385,7 +1385,7 @@ discard block |
||
1385 | 1385 | // ----- Check the parameters |
1386 | 1386 | if ($p_tar == 0) { |
1387 | 1387 | // ----- Error log |
1388 | - PclErrorLog(-3, 'Invalid file descriptor in file ' . __FILE__ . ', line ' . __LINE__); |
|
1388 | + PclErrorLog(-3, 'Invalid file descriptor in file '.__FILE__.', line '.__LINE__); |
|
1389 | 1389 | |
1390 | 1390 | // ----- Return |
1391 | 1391 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -1440,7 +1440,7 @@ discard block |
||
1440 | 1440 | return PclErrorCode(); |
1441 | 1441 | } |
1442 | 1442 | |
1443 | - TrFctMessage(__FILE__, __LINE__, 4, 'File position before header =' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1443 | + TrFctMessage(__FILE__, __LINE__, 4, 'File position before header ='.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1444 | 1444 | |
1445 | 1445 | // ----- Add the file |
1446 | 1446 | if (($v_result = PclTarHandleAddFile($p_tar, $p_filename, $p_mode, $v_header, $p_add_dir, $p_remove_dir)) != 1) { |
@@ -1460,7 +1460,7 @@ discard block |
||
1460 | 1460 | // ----- Look for path |
1461 | 1461 | $v_path = ''; |
1462 | 1462 | if ($p_filename !== '.') { |
1463 | - $v_path = $p_filename . '/'; |
|
1463 | + $v_path = $p_filename.'/'; |
|
1464 | 1464 | } |
1465 | 1465 | |
1466 | 1466 | // ----- Read the directory for files and sub-directories |
@@ -1469,11 +1469,11 @@ discard block |
||
1469 | 1469 | $p_hitem = readdir($p_hdir); // '..' directory |
1470 | 1470 | while ($p_hitem = readdir($p_hdir)) { |
1471 | 1471 | // ----- Look for a file |
1472 | - if (is_file($v_path . $p_hitem)) { |
|
1473 | - TrFctMessage(__FILE__, __LINE__, 4, "Add the file '" . $v_path . $p_hitem . "'"); |
|
1472 | + if (is_file($v_path.$p_hitem)) { |
|
1473 | + TrFctMessage(__FILE__, __LINE__, 4, "Add the file '".$v_path.$p_hitem."'"); |
|
1474 | 1474 | |
1475 | 1475 | // ----- Add the file |
1476 | - if (($v_result = PclTarHandleAddFile($p_tar, $v_path . $p_hitem, $p_mode, $v_header, $p_add_dir, $p_remove_dir)) != 1) { |
|
1476 | + if (($v_result = PclTarHandleAddFile($p_tar, $v_path.$p_hitem, $p_mode, $v_header, $p_add_dir, $p_remove_dir)) != 1) { |
|
1477 | 1477 | // ----- Return status |
1478 | 1478 | TrFctEnd(__FILE__, __LINE__, $v_result); |
1479 | 1479 | |
@@ -1484,10 +1484,10 @@ discard block |
||
1484 | 1484 | $p_list_detail[$v_nb++] = $v_header; |
1485 | 1485 | } // ----- Recursive call to PclTarHandleAddFile() |
1486 | 1486 | else { |
1487 | - TrFctMessage(__FILE__, __LINE__, 4, "'" . $v_path . $p_hitem . "' is a directory"); |
|
1487 | + TrFctMessage(__FILE__, __LINE__, 4, "'".$v_path.$p_hitem."' is a directory"); |
|
1488 | 1488 | |
1489 | 1489 | // ----- Need an array as parameter |
1490 | - $p_temp_list[0] = $v_path . $p_hitem; |
|
1490 | + $p_temp_list[0] = $v_path.$p_hitem; |
|
1491 | 1491 | $v_result = PclTarHandleAddList($p_tar, $p_temp_list, $p_mode, $p_list_detail, $p_add_dir, $p_remove_dir); |
1492 | 1492 | } |
1493 | 1493 | } |
@@ -1495,7 +1495,7 @@ discard block |
||
1495 | 1495 | // ----- Free memory for the recursive loop |
1496 | 1496 | unset($p_temp_list, $p_hdir, $p_hitem); |
1497 | 1497 | } else { |
1498 | - TrFctMessage(__FILE__, __LINE__, 4, 'File position after blocks =' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1498 | + TrFctMessage(__FILE__, __LINE__, 4, 'File position after blocks ='.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1499 | 1499 | } |
1500 | 1500 | } |
1501 | 1501 | |
@@ -1531,7 +1531,7 @@ discard block |
||
1531 | 1531 | // ----- Check the parameters |
1532 | 1532 | if ($p_tar == 0) { |
1533 | 1533 | // ----- Error log |
1534 | - PclErrorLog(-3, 'Invalid file descriptor in file ' . __FILE__ . ', line ' . __LINE__); |
|
1534 | + PclErrorLog(-3, 'Invalid file descriptor in file '.__FILE__.', line '.__LINE__); |
|
1535 | 1535 | |
1536 | 1536 | // ----- Return |
1537 | 1537 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -1559,7 +1559,7 @@ discard block |
||
1559 | 1559 | |
1560 | 1560 | if ((0 === strpos($p_filename, './')) || (0 === strpos($p_remove_dir, './'))) { |
1561 | 1561 | if ((0 === strpos($p_filename, './')) && (0 !== strpos($p_remove_dir, './'))) { |
1562 | - $p_remove_dir = './' . $p_remove_dir; |
|
1562 | + $p_remove_dir = './'.$p_remove_dir; |
|
1563 | 1563 | } |
1564 | 1564 | if ((0 !== strpos($p_filename, './')) && (0 === strpos($p_remove_dir, './'))) { |
1565 | 1565 | $p_remove_dir = substr($p_remove_dir, 2); |
@@ -1573,9 +1573,9 @@ discard block |
||
1573 | 1573 | } |
1574 | 1574 | if ($p_add_dir != '') { |
1575 | 1575 | if (substr($p_add_dir, -1) === '/') { |
1576 | - $v_stored_filename = $p_add_dir . $v_stored_filename; |
|
1576 | + $v_stored_filename = $p_add_dir.$v_stored_filename; |
|
1577 | 1577 | } else { |
1578 | - $v_stored_filename = $p_add_dir . '/' . $v_stored_filename; |
|
1578 | + $v_stored_filename = $p_add_dir.'/'.$v_stored_filename; |
|
1579 | 1579 | } |
1580 | 1580 | TrFctMessage(__FILE__, __LINE__, 3, "Add path '$p_add_dir' in file '$p_filename' = '$v_stored_filename'"); |
1581 | 1581 | } |
@@ -1612,7 +1612,7 @@ discard block |
||
1612 | 1612 | return $v_result; |
1613 | 1613 | } |
1614 | 1614 | |
1615 | - TrFctMessage(__FILE__, __LINE__, 4, 'File position after header =' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1615 | + TrFctMessage(__FILE__, __LINE__, 4, 'File position after header ='.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1616 | 1616 | |
1617 | 1617 | // ----- Read the file by 512 octets blocks |
1618 | 1618 | $i = 0; |
@@ -1630,7 +1630,7 @@ discard block |
||
1630 | 1630 | // ----- Close the file |
1631 | 1631 | fclose($v_file); |
1632 | 1632 | |
1633 | - TrFctMessage(__FILE__, __LINE__, 4, 'File position after blocks =' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1633 | + TrFctMessage(__FILE__, __LINE__, 4, 'File position after blocks ='.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1634 | 1634 | } // ----- Look for a directory |
1635 | 1635 | else { |
1636 | 1636 | // ----- Call the header generation |
@@ -1641,7 +1641,7 @@ discard block |
||
1641 | 1641 | return $v_result; |
1642 | 1642 | } |
1643 | 1643 | |
1644 | - TrFctMessage(__FILE__, __LINE__, 4, 'File position after header =' . ($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1644 | + TrFctMessage(__FILE__, __LINE__, 4, 'File position after header ='.($p_mode === 'tar' ? ftell($p_tar) : gztell($p_tar))); |
|
1645 | 1645 | } |
1646 | 1646 | |
1647 | 1647 | // ----- Return |
@@ -1688,7 +1688,7 @@ discard block |
||
1688 | 1688 | // ----- Check the parameters |
1689 | 1689 | if (($p_tar == 0) || ($p_filename == '')) { |
1690 | 1690 | // ----- Error log |
1691 | - PclErrorLog(-3, 'Invalid file descriptor in file ' . __FILE__ . ', line ' . __LINE__); |
|
1691 | + PclErrorLog(-3, 'Invalid file descriptor in file '.__FILE__.', line '.__LINE__); |
|
1692 | 1692 | |
1693 | 1693 | // ----- Return |
1694 | 1694 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -1701,7 +1701,7 @@ discard block |
||
1701 | 1701 | $p_stored_filename = $p_filename; |
1702 | 1702 | } |
1703 | 1703 | $v_reduce_filename = PclTarHandlePathReduction($p_stored_filename); |
1704 | - TrFctMessage(__FILE__, __LINE__, 2, "Filename (reduced) '$v_reduce_filename', strlen " . strlen($v_reduce_filename)); |
|
1704 | + TrFctMessage(__FILE__, __LINE__, 2, "Filename (reduced) '$v_reduce_filename', strlen ".strlen($v_reduce_filename)); |
|
1705 | 1705 | |
1706 | 1706 | // ----- Get file info |
1707 | 1707 | $v_info = stat($p_filename); |
@@ -1902,7 +1902,7 @@ discard block |
||
1902 | 1902 | // ----- Check the path |
1903 | 1903 | //if (($p_path == "") || ((substr($p_path, 0, 1) != "/") && (substr($p_path, 0, 3) != "../"))) |
1904 | 1904 | if ($p_path == '') { |
1905 | - $p_path = './' . $p_path; |
|
1905 | + $p_path = './'.$p_path; |
|
1906 | 1906 | } |
1907 | 1907 | |
1908 | 1908 | // ----- Look for path to remove format (should end by /) |
@@ -1997,29 +1997,29 @@ discard block |
||
1997 | 1997 | continue; |
1998 | 1998 | } |
1999 | 1999 | |
2000 | - TrFctMessage(__FILE__, __LINE__, 2, "Found file '" . $v_header['filename'] . "', size '" . $v_header['size'] . "'"); |
|
2000 | + TrFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'"); |
|
2001 | 2001 | |
2002 | 2002 | // ----- Look for partial extract |
2003 | 2003 | if ((!$v_extract_all) && is_array($p_file_list)) { |
2004 | - TrFctMessage(__FILE__, __LINE__, 2, 'Look if the file ' . $v_header['filename'] . ' need to be extracted'); |
|
2004 | + TrFctMessage(__FILE__, __LINE__, 2, 'Look if the file '.$v_header['filename'].' need to be extracted'); |
|
2005 | 2005 | |
2006 | 2006 | // ----- By default no unzip if the file is not found |
2007 | 2007 | $v_extract_file = false; |
2008 | 2008 | |
2009 | 2009 | // ----- Look into the file list |
2010 | 2010 | for ($i = 0, $iMax = count($p_file_list); $i < $iMax; ++$i) { |
2011 | - TrFctMessage(__FILE__, __LINE__, 2, 'Compare archived file ' . $v_header['filename'] . " from asked list file '" . $p_file_list[$i] . "'"); |
|
2011 | + TrFctMessage(__FILE__, __LINE__, 2, 'Compare archived file '.$v_header['filename']." from asked list file '".$p_file_list[$i]."'"); |
|
2012 | 2012 | |
2013 | 2013 | // ----- Look if it is a directory |
2014 | 2014 | if (substr($p_file_list[$i], -1) === '/') { |
2015 | - TrFctMessage(__FILE__, __LINE__, 3, 'Compare file ' . $v_header['filename'] . " with directory '$p_file_list[$i]'"); |
|
2015 | + TrFctMessage(__FILE__, __LINE__, 3, 'Compare file '.$v_header['filename']." with directory '$p_file_list[$i]'"); |
|
2016 | 2016 | |
2017 | 2017 | // ----- Look if the directory is in the filename path |
2018 | 2018 | if ((strlen($v_header['filename']) > strlen($p_file_list[$i])) |
2019 | 2019 | && (0 === strpos($v_header['filename'], $p_file_list[$i])) |
2020 | 2020 | ) { |
2021 | 2021 | // ----- The file is in the directory, so extract it |
2022 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . " is in directory '$p_file_list[$i]' : extract it"); |
|
2022 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename']." is in directory '$p_file_list[$i]' : extract it"); |
|
2023 | 2023 | $v_extract_file = true; |
2024 | 2024 | |
2025 | 2025 | // ----- End of loop |
@@ -2029,7 +2029,7 @@ discard block |
||
2029 | 2029 | else { |
2030 | 2030 | if ($p_file_list[$i] == $v_header['filename']) { |
2031 | 2031 | // ----- File found |
2032 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' should be extracted'); |
|
2032 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' should be extracted'); |
|
2033 | 2033 | $v_extract_file = true; |
2034 | 2034 | |
2035 | 2035 | // ----- End of loop |
@@ -2040,7 +2040,7 @@ discard block |
||
2040 | 2040 | |
2041 | 2041 | // ----- Trace |
2042 | 2042 | if (!$v_extract_file) { |
2043 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' should not be extracted'); |
|
2043 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' should not be extracted'); |
|
2044 | 2044 | } |
2045 | 2045 | } else { |
2046 | 2046 | // ----- All files need to be extracted |
@@ -2051,10 +2051,10 @@ discard block |
||
2051 | 2051 | if ($v_extract_file && (!$v_listing)) { |
2052 | 2052 | // ----- Look for path to remove |
2053 | 2053 | if (($p_remove_path != '') && (0 === strpos($v_header['filename'], $p_remove_path))) { |
2054 | - TrFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file " . $v_header['filename'] . ''); |
|
2054 | + TrFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file ".$v_header['filename'].''); |
|
2055 | 2055 | // ----- Remove the path |
2056 | 2056 | $v_header['filename'] = substr($v_header['filename'], $p_remove_path_size); |
2057 | - TrFctMessage(__FILE__, __LINE__, 3, 'Reslting file is ' . $v_header['filename'] . ''); |
|
2057 | + TrFctMessage(__FILE__, __LINE__, 3, 'Reslting file is '.$v_header['filename'].''); |
|
2058 | 2058 | } |
2059 | 2059 | |
2060 | 2060 | // ----- Add the path to the file |
@@ -2068,22 +2068,22 @@ discard block |
||
2068 | 2068 | |
2069 | 2069 | // ----- Add the path |
2070 | 2070 | if (0 === strpos($v_header['filename'], '/')) { |
2071 | - $v_header['filename'] = $p_path . $v_header['filename']; |
|
2071 | + $v_header['filename'] = $p_path.$v_header['filename']; |
|
2072 | 2072 | } else { |
2073 | - $v_header['filename'] = $p_path . '/' . $v_header['filename']; |
|
2073 | + $v_header['filename'] = $p_path.'/'.$v_header['filename']; |
|
2074 | 2074 | } |
2075 | 2075 | } |
2076 | 2076 | |
2077 | 2077 | // ----- Trace |
2078 | - TrFctMessage(__FILE__, __LINE__, 2, 'Extracting file (with path) ' . $v_header['filename'] . ", size '" . $v_header['size'] . "'"); |
|
2078 | + TrFctMessage(__FILE__, __LINE__, 2, 'Extracting file (with path) '.$v_header['filename'].", size '".$v_header['size']."'"); |
|
2079 | 2079 | |
2080 | 2080 | // ----- Check that the file does not exists |
2081 | 2081 | if (file_exists($v_header['filename'])) { |
2082 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' already exists'); |
|
2082 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' already exists'); |
|
2083 | 2083 | |
2084 | 2084 | // ----- Look if file is a directory |
2085 | 2085 | if (is_dir($v_header['filename'])) { |
2086 | - TrFctMessage(__FILE__, __LINE__, 2, 'Existing file ' . $v_header['filename'] . ' is a directory'); |
|
2086 | + TrFctMessage(__FILE__, __LINE__, 2, 'Existing file '.$v_header['filename'].' is a directory'); |
|
2087 | 2087 | |
2088 | 2088 | // ----- Change the file status |
2089 | 2089 | $v_header['status'] = 'already_a_directory'; |
@@ -2094,7 +2094,7 @@ discard block |
||
2094 | 2094 | } // ----- Look if file is write protected |
2095 | 2095 | else { |
2096 | 2096 | if (!s_writable($v_header['filename'])) { |
2097 | - TrFctMessage(__FILE__, __LINE__, 2, 'Existing file ' . $v_header['filename'] . ' is write protected'); |
|
2097 | + TrFctMessage(__FILE__, __LINE__, 2, 'Existing file '.$v_header['filename'].' is write protected'); |
|
2098 | 2098 | |
2099 | 2099 | // ----- Change the file status |
2100 | 2100 | $v_header['status'] = 'write_protected'; |
@@ -2128,7 +2128,7 @@ discard block |
||
2128 | 2128 | } |
2129 | 2129 | |
2130 | 2130 | if (($v_result = PclTarHandlerDirCheck($v_dir_to_check)) != 1) { |
2131 | - TrFctMessage(__FILE__, __LINE__, 2, 'Unable to create path for ' . $v_header['filename'] . ''); |
|
2131 | + TrFctMessage(__FILE__, __LINE__, 2, 'Unable to create path for '.$v_header['filename'].''); |
|
2132 | 2132 | |
2133 | 2133 | // ----- Change the file status |
2134 | 2134 | $v_header['status'] = 'path_creation_fail'; |
@@ -2143,7 +2143,7 @@ discard block |
||
2143 | 2143 | if ($v_extract_file && ($v_header['typeflag'] != '5')) { |
2144 | 2144 | // ----- Open the destination file in write mode |
2145 | 2145 | if (($v_dest_file = @fopen($v_header['filename'], 'wb')) == 0) { |
2146 | - TrFctMessage(__FILE__, __LINE__, 2, 'Error while opening ' . $v_header['filename'] . ' in write binary mode'); |
|
2146 | + TrFctMessage(__FILE__, __LINE__, 2, 'Error while opening '.$v_header['filename'].' in write binary mode'); |
|
2147 | 2147 | |
2148 | 2148 | // ----- Change the file status |
2149 | 2149 | $v_header['status'] = 'write_error'; |
@@ -2156,12 +2156,12 @@ discard block |
||
2156 | 2156 | gzseek($v_tar, gztell($v_tar) + (ceil($v_header['size'] / 512) * 512)); |
2157 | 2157 | } |
2158 | 2158 | } else { |
2159 | - TrFctMessage(__FILE__, __LINE__, 2, 'Start extraction of ' . $v_header['filename'] . ''); |
|
2159 | + TrFctMessage(__FILE__, __LINE__, 2, 'Start extraction of '.$v_header['filename'].''); |
|
2160 | 2160 | |
2161 | 2161 | // ----- Read data |
2162 | 2162 | $n = floor($v_header['size'] / 512); |
2163 | 2163 | for ($i = 0; $i < $n; ++$i) { |
2164 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number ' . ($i + 1)); |
|
2164 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number '.($i + 1)); |
|
2165 | 2165 | if ($p_tar_mode === 'tar') { |
2166 | 2166 | $v_content = fread($v_tar, 512); |
2167 | 2167 | } else { |
@@ -2170,7 +2170,7 @@ discard block |
||
2170 | 2170 | fwrite($v_dest_file, $v_content, 512); |
2171 | 2171 | } |
2172 | 2172 | if (($v_header['size'] % 512) != 0) { |
2173 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read last ' . ($v_header['size'] % 512) . ' bytes in a 512 block'); |
|
2173 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read last '.($v_header['size'] % 512).' bytes in a 512 block'); |
|
2174 | 2174 | if ($p_tar_mode === 'tar') { |
2175 | 2175 | $v_content = fread($v_tar, 512); |
2176 | 2176 | } else { |
@@ -2198,7 +2198,7 @@ discard block |
||
2198 | 2198 | } |
2199 | 2199 | |
2200 | 2200 | // ----- Error log |
2201 | - PclErrorLog(-7, 'Extracted file ' . $v_header['filename'] . " does not have the correct file size '" . filesize($v_filename) . "' ('" . $v_header['size'] . "' expected). Archive may be corrupted."); |
|
2201 | + PclErrorLog(-7, 'Extracted file '.$v_header['filename']." does not have the correct file size '".filesize($v_filename)."' ('".$v_header['size']."' expected). Archive may be corrupted."); |
|
2202 | 2202 | |
2203 | 2203 | // ----- Return |
2204 | 2204 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -2209,7 +2209,7 @@ discard block |
||
2209 | 2209 | // ----- Trace |
2210 | 2210 | TrFctMessage(__FILE__, __LINE__, 2, 'Extraction done'); |
2211 | 2211 | } else { |
2212 | - TrFctMessage(__FILE__, __LINE__, 2, 'Extraction of file ' . $v_header['filename'] . ' skipped.'); |
|
2212 | + TrFctMessage(__FILE__, __LINE__, 2, 'Extraction of file '.$v_header['filename'].' skipped.'); |
|
2213 | 2213 | |
2214 | 2214 | // ----- Jump to next file |
2215 | 2215 | TrFctMessage(__FILE__, __LINE__, 2, 'Jump to next file'); |
@@ -2222,8 +2222,8 @@ discard block |
||
2222 | 2222 | } // ----- Look for file that is not to be unzipped |
2223 | 2223 | else { |
2224 | 2224 | // ----- Trace |
2225 | - TrFctMessage(__FILE__, __LINE__, 2, 'Jump file ' . $v_header['filename'] . ''); |
|
2226 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2225 | + TrFctMessage(__FILE__, __LINE__, 2, 'Jump file '.$v_header['filename'].''); |
|
2226 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2227 | 2227 | |
2228 | 2228 | // ----- Jump to next file |
2229 | 2229 | if ($p_tar_mode === 'tar') { |
@@ -2232,7 +2232,7 @@ discard block |
||
2232 | 2232 | gzseek($v_tar, gztell($v_tar) + (ceil($v_header['size'] / 512) * 512)); |
2233 | 2233 | } |
2234 | 2234 | |
2235 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2235 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2236 | 2236 | } |
2237 | 2237 | |
2238 | 2238 | if ($p_tar_mode === 'tar') { |
@@ -2243,7 +2243,7 @@ discard block |
||
2243 | 2243 | |
2244 | 2244 | // ----- File name and properties are logged if listing mode or file is extracted |
2245 | 2245 | if ($v_listing || $v_extract_file || $v_extraction_stopped) { |
2246 | - TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file ' . $v_header['filename'] . ''); |
|
2246 | + TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file '.$v_header['filename'].''); |
|
2247 | 2247 | |
2248 | 2248 | // ----- Log extracted files |
2249 | 2249 | if (($v_file_dir = dirname($v_header['filename'])) == $v_header['filename']) { |
@@ -2318,7 +2318,7 @@ discard block |
||
2318 | 2318 | || ((0 !== strpos($p_path, '/')) && (0 !== strpos($p_path, '../')) |
2319 | 2319 | && (0 !== strpos($p_path, './'))) |
2320 | 2320 | ) { |
2321 | - $p_path = './' . $p_path; |
|
2321 | + $p_path = './'.$p_path; |
|
2322 | 2322 | } |
2323 | 2323 | |
2324 | 2324 | // ----- Look for path to remove format (should end by /) |
@@ -2466,14 +2466,14 @@ discard block |
||
2466 | 2466 | continue; |
2467 | 2467 | } |
2468 | 2468 | |
2469 | - TrFctMessage(__FILE__, __LINE__, 2, 'Found file ' . $v_header['filename'] . ", size '" . $v_header['size'] . "'"); |
|
2469 | + TrFctMessage(__FILE__, __LINE__, 2, 'Found file '.$v_header['filename'].", size '".$v_header['size']."'"); |
|
2470 | 2470 | |
2471 | 2471 | // ----- Look if file is in the range to be extracted |
2472 | 2472 | if (($p_index_current >= $p_index_start) && ($p_index_current <= $p_index_stop)) { |
2473 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' is in the range to be extracted'); |
|
2473 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' is in the range to be extracted'); |
|
2474 | 2474 | $v_extract_file = true; |
2475 | 2475 | } else { |
2476 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' is out of the range'); |
|
2476 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' is out of the range'); |
|
2477 | 2477 | $v_extract_file = false; |
2478 | 2478 | } |
2479 | 2479 | |
@@ -2488,8 +2488,8 @@ discard block |
||
2488 | 2488 | } // ----- Look for file that is not to be extracted |
2489 | 2489 | else { |
2490 | 2490 | // ----- Trace |
2491 | - TrFctMessage(__FILE__, __LINE__, 2, 'Jump file ' . $v_header['filename'] . ''); |
|
2492 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2491 | + TrFctMessage(__FILE__, __LINE__, 2, 'Jump file '.$v_header['filename'].''); |
|
2492 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2493 | 2493 | |
2494 | 2494 | // ----- Jump to next file |
2495 | 2495 | if ($p_tar_mode === 'tar') { |
@@ -2498,7 +2498,7 @@ discard block |
||
2498 | 2498 | gzseek($v_tar, gztell($v_tar) + (ceil($v_header['size'] / 512) * 512)); |
2499 | 2499 | } |
2500 | 2500 | |
2501 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2501 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2502 | 2502 | } |
2503 | 2503 | |
2504 | 2504 | if ($p_tar_mode === 'tar') { |
@@ -2509,7 +2509,7 @@ discard block |
||
2509 | 2509 | |
2510 | 2510 | // ----- File name and properties are logged if listing mode or file is extracted |
2511 | 2511 | if ($v_extract_file) { |
2512 | - TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file ' . $v_header['filename'] . ''); |
|
2512 | + TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file '.$v_header['filename'].''); |
|
2513 | 2513 | |
2514 | 2514 | // ----- Log extracted files |
2515 | 2515 | if (($v_file_dir = dirname($v_header['filename'])) == $v_header['filename']) { |
@@ -2566,10 +2566,10 @@ discard block |
||
2566 | 2566 | |
2567 | 2567 | // ----- Look for path to remove |
2568 | 2568 | if (($p_remove_path != '') && (0 === strpos($v_header['filename'], $p_remove_path))) { |
2569 | - TrFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file " . $v_header['filename'] . ''); |
|
2569 | + TrFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file ".$v_header['filename'].''); |
|
2570 | 2570 | // ----- Remove the path |
2571 | 2571 | $v_header['filename'] = substr($v_header['filename'], $p_remove_path_size); |
2572 | - TrFctMessage(__FILE__, __LINE__, 3, 'Resulting file is ' . $v_header['filename'] . ''); |
|
2572 | + TrFctMessage(__FILE__, __LINE__, 3, 'Resulting file is '.$v_header['filename'].''); |
|
2573 | 2573 | } |
2574 | 2574 | |
2575 | 2575 | // ----- Add the path to the file |
@@ -2583,22 +2583,22 @@ discard block |
||
2583 | 2583 | |
2584 | 2584 | // ----- Add the path |
2585 | 2585 | if (0 === strpos($v_header['filename'], '/')) { |
2586 | - $v_header['filename'] = $p_path . $v_header['filename']; |
|
2586 | + $v_header['filename'] = $p_path.$v_header['filename']; |
|
2587 | 2587 | } else { |
2588 | - $v_header['filename'] = $p_path . '/' . $v_header['filename']; |
|
2588 | + $v_header['filename'] = $p_path.'/'.$v_header['filename']; |
|
2589 | 2589 | } |
2590 | 2590 | } |
2591 | 2591 | |
2592 | 2592 | // ----- Trace |
2593 | - TrFctMessage(__FILE__, __LINE__, 2, 'Extracting file (with path) ' . $v_header['filename'] . ", size '" . $v_header['size'] . "'"); |
|
2593 | + TrFctMessage(__FILE__, __LINE__, 2, 'Extracting file (with path) '.$v_header['filename'].", size '".$v_header['size']."'"); |
|
2594 | 2594 | |
2595 | 2595 | // ----- Check that the file does not exists |
2596 | 2596 | if (file_exists($v_header['filename'])) { |
2597 | - TrFctMessage(__FILE__, __LINE__, 2, 'File ' . $v_header['filename'] . ' already exists'); |
|
2597 | + TrFctMessage(__FILE__, __LINE__, 2, 'File '.$v_header['filename'].' already exists'); |
|
2598 | 2598 | |
2599 | 2599 | // ----- Look if file is a directory |
2600 | 2600 | if (is_dir($v_header['filename'])) { |
2601 | - TrFctMessage(__FILE__, __LINE__, 2, 'Existing file ' . $v_header['filename'] . ' is a directory'); |
|
2601 | + TrFctMessage(__FILE__, __LINE__, 2, 'Existing file '.$v_header['filename'].' is a directory'); |
|
2602 | 2602 | |
2603 | 2603 | // ----- Change the file status |
2604 | 2604 | $v_header['status'] = 'already_a_directory'; |
@@ -2609,7 +2609,7 @@ discard block |
||
2609 | 2609 | } // ----- Look if file is write protected |
2610 | 2610 | else { |
2611 | 2611 | if (!s_writable($v_header['filename'])) { |
2612 | - TrFctMessage(__FILE__, __LINE__, 2, 'Existing file ' . $v_header['filename'] . ' is write protected'); |
|
2612 | + TrFctMessage(__FILE__, __LINE__, 2, 'Existing file '.$v_header['filename'].' is write protected'); |
|
2613 | 2613 | |
2614 | 2614 | // ----- Change the file status |
2615 | 2615 | $v_header['status'] = 'write_protected'; |
@@ -2621,7 +2621,7 @@ discard block |
||
2621 | 2621 | else { |
2622 | 2622 | if (filemtime($v_header['filename']) > $v_header['mtime']) { |
2623 | 2623 | TrFctMessage(__FILE__, __LINE__, 2, |
2624 | - 'Existing file ' . $v_header['filename'] . ' is newer (' . date('l dS of F Y h:i:s A', filemtime($v_header['filename'])) . ') than the extracted file (' . date('l dS of F Y h:i:s A', $v_header['mtime']) . ')'); |
|
2624 | + 'Existing file '.$v_header['filename'].' is newer ('.date('l dS of F Y h:i:s A', filemtime($v_header['filename'])).') than the extracted file ('.date('l dS of F Y h:i:s A', $v_header['mtime']).')'); |
|
2625 | 2625 | |
2626 | 2626 | // ----- Change the file status |
2627 | 2627 | $v_header['status'] = 'newer_exist'; |
@@ -2645,7 +2645,7 @@ discard block |
||
2645 | 2645 | } |
2646 | 2646 | |
2647 | 2647 | if (($v_result = PclTarHandlerDirCheck($v_dir_to_check)) != 1) { |
2648 | - TrFctMessage(__FILE__, __LINE__, 2, 'Unable to create path for ' . $v_header['filename'] . ''); |
|
2648 | + TrFctMessage(__FILE__, __LINE__, 2, 'Unable to create path for '.$v_header['filename'].''); |
|
2649 | 2649 | |
2650 | 2650 | // ----- Change the file status |
2651 | 2651 | $v_header['status'] = 'path_creation_fail'; |
@@ -2660,7 +2660,7 @@ discard block |
||
2660 | 2660 | if ($v_extract_file && ($v_header['typeflag'] != '5')) { |
2661 | 2661 | // ----- Open the destination file in write mode |
2662 | 2662 | if (($v_dest_file = @fopen($v_header['filename'], 'wb')) == 0) { |
2663 | - TrFctMessage(__FILE__, __LINE__, 2, 'Error while opening ' . $v_header['filename'] . ' in write binary mode'); |
|
2663 | + TrFctMessage(__FILE__, __LINE__, 2, 'Error while opening '.$v_header['filename'].' in write binary mode'); |
|
2664 | 2664 | |
2665 | 2665 | // ----- Change the file status |
2666 | 2666 | $v_header['status'] = 'write_error'; |
@@ -2673,12 +2673,12 @@ discard block |
||
2673 | 2673 | gzseek($v_tar, gztell($v_tar) + (ceil($v_header['size'] / 512) * 512)); |
2674 | 2674 | } |
2675 | 2675 | } else { |
2676 | - TrFctMessage(__FILE__, __LINE__, 2, 'Start extraction of ' . $v_header['filename'] . ''); |
|
2676 | + TrFctMessage(__FILE__, __LINE__, 2, 'Start extraction of '.$v_header['filename'].''); |
|
2677 | 2677 | |
2678 | 2678 | // ----- Read data |
2679 | 2679 | $n = floor($v_header['size'] / 512); |
2680 | 2680 | for ($i = 0; $i < $n; ++$i) { |
2681 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number ' . ($i + 1)); |
|
2681 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number '.($i + 1)); |
|
2682 | 2682 | if ($p_tar_mode === 'tar') { |
2683 | 2683 | $v_content = fread($v_tar, 512); |
2684 | 2684 | } else { |
@@ -2687,7 +2687,7 @@ discard block |
||
2687 | 2687 | fwrite($v_dest_file, $v_content, 512); |
2688 | 2688 | } |
2689 | 2689 | if (($v_header['size'] % 512) != 0) { |
2690 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read last ' . ($v_header['size'] % 512) . ' bytes in a 512 block'); |
|
2690 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read last '.($v_header['size'] % 512).' bytes in a 512 block'); |
|
2691 | 2691 | if ($p_tar_mode === 'tar') { |
2692 | 2692 | $v_content = fread($v_tar, 512); |
2693 | 2693 | } else { |
@@ -2708,7 +2708,7 @@ discard block |
||
2708 | 2708 | clearstatcache(); |
2709 | 2709 | if (filesize($v_header['filename']) != $v_header['size']) { |
2710 | 2710 | // ----- Error log |
2711 | - PclErrorLog(-7, 'Extracted file ' . $v_header['filename'] . " does not have the correct file size '" . filesize($v_filename) . "' ('" . $v_header['size'] . "' expected). Archive may be corrupted."); |
|
2711 | + PclErrorLog(-7, 'Extracted file '.$v_header['filename']." does not have the correct file size '".filesize($v_filename)."' ('".$v_header['size']."' expected). Archive may be corrupted."); |
|
2712 | 2712 | |
2713 | 2713 | // ----- Return |
2714 | 2714 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -2719,7 +2719,7 @@ discard block |
||
2719 | 2719 | // ----- Trace |
2720 | 2720 | TrFctMessage(__FILE__, __LINE__, 2, 'Extraction done'); |
2721 | 2721 | } else { |
2722 | - TrFctMessage(__FILE__, __LINE__, 2, 'Extraction of file ' . $v_header['filename'] . ' skipped.'); |
|
2722 | + TrFctMessage(__FILE__, __LINE__, 2, 'Extraction of file '.$v_header['filename'].' skipped.'); |
|
2723 | 2723 | |
2724 | 2724 | // ----- Jump to next file |
2725 | 2725 | TrFctMessage(__FILE__, __LINE__, 2, 'Jump to next file'); |
@@ -2773,7 +2773,7 @@ discard block |
||
2773 | 2773 | } |
2774 | 2774 | |
2775 | 2775 | // ----- Open a temporary file in write mode |
2776 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
2776 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
2777 | 2777 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
2778 | 2778 | if (($v_temp_tar = @fopen($v_temp_tarname, 'wb')) == 0) { |
2779 | 2779 | // ----- Close tar file |
@@ -2802,7 +2802,7 @@ discard block |
||
2802 | 2802 | } |
2803 | 2803 | |
2804 | 2804 | // ----- Open a temporary file in write mode |
2805 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
2805 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
2806 | 2806 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
2807 | 2807 | if (($v_temp_tar = @gzopen($v_temp_tarname, 'wb')) == 0) { |
2808 | 2808 | // ----- Close tar file |
@@ -2859,7 +2859,7 @@ discard block |
||
2859 | 2859 | continue; |
2860 | 2860 | } |
2861 | 2861 | |
2862 | - TrFctMessage(__FILE__, __LINE__, 2, 'Found file ' . $v_header['filename'] . ", size '" . $v_header['size'] . "'"); |
|
2862 | + TrFctMessage(__FILE__, __LINE__, 2, 'Found file '.$v_header['filename'].", size '".$v_header['size']."'"); |
|
2863 | 2863 | |
2864 | 2864 | // ----- Look for filenames to delete |
2865 | 2865 | for ($i = 0, $v_delete_file = false; ($i < count($p_file_list)) && (!$v_delete_file); ++$i) { |
@@ -2867,12 +2867,12 @@ discard block |
||
2867 | 2867 | // if ($p_file_list[$i] == $v_header['filename']) |
2868 | 2868 | if (($v_len = strcmp($p_file_list[$i], $v_header['filename'])) <= 0) { |
2869 | 2869 | if ($v_len == 0) { |
2870 | - TrFctMessage(__FILE__, __LINE__, 3, 'Found that ' . $v_header['filename'] . ' need to be deleted'); |
|
2870 | + TrFctMessage(__FILE__, __LINE__, 3, 'Found that '.$v_header['filename'].' need to be deleted'); |
|
2871 | 2871 | $v_delete_file = true; |
2872 | 2872 | } else { |
2873 | - TrFctMessage(__FILE__, __LINE__, 3, 'Look if ' . $v_header['filename'] . " is a file in $p_file_list[$i]"); |
|
2873 | + TrFctMessage(__FILE__, __LINE__, 3, 'Look if '.$v_header['filename']." is a file in $p_file_list[$i]"); |
|
2874 | 2874 | if (substr($v_header['filename'], strlen($p_file_list[$i]), 1) === '/') { |
2875 | - TrFctMessage(__FILE__, __LINE__, 3, '' . $v_header['filename'] . " is a file in $p_file_list[$i]"); |
|
2875 | + TrFctMessage(__FILE__, __LINE__, 3, ''.$v_header['filename']." is a file in $p_file_list[$i]"); |
|
2876 | 2876 | $v_delete_file = true; |
2877 | 2877 | } |
2878 | 2878 | } |
@@ -2881,7 +2881,7 @@ discard block |
||
2881 | 2881 | |
2882 | 2882 | // ----- Copy files that do not need to be deleted |
2883 | 2883 | if (!$v_delete_file) { |
2884 | - TrFctMessage(__FILE__, __LINE__, 2, 'Keep file ' . $v_header['filename'] . ''); |
|
2884 | + TrFctMessage(__FILE__, __LINE__, 2, 'Keep file '.$v_header['filename'].''); |
|
2885 | 2885 | |
2886 | 2886 | // ----- Write the file header |
2887 | 2887 | if ($p_tar_mode === 'tar') { |
@@ -2893,7 +2893,7 @@ discard block |
||
2893 | 2893 | // ----- Write the file data |
2894 | 2894 | $n = ceil($v_header['size'] / 512); |
2895 | 2895 | for ($i = 0; $i < $n; ++$i) { |
2896 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number ' . ($i + 1)); |
|
2896 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number '.($i + 1)); |
|
2897 | 2897 | if ($p_tar_mode === 'tar') { |
2898 | 2898 | $v_content = fread($v_tar, 512); |
2899 | 2899 | fwrite($v_temp_tar, $v_content, 512); |
@@ -2904,7 +2904,7 @@ discard block |
||
2904 | 2904 | } |
2905 | 2905 | |
2906 | 2906 | // ----- File name and properties are logged if listing mode or file is extracted |
2907 | - TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file ' . $v_header['filename'] . ''); |
|
2907 | + TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file '.$v_header['filename'].''); |
|
2908 | 2908 | |
2909 | 2909 | // ----- Add the array describing the file into the list |
2910 | 2910 | $p_list_detail[$v_nb] = $v_header; |
@@ -2915,8 +2915,8 @@ discard block |
||
2915 | 2915 | } // ----- Look for file that is to be deleted |
2916 | 2916 | else { |
2917 | 2917 | // ----- Trace |
2918 | - TrFctMessage(__FILE__, __LINE__, 2, 'Start deletion of ' . $v_header['filename'] . ''); |
|
2919 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2918 | + TrFctMessage(__FILE__, __LINE__, 2, 'Start deletion of '.$v_header['filename'].''); |
|
2919 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position avant jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2920 | 2920 | |
2921 | 2921 | // ----- Jump to next file |
2922 | 2922 | if ($p_tar_mode === 'tar') { |
@@ -2925,7 +2925,7 @@ discard block |
||
2925 | 2925 | gzseek($v_tar, gztell($v_tar) + (ceil($v_header['size'] / 512) * 512)); |
2926 | 2926 | } |
2927 | 2927 | |
2928 | - TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump [' . ($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)) . ']'); |
|
2928 | + TrFctMessage(__FILE__, __LINE__, 4, 'Position après jump ['.($p_tar_mode === 'tar' ? ftell($v_tar) : gztell($v_tar)).']'); |
|
2929 | 2929 | } |
2930 | 2930 | |
2931 | 2931 | // ----- Look for end of file |
@@ -3011,7 +3011,7 @@ discard block |
||
3011 | 3011 | } |
3012 | 3012 | |
3013 | 3013 | // ----- Open a temporary file in write mode |
3014 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
3014 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
3015 | 3015 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
3016 | 3016 | if (($v_temp_tar = @fopen($v_temp_tarname, 'wb')) == 0) { |
3017 | 3017 | // ----- Close tar file |
@@ -3040,7 +3040,7 @@ discard block |
||
3040 | 3040 | } |
3041 | 3041 | |
3042 | 3042 | // ----- Open a temporary file in write mode |
3043 | - $v_temp_tarname = uniqid('pcltar-', true) . '.tmp'; |
|
3043 | + $v_temp_tarname = uniqid('pcltar-', true).'.tmp'; |
|
3044 | 3044 | TrFctMessage(__FILE__, __LINE__, 2, "Creating temporary archive file $v_temp_tarname"); |
3045 | 3045 | if (($v_temp_tar = @gzopen($v_temp_tarname, 'wb')) == 0) { |
3046 | 3046 | // ----- Close tar file |
@@ -3075,9 +3075,9 @@ discard block |
||
3075 | 3075 | } |
3076 | 3076 | if ($p_add_dir != '') { |
3077 | 3077 | if (substr($p_add_dir, -1) === '/') { |
3078 | - $v_stored_list[$i] = $p_add_dir . $v_stored_list[$i]; |
|
3078 | + $v_stored_list[$i] = $p_add_dir.$v_stored_list[$i]; |
|
3079 | 3079 | } else { |
3080 | - $v_stored_list[$i] = $p_add_dir . '/' . $v_stored_list[$i]; |
|
3080 | + $v_stored_list[$i] = $p_add_dir.'/'.$v_stored_list[$i]; |
|
3081 | 3081 | } |
3082 | 3082 | TrFctMessage(__FILE__, __LINE__, 3, "Add path '$p_add_dir' in file '$p_file_list[$i]' = '$v_stored_list[$i]'"); |
3083 | 3083 | } |
@@ -3132,7 +3132,7 @@ discard block |
||
3132 | 3132 | continue; |
3133 | 3133 | } |
3134 | 3134 | |
3135 | - TrFctMessage(__FILE__, __LINE__, 2, 'Found file ' . $v_header['filename'] . ", size '" . $v_header['size'] . "'"); |
|
3135 | + TrFctMessage(__FILE__, __LINE__, 2, 'Found file '.$v_header['filename'].", size '".$v_header['size']."'"); |
|
3136 | 3136 | |
3137 | 3137 | // ----- Look for filenames to update |
3138 | 3138 | for ($i = 0, $v_update_file = false, $v_found_file = false; ($i < count($v_stored_list)) && (!$v_update_file); ++$i) { |
@@ -3141,8 +3141,8 @@ discard block |
||
3141 | 3141 | // ----- Compare the file names |
3142 | 3142 | if ($v_stored_list[$i] == $v_header['filename']) { |
3143 | 3143 | TrFctMessage(__FILE__, __LINE__, 3, "File '$v_stored_list[$i]' is present in archive"); |
3144 | - TrFctMessage(__FILE__, __LINE__, 3, "File '$v_stored_list[$i]' mtime=" . filemtime($p_file_list[$i]) . ' ' . date('l dS of F Y h:i:s A', filemtime($p_file_list[$i]))); |
|
3145 | - TrFctMessage(__FILE__, __LINE__, 3, 'Archived mtime=' . $v_header['mtime'] . ' ' . date('l dS of F Y h:i:s A', $v_header['mtime'])); |
|
3144 | + TrFctMessage(__FILE__, __LINE__, 3, "File '$v_stored_list[$i]' mtime=".filemtime($p_file_list[$i]).' '.date('l dS of F Y h:i:s A', filemtime($p_file_list[$i]))); |
|
3145 | + TrFctMessage(__FILE__, __LINE__, 3, 'Archived mtime='.$v_header['mtime'].' '.date('l dS of F Y h:i:s A', $v_header['mtime'])); |
|
3146 | 3146 | |
3147 | 3147 | // ----- Store found informations |
3148 | 3148 | $v_found_file = true; |
@@ -3160,13 +3160,13 @@ discard block |
||
3160 | 3160 | // ----- Flag the name in order not to add the file at the end |
3161 | 3161 | $v_found_list[$i] = 1; |
3162 | 3162 | } else { |
3163 | - TrFctMessage(__FILE__, __LINE__, 4, "File '$p_file_list[$i]' is not " . $v_header['filename'] . ''); |
|
3163 | + TrFctMessage(__FILE__, __LINE__, 4, "File '$p_file_list[$i]' is not ".$v_header['filename'].''); |
|
3164 | 3164 | } |
3165 | 3165 | } |
3166 | 3166 | |
3167 | 3167 | // ----- Copy files that do not need to be updated |
3168 | 3168 | if (!$v_update_file) { |
3169 | - TrFctMessage(__FILE__, __LINE__, 2, 'Keep file ' . $v_header['filename'] . ''); |
|
3169 | + TrFctMessage(__FILE__, __LINE__, 2, 'Keep file '.$v_header['filename'].''); |
|
3170 | 3170 | |
3171 | 3171 | // ----- Write the file header |
3172 | 3172 | if ($p_tar_mode === 'tar') { |
@@ -3178,7 +3178,7 @@ discard block |
||
3178 | 3178 | // ----- Write the file data |
3179 | 3179 | $n = ceil($v_header['size'] / 512); |
3180 | 3180 | for ($j = 0; $j < $n; ++$j) { |
3181 | - TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number ' . ($j + 1)); |
|
3181 | + TrFctMessage(__FILE__, __LINE__, 3, 'Read complete 512 bytes block number '.($j + 1)); |
|
3182 | 3182 | if ($p_tar_mode === 'tar') { |
3183 | 3183 | $v_content = fread($v_tar, 512); |
3184 | 3184 | fwrite($v_temp_tar, $v_content, 512); |
@@ -3189,7 +3189,7 @@ discard block |
||
3189 | 3189 | } |
3190 | 3190 | |
3191 | 3191 | // ----- File name and properties are logged if listing mode or file is extracted |
3192 | - TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file ' . $v_header['filename'] . ''); |
|
3192 | + TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file '.$v_header['filename'].''); |
|
3193 | 3193 | |
3194 | 3194 | // ----- Add the array describing the file into the list |
3195 | 3195 | $p_list_detail[$v_nb] = $v_header; |
@@ -3224,7 +3224,7 @@ discard block |
||
3224 | 3224 | } |
3225 | 3225 | |
3226 | 3226 | // ----- Trace |
3227 | - TrFctMessage(__FILE__, __LINE__, 2, 'Skip old file ' . $v_header['filename'] . ''); |
|
3227 | + TrFctMessage(__FILE__, __LINE__, 2, 'Skip old file '.$v_header['filename'].''); |
|
3228 | 3228 | |
3229 | 3229 | // ----- Jump to next file |
3230 | 3230 | if ($p_tar_mode === 'tar') { |
@@ -3361,10 +3361,10 @@ discard block |
||
3361 | 3361 | if (strlen($v_binary_data) != 512) { |
3362 | 3362 | $v_header['filename'] = ''; |
3363 | 3363 | $v_header['status'] = 'invalid_header'; |
3364 | - TrFctMessage(__FILE__, __LINE__, 2, 'Invalid block size : ' . strlen($v_binary_data)); |
|
3364 | + TrFctMessage(__FILE__, __LINE__, 2, 'Invalid block size : '.strlen($v_binary_data)); |
|
3365 | 3365 | |
3366 | 3366 | // ----- Error log |
3367 | - PclErrorLog(-10, 'Invalid block size : ' . strlen($v_binary_data)); |
|
3367 | + PclErrorLog(-10, 'Invalid block size : '.strlen($v_binary_data)); |
|
3368 | 3368 | |
3369 | 3369 | // ----- Return |
3370 | 3370 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -3394,9 +3394,9 @@ discard block |
||
3394 | 3394 | |
3395 | 3395 | // ----- Extract the checksum for check |
3396 | 3396 | $v_header['checksum'] = octdec(trim($v_data['checksum'])); |
3397 | - TrFctMessage(__FILE__, __LINE__, 3, 'File checksum : ' . $v_header['checksum'] . ''); |
|
3397 | + TrFctMessage(__FILE__, __LINE__, 3, 'File checksum : '.$v_header['checksum'].''); |
|
3398 | 3398 | if ($v_header['checksum'] != $v_checksum) { |
3399 | - TrFctMessage(__FILE__, __LINE__, 2, "File checksum is invalid : $v_checksum calculated, " . $v_header['checksum'] . ' expected'); |
|
3399 | + TrFctMessage(__FILE__, __LINE__, 2, "File checksum is invalid : $v_checksum calculated, ".$v_header['checksum'].' expected'); |
|
3400 | 3400 | |
3401 | 3401 | $v_header['filename'] = ''; |
3402 | 3402 | $v_header['status'] = 'invalid_header'; |
@@ -3411,7 +3411,7 @@ discard block |
||
3411 | 3411 | } |
3412 | 3412 | |
3413 | 3413 | // ----- Error log |
3414 | - PclErrorLog(-13, "Invalid checksum : $v_checksum calculated, " . $v_header['checksum'] . ' expected'); |
|
3414 | + PclErrorLog(-13, "Invalid checksum : $v_checksum calculated, ".$v_header['checksum'].' expected'); |
|
3415 | 3415 | |
3416 | 3416 | // ----- Return |
3417 | 3417 | TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); |
@@ -3422,22 +3422,22 @@ discard block |
||
3422 | 3422 | |
3423 | 3423 | // ----- Extract the properties |
3424 | 3424 | $v_header['filename'] = trim($v_data['filename']); |
3425 | - TrFctMessage(__FILE__, __LINE__, 2, 'Name : ' . $v_header['filename'] . ''); |
|
3425 | + TrFctMessage(__FILE__, __LINE__, 2, 'Name : '.$v_header['filename'].''); |
|
3426 | 3426 | $v_header['mode'] = octdec(trim($v_data['mode'])); |
3427 | - TrFctMessage(__FILE__, __LINE__, 2, "Mode : '" . decoct($v_header['mode']) . "'"); |
|
3427 | + TrFctMessage(__FILE__, __LINE__, 2, "Mode : '".decoct($v_header['mode'])."'"); |
|
3428 | 3428 | $v_header['uid'] = octdec(trim($v_data['uid'])); |
3429 | - TrFctMessage(__FILE__, __LINE__, 2, "Uid : '" . $v_header['uid'] . "'"); |
|
3429 | + TrFctMessage(__FILE__, __LINE__, 2, "Uid : '".$v_header['uid']."'"); |
|
3430 | 3430 | $v_header['gid'] = octdec(trim($v_data['gid'])); |
3431 | - TrFctMessage(__FILE__, __LINE__, 2, "Gid : '" . $v_header['gid'] . "'"); |
|
3431 | + TrFctMessage(__FILE__, __LINE__, 2, "Gid : '".$v_header['gid']."'"); |
|
3432 | 3432 | $v_header['size'] = octdec(trim($v_data['size'])); |
3433 | - TrFctMessage(__FILE__, __LINE__, 2, "Size : '" . $v_header['size'] . "'"); |
|
3433 | + TrFctMessage(__FILE__, __LINE__, 2, "Size : '".$v_header['size']."'"); |
|
3434 | 3434 | $v_header['mtime'] = octdec(trim($v_data['mtime'])); |
3435 | - TrFctMessage(__FILE__, __LINE__, 2, 'Date : ' . date('l dS of F Y h:i:s A', $v_header['mtime'])); |
|
3435 | + TrFctMessage(__FILE__, __LINE__, 2, 'Date : '.date('l dS of F Y h:i:s A', $v_header['mtime'])); |
|
3436 | 3436 | if (($v_header['typeflag'] = $v_data['typeflag']) == '5') { |
3437 | 3437 | $v_header['size'] = 0; |
3438 | - TrFctMessage(__FILE__, __LINE__, 2, "Size (folder) : '" . $v_header['size'] . "'"); |
|
3438 | + TrFctMessage(__FILE__, __LINE__, 2, "Size (folder) : '".$v_header['size']."'"); |
|
3439 | 3439 | } |
3440 | - TrFctMessage(__FILE__, __LINE__, 2, 'File typeflag : ' . $v_header['typeflag'] . ''); |
|
3440 | + TrFctMessage(__FILE__, __LINE__, 2, 'File typeflag : '.$v_header['typeflag'].''); |
|
3441 | 3441 | /* ----- All these fields are removed form the header because they do not carry interesting info |
3442 | 3442 | $v_header[link] = trim($v_data[link]); |
3443 | 3443 | TrFctMessage(__FILE__, __LINE__, 2, "Linkname : $v_header[linkname]"); |
@@ -3617,7 +3617,7 @@ discard block |
||
3617 | 3617 | // ----- Ignore only the double '//' in path, |
3618 | 3618 | // but not the first and last '/' |
3619 | 3619 | } else { |
3620 | - $v_result = $v_list[$i] . ($i != (count($v_list) - 1) ? '/' . $v_result : ''); |
|
3620 | + $v_result = $v_list[$i].($i != (count($v_list) - 1) ? '/'.$v_result : ''); |
|
3621 | 3621 | } |
3622 | 3622 | } |
3623 | 3623 | } |