@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | if ((!defined('XOOPS_ROOT_PATH')) || !($GLOBALS['xoopsUser'] instanceof XoopsUser) |
22 | 22 | || !$GLOBALS['xoopsUser']->IsAdmin()) { |
23 | - exit('Restricted access' . PHP_EOL); |
|
23 | + exit('Restricted access'.PHP_EOL); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | return true; |
75 | 75 | } |
76 | 76 | |
77 | - $fld = XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname') . '/versions/'; |
|
77 | + $fld = XOOPS_ROOT_PATH.'/modules/'.$module->getVar('dirname').'/versions/'; |
|
78 | 78 | $cls = 'extcal_%1$s'; |
79 | 79 | |
80 | 80 | $version = [ |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | foreach ($version as $key => $val) { |
94 | 94 | if ($previousVersion < $val) { |
95 | 95 | $name = sprintf($cls, $key); |
96 | - $f = $fld . $name . '.php'; |
|
96 | + $f = $fld.$name.'.php'; |
|
97 | 97 | //ext_echo ("<hr>{$f}<hr>"); |
98 | 98 | if (is_readable($f)) { |
99 | 99 | echo "mise à jour version : {$key} = {$val}<br>"; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | } |
104 | 104 | } |
105 | 105 | |
106 | - $capsDirName = strtoupper($moduleDirName); |
|
106 | + $capsDirName = strtoupper($moduleDirName); |
|
107 | 107 | |
108 | 108 | /** @var Extcal\Helper $helper */ |
109 | 109 | /** @var Extcal\Utility $utility */ |
@@ -117,14 +117,14 @@ discard block |
||
117 | 117 | //delete old HTML templates |
118 | 118 | if (count($configurator['templateFolders']) > 0) { |
119 | 119 | foreach ($configurator['templateFolders'] as $folder) { |
120 | - $templateFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $folder); |
|
120 | + $templateFolder = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$folder); |
|
121 | 121 | if (is_dir($templateFolder)) { |
122 | 122 | $templateList = array_diff(scandir($templateFolder, SCANDIR_SORT_NONE), ['..', '.']); |
123 | 123 | foreach ($templateList as $k => $v) { |
124 | - $fileInfo = new SplFileInfo($templateFolder . $v); |
|
124 | + $fileInfo = new SplFileInfo($templateFolder.$v); |
|
125 | 125 | if ('html' === $fileInfo->getExtension() && 'index.html' !== $fileInfo->getFilename()) { |
126 | - if (file_exists($templateFolder . $v)) { |
|
127 | - unlink($templateFolder . $v); |
|
126 | + if (file_exists($templateFolder.$v)) { |
|
127 | + unlink($templateFolder.$v); |
|
128 | 128 | } |
129 | 129 | } |
130 | 130 | } |
@@ -134,9 +134,9 @@ discard block |
||
134 | 134 | |
135 | 135 | // --- COPY blank.png FILES --------------- |
136 | 136 | if (count($configurator['copyFiles']) > 0) { |
137 | - $file = __DIR__ . '/../assets/images/blank.png'; |
|
137 | + $file = __DIR__.'/../assets/images/blank.png'; |
|
138 | 138 | foreach (array_keys($configurator['copyFiles']) as $i) { |
139 | - $dest = $configurator['copyFiles'][$i] . '/blank.png'; |
|
139 | + $dest = $configurator['copyFiles'][$i].'/blank.png'; |
|
140 | 140 | $utilityClass::copyFile($file, $dest); |
141 | 141 | } |
142 | 142 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | if (count($configurator['oldFiles']) > 0) { |
146 | 146 | // foreach (array_keys($GLOBALS['uploadFolders']) as $i) { |
147 | 147 | foreach (array_keys($configurator['oldFiles']) as $i) { |
148 | - $tempFile = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator['oldFiles'][$i]); |
|
148 | + $tempFile = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator['oldFiles'][$i]); |
|
149 | 149 | if (is_file($tempFile)) { |
150 | 150 | unlink($tempFile); |
151 | 151 | } |
@@ -155,14 +155,14 @@ discard block |
||
155 | 155 | //--------------------- |
156 | 156 | |
157 | 157 | //delete .html entries from the tpl table |
158 | - $sql = 'DELETE FROM ' . $xoopsDB->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'"; |
|
158 | + $sql = 'DELETE FROM '.$xoopsDB->prefix('tplfile')." WHERE `tpl_module` = '".$module->getVar('dirname', 'n')."' AND `tpl_file` LIKE '%.html%'"; |
|
159 | 159 | $xoopsDB->queryF($sql); |
160 | 160 | |
161 | 161 | // Load class XoopsFile ==================== |
162 | 162 | xoops_load('XoopsFile'); |
163 | 163 | |
164 | 164 | //delete /images directory ============ |
165 | - $imagesDirectory = $GLOBALS['xoops']->path('modules/' . $module->getVar('dirname', 'n') . '/images/'); |
|
165 | + $imagesDirectory = $GLOBALS['xoops']->path('modules/'.$module->getVar('dirname', 'n').'/images/'); |
|
166 | 166 | $folderHandler = \XoopsFile::getHandler('folder', $imagesDirectory); |
167 | 167 | $folderHandler->delete($imagesDirectory); |
168 | 168 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | */ |
19 | 19 | |
20 | 20 | use XoopsModules\Extcal; |
21 | -include __DIR__ . '/../preloads/autoloader.php'; |
|
21 | +include __DIR__.'/../preloads/autoloader.php'; |
|
22 | 22 | |
23 | 23 | |
24 | 24 | $moduleDirName = basename(dirname(__DIR__)); |
@@ -40,23 +40,23 @@ discard block |
||
40 | 40 | ///** @var \XoopsPersistableObjectHandler $extcal_brokenHandler */ |
41 | 41 | //$extcal_brokenHandler = new Extcal\Extcal_brokenHandler($db); |
42 | 42 | |
43 | -if (!defined($moduleDirNameUpper . '_CONSTANTS_DEFINED')) { |
|
44 | - define($moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__))); |
|
45 | - define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/'); |
|
46 | - define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/'); |
|
47 | - define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . $moduleDirName . '/'); |
|
48 | - define($moduleDirNameUpper . '_IMAGES_URL', constant($moduleDirNameUpper . '_URL') . '/assets/images/'); |
|
49 | - define($moduleDirNameUpper . '_IMAGES_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/assets/images/'); |
|
50 | - define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin/'); |
|
51 | - define($moduleDirNameUpper . '_ADMIN_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/admin/'); |
|
52 | - define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php'); |
|
53 | - define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png'); |
|
54 | - define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash |
|
55 | - define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash |
|
56 | - define($moduleDirNameUpper . '_CAT_IMAGES_URL', XOOPS_UPLOAD_URL . ' / ' . constant($moduleDirNameUpper . '_DIRNAME') . '/images/category'); |
|
57 | - define($moduleDirNameUpper . '_CAT_IMAGES_PATH', XOOPS_UPLOAD_PATH . '/' . constant($moduleDirNameUpper . '_DIRNAME') . ' / images / category'); |
|
58 | - define($moduleDirNameUpper . '_CACHE_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/'); |
|
59 | - define($moduleDirNameUpper . '_CONSTANTS_DEFINED', 1); |
|
43 | +if (!defined($moduleDirNameUpper.'_CONSTANTS_DEFINED')) { |
|
44 | + define($moduleDirNameUpper.'_DIRNAME', basename(dirname(__DIR__))); |
|
45 | + define($moduleDirNameUpper.'_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/'); |
|
46 | + define($moduleDirNameUpper.'_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/'); |
|
47 | + define($moduleDirNameUpper.'_URL', XOOPS_URL.'/modules/'.$moduleDirName.'/'); |
|
48 | + define($moduleDirNameUpper.'_IMAGES_URL', constant($moduleDirNameUpper.'_URL').'/assets/images/'); |
|
49 | + define($moduleDirNameUpper.'_IMAGES_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/assets/images/'); |
|
50 | + define($moduleDirNameUpper.'_ADMIN_URL', constant($moduleDirNameUpper.'_URL').'/admin/'); |
|
51 | + define($moduleDirNameUpper.'_ADMIN_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/admin/'); |
|
52 | + define($moduleDirNameUpper.'_ADMIN', constant($moduleDirNameUpper.'_URL').'/admin/index.php'); |
|
53 | + define($moduleDirNameUpper.'_AUTHOR_LOGOIMG', constant($moduleDirNameUpper.'_URL').'/assets/images/logoModule.png'); |
|
54 | + define($moduleDirNameUpper.'_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.$moduleDirName); // WITHOUT Trailing slash |
|
55 | + define($moduleDirNameUpper.'_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.$moduleDirName); // WITHOUT Trailing slash |
|
56 | + define($moduleDirNameUpper.'_CAT_IMAGES_URL', XOOPS_UPLOAD_URL.' / '.constant($moduleDirNameUpper.'_DIRNAME').'/images/category'); |
|
57 | + define($moduleDirNameUpper.'_CAT_IMAGES_PATH', XOOPS_UPLOAD_PATH.'/'.constant($moduleDirNameUpper.'_DIRNAME').' / images / category'); |
|
58 | + define($moduleDirNameUpper.'_CACHE_PATH', XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/'); |
|
59 | + define($moduleDirNameUpper.'_CONSTANTS_DEFINED', 1); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | |
@@ -66,15 +66,15 @@ discard block |
||
66 | 66 | //$pathModIcon32 = $helper->getModule()->getInfo('modicons32'); |
67 | 67 | |
68 | 68 | $icons = [ |
69 | - 'edit' => "<img src='" . $pathIcon16 . "/edit.png' alt=" . _EDIT . "' align='middle'>", |
|
70 | - 'delete' => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _DELETE . "' align='middle'>", |
|
71 | - 'clone' => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _CLONE . "' align='middle'>", |
|
72 | - 'preview' => "<img src='" . $pathIcon16 . "/view.png' alt='" . _PREVIEW . "' align='middle'>", |
|
73 | - 'print' => "<img src='" . $pathIcon16 . "/printer.png' alt='" . _CLONE . "' align='middle'>", |
|
74 | - 'pdf' => "<img src='" . $pathIcon16 . "/pdf.png' alt='" . _CLONE . "' align='middle'>", |
|
75 | - 'add' => "<img src='" . $pathIcon16 . "/add.png' alt='" . _ADD . "' align='middle'>", |
|
76 | - '0' => "<img src='" . $pathIcon16 . "/0.png' alt='" . 0 . "' align='middle'>", |
|
77 | - '1' => "<img src='" . $pathIcon16 . "/1.png' alt='" . 1 . "' align='middle'>", |
|
69 | + 'edit' => "<img src='".$pathIcon16."/edit.png' alt="._EDIT."' align='middle'>", |
|
70 | + 'delete' => "<img src='".$pathIcon16."/delete.png' alt='"._DELETE."' align='middle'>", |
|
71 | + 'clone' => "<img src='".$pathIcon16."/editcopy.png' alt='"._CLONE."' align='middle'>", |
|
72 | + 'preview' => "<img src='".$pathIcon16."/view.png' alt='"._PREVIEW."' align='middle'>", |
|
73 | + 'print' => "<img src='".$pathIcon16."/printer.png' alt='"._CLONE."' align='middle'>", |
|
74 | + 'pdf' => "<img src='".$pathIcon16."/pdf.png' alt='"._CLONE."' align='middle'>", |
|
75 | + 'add' => "<img src='".$pathIcon16."/add.png' alt='"._ADD."' align='middle'>", |
|
76 | + '0' => "<img src='".$pathIcon16."/0.png' alt='".0."' align='middle'>", |
|
77 | + '1' => "<img src='".$pathIcon16."/1.png' alt='".1."' align='middle'>", |
|
78 | 78 | ]; |
79 | 79 | |
80 | 80 | $debug = false; |
@@ -87,12 +87,12 @@ discard block |
||
87 | 87 | $GLOBALS['xoopsTpl'] = new \XoopsTpl(); |
88 | 88 | } |
89 | 89 | |
90 | -$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL . '/modules/' . $moduleDirName); |
|
90 | +$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL.'/modules/'.$moduleDirName); |
|
91 | 91 | // Local icons path |
92 | 92 | if (is_object($helper->getModule())) { |
93 | 93 | $pathModIcon16 = $helper->getModule()->getInfo('modicons16'); |
94 | 94 | $pathModIcon32 = $helper->getModule()->getInfo('modicons32'); |
95 | 95 | |
96 | - $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . $pathModIcon16); |
|
96 | + $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL.'/modules/'.$moduleDirName.'/'.$pathModIcon16); |
|
97 | 97 | $GLOBALS['xoopsTpl']->assign('pathModIcon32', $pathModIcon32); |
98 | 98 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $eventHandler = Extcal\Helper::getInstance()->getHandler(_EXTCAL_CLN_EVENT); |
22 | 22 | $event = $eventHandler->getEvent($itemId, 0, true); |
23 | 23 | $item['name'] = $event->getVar('event_title'); |
24 | - $item['url'] = XOOPS_URL . '/modules/extcal/event.php?event=' . $event->getVar('event_id'); |
|
24 | + $item['url'] = XOOPS_URL.'/modules/extcal/event.php?event='.$event->getVar('event_id'); |
|
25 | 25 | |
26 | 26 | return $item; |
27 | 27 | } |
@@ -22,34 +22,34 @@ discard block |
||
22 | 22 | |
23 | 23 | |
24 | 24 | //Configurator |
25 | -return (object)[ |
|
26 | - 'name' => strtoupper($moduleDirName) . ' Module Configurator', |
|
25 | +return (object) [ |
|
26 | + 'name' => strtoupper($moduleDirName).' Module Configurator', |
|
27 | 27 | 'paths' => [ |
28 | 28 | 'dirname' => $moduleDirName, |
29 | - 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', |
|
30 | - 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, |
|
31 | - 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, |
|
32 | - 'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName, |
|
33 | - 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, |
|
29 | + 'admin' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin', |
|
30 | + 'modPath' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName, |
|
31 | + 'modUrl' => XOOPS_URL.'/modules/'.$moduleDirName, |
|
32 | + 'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName, |
|
33 | + 'uploadUrl' => XOOPS_UPLOAD_URL.'/'.$moduleDirName, |
|
34 | 34 | ], |
35 | 35 | 'uploadFolders' => [ |
36 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName, |
|
37 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/images', |
|
38 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/images/thumbnails' |
|
36 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName, |
|
37 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/images', |
|
38 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/images/thumbnails' |
|
39 | 39 | ], |
40 | 40 | 'copyBlankFiles' => [ |
41 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/images', |
|
42 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/images/thumbnails' |
|
41 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/images', |
|
42 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/images/thumbnails' |
|
43 | 43 | ], |
44 | 44 | |
45 | 45 | 'copyTestFolders' => [ |
46 | 46 | [ |
47 | - XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/testdata/images', |
|
48 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/images', |
|
47 | + XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/testdata/images', |
|
48 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/images', |
|
49 | 49 | ], |
50 | 50 | [ |
51 | - XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/testdata/thumbs', |
|
52 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/thumbs', |
|
51 | + XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/testdata/thumbs', |
|
52 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/thumbs', |
|
53 | 53 | ] |
54 | 54 | ], |
55 | 55 | |
@@ -71,6 +71,6 @@ discard block |
||
71 | 71 | '/images', |
72 | 72 | ], |
73 | 73 | 'modCopyright' => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'> |
74 | - <img src='" . XOOPS_URL . '/modules/' . $moduleDirName . '_AUTHOR_LOGOIMG' . '\' alt=\'XOOPS Project\' /></a>', |
|
74 | + <img src='" . XOOPS_URL.'/modules/'.$moduleDirName.'_AUTHOR_LOGOIMG'.'\' alt=\'XOOPS Project\' /></a>', |
|
75 | 75 | |
76 | 76 | ]; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | function xoops_module_pre_install_extcal(\XoopsModule $module) |
29 | 29 | { |
30 | 30 | $moduleDirName = basename(dirname(__DIR__)); |
31 | - $className = ucfirst($moduleDirName) . 'Utility'; |
|
31 | + $className = ucfirst($moduleDirName).'Utility'; |
|
32 | 32 | if (!class_exists($className)) { |
33 | 33 | xoops_load('utility', $moduleDirName); |
34 | 34 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | $mod_tables = $module->getInfo('tables'); |
46 | 46 | foreach ($mod_tables as $table) { |
47 | - $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' . $GLOBALS['xoopsDB']->prefix($table) . ';'); |
|
47 | + $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS '.$GLOBALS['xoopsDB']->prefix($table).';'); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | return true; |
@@ -73,21 +73,21 @@ discard block |
||
73 | 73 | */ |
74 | 74 | |
75 | 75 | // Access right |
76 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
77 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 1, XOOPS_GROUP_USERS, $moduleId); |
|
78 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 1, XOOPS_GROUP_ANONYMOUS, $moduleId); |
|
76 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
77 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 1, XOOPS_GROUP_USERS, $moduleId); |
|
78 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 1, XOOPS_GROUP_ANONYMOUS, $moduleId); |
|
79 | 79 | |
80 | 80 | // Can submit |
81 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 2, XOOPS_GROUP_ADMIN, $moduleId); |
|
81 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 2, XOOPS_GROUP_ADMIN, $moduleId); |
|
82 | 82 | |
83 | 83 | // Auto approve |
84 | - $groupPermissionHandler->addRight($moduleDirName . '_perm_mask', 4, XOOPS_GROUP_ADMIN, $moduleId); |
|
84 | + $groupPermissionHandler->addRight($moduleDirName.'_perm_mask', 4, XOOPS_GROUP_ADMIN, $moduleId); |
|
85 | 85 | |
86 | 86 | // $moduleDirName = $xoopsModule->getVar('dirname'); |
87 | - $configurator = include $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/include/config.php'); |
|
87 | + $configurator = include $GLOBALS['xoops']->path('modules/'.$moduleDirName.'/include/config.php'); |
|
88 | 88 | |
89 | 89 | /** @var Extcal\Utility $utilityClass */ |
90 | - $utilityClass = ucfirst($moduleDirName) . 'Utility'; |
|
90 | + $utilityClass = ucfirst($moduleDirName).'Utility'; |
|
91 | 91 | if (!class_exists($utilityClass)) { |
92 | 92 | xoops_load('utility', $moduleDirName); |
93 | 93 | } |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | } |
100 | 100 | } |
101 | 101 | if (count($configurator['copyFiles']) > 0) { |
102 | - $file = __DIR__ . '/../assets/images/blank.png'; |
|
102 | + $file = __DIR__.'/../assets/images/blank.png'; |
|
103 | 103 | foreach (array_keys($configurator['copyFiles']) as $i) { |
104 | - $dest = $configurator['copyFiles'][$i] . '/blank.png'; |
|
104 | + $dest = $configurator['copyFiles'][$i].'/blank.png'; |
|
105 | 105 | $utilityClass::copyFile($file, $dest); |
106 | 106 | } |
107 | 107 | } |
@@ -28,6 +28,6 @@ |
||
28 | 28 | */ |
29 | 29 | public static function eventCoreIncludeCommonEnd($args) |
30 | 30 | { |
31 | - include __DIR__ . '/autoloader.php'; |
|
31 | + include __DIR__.'/autoloader.php'; |
|
32 | 32 | } |
33 | 33 | } |
@@ -3,12 +3,12 @@ discard block |
||
3 | 3 | /** |
4 | 4 | * @see http://www.php-fig.org/psr/psr-4/examples/ |
5 | 5 | */ |
6 | -spl_autoload_register(function ($class) { |
|
6 | +spl_autoload_register(function($class) { |
|
7 | 7 | // project-specific namespace prefix |
8 | - $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__))); |
|
8 | + $prefix = 'XoopsModules\\'.ucfirst(basename(dirname(__DIR__))); |
|
9 | 9 | |
10 | 10 | // base directory for the namespace prefix |
11 | - $base_dir = __DIR__ . '/../class/'; |
|
11 | + $base_dir = __DIR__.'/../class/'; |
|
12 | 12 | |
13 | 13 | // does the class use the namespace prefix? |
14 | 14 | $len = strlen($prefix); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | // replace the namespace prefix with the base directory, replace namespace |
24 | 24 | // separators with directory separators in the relative class name, append |
25 | 25 | // with .php |
26 | - $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
|
26 | + $file = $base_dir.str_replace('\\', '/', $relative_class).'.php'; |
|
27 | 27 | |
28 | 28 | // if the file exists, require it |
29 | 29 | if (file_exists($file)) { |
@@ -21,51 +21,51 @@ |
||
21 | 21 | $moduleDirName = basename(dirname(dirname(__DIR__))); |
22 | 22 | $moduleDirNameUpper = strtoupper($moduleDirName); |
23 | 23 | |
24 | -define('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS', 'GD library support: '); |
|
25 | -define('CO_' . $moduleDirNameUpper . '_GDLIBVERSION', 'GD Library version: '); |
|
26 | -define('CO_' . $moduleDirNameUpper . '_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)"); |
|
27 | -define('CO_' . $moduleDirNameUpper . '_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)"); |
|
28 | -define('CO_' . $moduleDirNameUpper . '_IMAGEINFO', 'Server status'); |
|
29 | -define('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): '); |
|
30 | -define('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): '); |
|
31 | -define('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): '); |
|
32 | -define('CO_' . $moduleDirNameUpper . '_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> "); |
|
33 | -define('CO_' . $moduleDirNameUpper . '_OFF', "<span style='font-weight: bold;'>OFF</span>"); |
|
34 | -define('CO_' . $moduleDirNameUpper . '_ON', "<span style='font-weight: bold;'>ON</span>"); |
|
35 | -define('CO_' . $moduleDirNameUpper . '_SERVERPATH', 'Server path to XOOPS root: '); |
|
36 | -define('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS', 'Server uploads status: '); |
|
37 | -define('CO_' . $moduleDirNameUpper . '_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>"); |
|
38 | -define('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.'); |
|
24 | +define('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS', 'GD library support: '); |
|
25 | +define('CO_'.$moduleDirNameUpper.'_GDLIBVERSION', 'GD Library version: '); |
|
26 | +define('CO_'.$moduleDirNameUpper.'_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)"); |
|
27 | +define('CO_'.$moduleDirNameUpper.'_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)"); |
|
28 | +define('CO_'.$moduleDirNameUpper.'_IMAGEINFO', 'Server status'); |
|
29 | +define('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): '); |
|
30 | +define('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): '); |
|
31 | +define('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): '); |
|
32 | +define('CO_'.$moduleDirNameUpper.'_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> "); |
|
33 | +define('CO_'.$moduleDirNameUpper.'_OFF', "<span style='font-weight: bold;'>OFF</span>"); |
|
34 | +define('CO_'.$moduleDirNameUpper.'_ON', "<span style='font-weight: bold;'>ON</span>"); |
|
35 | +define('CO_'.$moduleDirNameUpper.'_SERVERPATH', 'Server path to XOOPS root: '); |
|
36 | +define('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS', 'Server uploads status: '); |
|
37 | +define('CO_'.$moduleDirNameUpper.'_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>"); |
|
38 | +define('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.'); |
|
39 | 39 | |
40 | -define('CO_' . $moduleDirNameUpper . '_PRINT', "<span style='font-weight: bold;'>Print</span>"); |
|
41 | -define('CO_' . $moduleDirNameUpper . '_PDF', "<span style='font-weight: bold;'>Create PDF</span>"); |
|
40 | +define('CO_'.$moduleDirNameUpper.'_PRINT', "<span style='font-weight: bold;'>Print</span>"); |
|
41 | +define('CO_'.$moduleDirNameUpper.'_PDF', "<span style='font-weight: bold;'>Create PDF</span>"); |
|
42 | 42 | |
43 | 43 | |
44 | -define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'"); |
|
45 | -define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED1', "Update failed - couldn't add new fields"); |
|
46 | -define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'"); |
|
47 | -define('CO_' . $moduleDirNameUpper . '_ERROR_COLUMN', 'Could not create column in database : %s'); |
|
48 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)'); |
|
49 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)'); |
|
50 | -define('CO_' . $moduleDirNameUpper . '_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module'); |
|
44 | +define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'"); |
|
45 | +define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED1', "Update failed - couldn't add new fields"); |
|
46 | +define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'"); |
|
47 | +define('CO_'.$moduleDirNameUpper.'_ERROR_COLUMN', 'Could not create column in database : %s'); |
|
48 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)'); |
|
49 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)'); |
|
50 | +define('CO_'.$moduleDirNameUpper.'_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module'); |
|
51 | 51 | |
52 | -define('CO_' . $moduleDirNameUpper . '_FOLDERS_DELETED_OK', 'Upload Folders have been deleted'); |
|
52 | +define('CO_'.$moduleDirNameUpper.'_FOLDERS_DELETED_OK', 'Upload Folders have been deleted'); |
|
53 | 53 | |
54 | 54 | // Error Msgs |
55 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH', 'Could not delete %s directory'); |
|
56 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_REMOVE', 'Could not delete %s'); |
|
57 | -define('CO_' . $moduleDirNameUpper . '_ERROR_NO_PLUGIN', 'Could not load plugin'); |
|
55 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH', 'Could not delete %s directory'); |
|
56 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_REMOVE', 'Could not delete %s'); |
|
57 | +define('CO_'.$moduleDirNameUpper.'_ERROR_NO_PLUGIN', 'Could not load plugin'); |
|
58 | 58 | |
59 | 59 | |
60 | 60 | //Help |
61 | -define('CO_' . $moduleDirNameUpper . '_DIRNAME', basename(dirname(dirname(__DIR__)))); |
|
62 | -define('CO_' . $moduleDirNameUpper . '_HELP_HEADER', __DIR__.'/help/helpheader.tpl'); |
|
63 | -define('CO_' . $moduleDirNameUpper . '_BACK_2_ADMIN', 'Back to Administration of '); |
|
64 | -define('CO_' . $moduleDirNameUpper . '_OVERVIEW', 'Overview'); |
|
61 | +define('CO_'.$moduleDirNameUpper.'_DIRNAME', basename(dirname(dirname(__DIR__)))); |
|
62 | +define('CO_'.$moduleDirNameUpper.'_HELP_HEADER', __DIR__.'/help/helpheader.tpl'); |
|
63 | +define('CO_'.$moduleDirNameUpper.'_BACK_2_ADMIN', 'Back to Administration of '); |
|
64 | +define('CO_'.$moduleDirNameUpper.'_OVERVIEW', 'Overview'); |
|
65 | 65 | |
66 | 66 | //define('CO_' . $moduleDirNameUpper . '_HELP_DIR', __DIR__); |
67 | 67 | |
68 | 68 | //help multi-page |
69 | -define('CO_' . $moduleDirNameUpper . '_DISCLAIMER', 'Disclaimer'); |
|
70 | -define('CO_' . $moduleDirNameUpper . '_LICENSE', 'License'); |
|
71 | -define('CO_' . $moduleDirNameUpper . '_SUPPORT', 'Support'); |
|
69 | +define('CO_'.$moduleDirNameUpper.'_DISCLAIMER', 'Disclaimer'); |
|
70 | +define('CO_'.$moduleDirNameUpper.'_LICENSE', 'License'); |
|
71 | +define('CO_'.$moduleDirNameUpper.'_SUPPORT', 'Support'); |
@@ -19,20 +19,20 @@ discard block |
||
19 | 19 | |
20 | 20 | use XoopsModules\Extcal; |
21 | 21 | |
22 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
22 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
23 | 23 | |
24 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
24 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
25 | 25 | |
26 | -require_once __DIR__ . '/include/agenda_fnc.php'; |
|
26 | +require_once __DIR__.'/include/agenda_fnc.php'; |
|
27 | 27 | |
28 | 28 | Extcal\Helper::getInstance()->loadLanguage('modinfo'); |
29 | 29 | |
30 | 30 | //------------------------------------------------------ |
31 | -require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Util/Textual.php'; |
|
32 | -require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Month/Weeks.php'; |
|
33 | -require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Month/Weekdays.php'; |
|
34 | -require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Week.php'; |
|
35 | -require_once _EXTCAL_PEAR_CALENDAR_ROOT . '/Day.php'; |
|
31 | +require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Util/Textual.php'; |
|
32 | +require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Month/Weeks.php'; |
|
33 | +require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Month/Weekdays.php'; |
|
34 | +require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Week.php'; |
|
35 | +require_once _EXTCAL_PEAR_CALENDAR_ROOT.'/Day.php'; |
|
36 | 36 | |
37 | 37 | //------------------------------------------------------ |
38 | 38 | // Getting eXtCal object's handler |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | /** @var xos_opal_Theme $xoTheme */ |
47 | 47 | if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) { |
48 | 48 | include_once $GLOBALS['xoops']->path("/class/theme.php"); |
49 | - $GLOBALS['xoTheme'] = new \Xos_opal_Theme(); |
|
49 | + $GLOBALS['xoTheme'] = new \Xos_opal_Theme(); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | $GLOBALS['xoTheme']->addScript('modules/extcal/include/ToolTips.js'); |