@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | throw new RuntimeException(\sprintf('Unable to create the %s directory', $folder)); |
41 | 41 | } |
42 | 42 | |
43 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
43 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
44 | 44 | } |
45 | 45 | } catch (Exception $e) { |
46 | 46 | echo 'Caught exception: ', $e->getMessage(), "\n", '<br>'; |
@@ -66,14 +66,14 @@ discard block |
||
66 | 66 | $dir = \opendir($src); |
67 | 67 | // @mkdir($dst); |
68 | 68 | if (!@\mkdir($dst) && !\is_dir($dst)) { |
69 | - throw new RuntimeException('The directory ' . $dst . ' could not be created.'); |
|
69 | + throw new RuntimeException('The directory '.$dst.' could not be created.'); |
|
70 | 70 | } |
71 | 71 | while (false !== ($file = \readdir($dir))) { |
72 | 72 | if (('.' !== $file) && ('..' !== $file)) { |
73 | - if (\is_dir($src . '/' . $file)) { |
|
74 | - self::recurseCopy($src . '/' . $file, $dst . '/' . $file); |
|
73 | + if (\is_dir($src.'/'.$file)) { |
|
74 | + self::recurseCopy($src.'/'.$file, $dst.'/'.$file); |
|
75 | 75 | } else { |
76 | - \copy($src . '/' . $file, $dst . '/' . $file); |
|
76 | + \copy($src.'/'.$file, $dst.'/'.$file); |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | self::rrmdir($fObj->getPathname()); |
164 | 164 | } |
165 | 165 | } |
166 | - $iterator = null; // clear iterator Obj to close file/directory |
|
166 | + $iterator = null; // clear iterator Obj to close file/directory |
|
167 | 167 | return \rmdir($src); // remove the directory & return results |
168 | 168 | } |
169 | 169 | |
@@ -196,14 +196,14 @@ discard block |
||
196 | 196 | $iterator = new DirectoryIterator($src); |
197 | 197 | foreach ($iterator as $fObj) { |
198 | 198 | if ($fObj->isFile()) { |
199 | - \rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
199 | + \rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
200 | 200 | } elseif (!$fObj->isDot() && $fObj->isDir()) { |
201 | 201 | // Try recursively on directory |
202 | - self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
202 | + self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
203 | 203 | // rmdir($fObj->getPath()); // now delete the directory |
204 | 204 | } |
205 | 205 | } |
206 | - $iterator = null; // clear iterator Obj to close file/directory |
|
206 | + $iterator = null; // clear iterator Obj to close file/directory |
|
207 | 207 | return \rmdir($src); // remove the directory & return results |
208 | 208 | } |
209 | 209 | |
@@ -239,9 +239,9 @@ discard block |
||
239 | 239 | $iterator = new DirectoryIterator($src); |
240 | 240 | foreach ($iterator as $fObj) { |
241 | 241 | if ($fObj->isFile()) { |
242 | - \copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
242 | + \copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
243 | 243 | } elseif (!$fObj->isDot() && $fObj->isDir()) { |
244 | - self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
244 | + self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
245 | 245 | } |
246 | 246 | } |
247 | 247 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | public function __construct() |
44 | 44 | { |
45 | - $config = require \dirname(__DIR__, 2) . '/config/config.php'; |
|
45 | + $config = require \dirname(__DIR__, 2).'/config/config.php'; |
|
46 | 46 | |
47 | 47 | $this->name = $config->name; |
48 | 48 | $this->paths = $config->paths; |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | if ($xoopsSuccess && $phpSuccess) { |
39 | 39 | $mod_tables = &$module->getInfo('tables'); |
40 | 40 | foreach ($mod_tables as $table) { |
41 | - $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' . $GLOBALS['xoopsDB']->prefix($table) . ';'); |
|
41 | + $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS '.$GLOBALS['xoopsDB']->prefix($table).';'); |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | function xoops_module_install_contact(\XoopsModule $module) |
55 | 55 | { |
56 | - require dirname(__DIR__, 3) . '/mainfile.php'; |
|
56 | + require dirname(__DIR__, 3).'/mainfile.php'; |
|
57 | 57 | |
58 | 58 | $moduleDirName = \basename(\dirname(__DIR__)); |
59 | 59 | |
@@ -71,11 +71,11 @@ discard block |
||
71 | 71 | /** @var \XoopsGroupPermHandler $grouppermHandler */ |
72 | 72 | $grouppermHandler = xoops_getHandler('groupperm'); |
73 | 73 | // access rights ------------------------------------------ |
74 | - $grouppermHandler->addRight($moduleDirName . '_approve', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
75 | - $grouppermHandler->addRight($moduleDirName . '_submit', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
76 | - $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
77 | - $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_USERS, $moduleId); |
|
78 | - $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ANONYMOUS, $moduleId); |
|
74 | + $grouppermHandler->addRight($moduleDirName.'_approve', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
75 | + $grouppermHandler->addRight($moduleDirName.'_submit', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
76 | + $grouppermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
77 | + $grouppermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_USERS, $moduleId); |
|
78 | + $grouppermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_ANONYMOUS, $moduleId); |
|
79 | 79 | |
80 | 80 | // --- CREATE FOLDERS --------------- |
81 | 81 | if (count($configurator->uploadFolders) > 0) { |
@@ -87,9 +87,9 @@ discard block |
||
87 | 87 | |
88 | 88 | // --- COPY blank.png FILES --------------- |
89 | 89 | if (count($configurator->copyBlankFiles) > 0) { |
90 | - $file = dirname(__DIR__) . '/assets/images/blank.png'; |
|
90 | + $file = dirname(__DIR__).'/assets/images/blank.png'; |
|
91 | 91 | foreach (array_keys($configurator->copyBlankFiles) as $i) { |
92 | - $dest = $configurator->copyBlankFiles[$i] . '/blank.png'; |
|
92 | + $dest = $configurator->copyBlankFiles[$i].'/blank.png'; |
|
93 | 93 | $utility::copyFile($file, $dest); |
94 | 94 | } |
95 | 95 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | if ((!defined('XOOPS_ROOT_PATH')) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser) |
28 | 28 | || !$GLOBALS['xoopsUser']->isAdmin()) { |
29 | - exit('Restricted access' . PHP_EOL); |
|
29 | + exit('Restricted access'.PHP_EOL); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
73 | 73 | |
74 | 74 | if ($previousVersion < 180) { |
75 | - $sql = 'CREATE TABLE ' . $xoopsDB->prefix('contact') . ' ( |
|
75 | + $sql = 'CREATE TABLE '.$xoopsDB->prefix('contact').' ( |
|
76 | 76 | contact_id int(10) unsigned NOT NULL auto_increment, |
77 | 77 | contact_uid int(10) NOT NULL, |
78 | 78 | contact_cid int(10) NOT NULL, |
@@ -97,31 +97,31 @@ discard block |
||
97 | 97 | |
98 | 98 | if ($previousVersion < 181) { |
99 | 99 | // Add contact_platform |
100 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . "` ADD `contact_platform` ENUM('Android','Ios','Web') NOT NULL DEFAULT 'Web'"; |
|
100 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact')."` ADD `contact_platform` ENUM('Android','Ios','Web') NOT NULL DEFAULT 'Web'"; |
|
101 | 101 | $xoopsDB->query($sql); |
102 | 102 | // Add contact_type |
103 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . "` ADD `contact_type` ENUM('Contact','Phone','Mail') NOT NULL DEFAULT 'Contact'"; |
|
103 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact')."` ADD `contact_type` ENUM('Contact','Phone','Mail') NOT NULL DEFAULT 'Contact'"; |
|
104 | 104 | $xoopsDB->query($sql); |
105 | 105 | // Add index contact_uid |
106 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_uid` ( `contact_uid` )'; |
|
106 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_uid` ( `contact_uid` )'; |
|
107 | 107 | $xoopsDB->query($sql); |
108 | 108 | // Add index contact_cid |
109 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_cid` ( `contact_cid` )'; |
|
109 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_cid` ( `contact_cid` )'; |
|
110 | 110 | $xoopsDB->query($sql); |
111 | 111 | // Add index contact_create |
112 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_create` ( `contact_create` )'; |
|
112 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_create` ( `contact_create` )'; |
|
113 | 113 | $xoopsDB->query($sql); |
114 | 114 | // Add index contact_mail |
115 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_mail` ( `contact_mail` )'; |
|
115 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_mail` ( `contact_mail` )'; |
|
116 | 116 | $xoopsDB->query($sql); |
117 | 117 | // Add index contact_phone |
118 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_phone` ( `contact_phone` )'; |
|
118 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_phone` ( `contact_phone` )'; |
|
119 | 119 | $xoopsDB->query($sql); |
120 | 120 | // Add index contact_platform |
121 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_platform` ( `contact_platform` )'; |
|
121 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_platform` ( `contact_platform` )'; |
|
122 | 122 | $xoopsDB->query($sql); |
123 | 123 | // Add index contact_type |
124 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_type` ( `contact_type` )'; |
|
124 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_type` ( `contact_type` )'; |
|
125 | 125 | $xoopsDB->query($sql); |
126 | 126 | } |
127 | 127 | |
@@ -132,14 +132,14 @@ discard block |
||
132 | 132 | //delete old HTML templates |
133 | 133 | if (count($configurator->templateFolders) > 0) { |
134 | 134 | foreach ($configurator->templateFolders as $folder) { |
135 | - $templateFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $folder); |
|
135 | + $templateFolder = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$folder); |
|
136 | 136 | if (is_dir($templateFolder)) { |
137 | 137 | $templateList = array_diff(scandir($templateFolder, SCANDIR_SORT_NONE), ['..', '.']); |
138 | 138 | foreach ($templateList as $k => $v) { |
139 | - $fileInfo = new \SplFileInfo($templateFolder . $v); |
|
139 | + $fileInfo = new \SplFileInfo($templateFolder.$v); |
|
140 | 140 | if ('html' === $fileInfo->getExtension() && 'index.html' !== $fileInfo->getFilename()) { |
141 | - if (is_file($templateFolder . $v)) { |
|
142 | - unlink($templateFolder . $v); |
|
141 | + if (is_file($templateFolder.$v)) { |
|
142 | + unlink($templateFolder.$v); |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | if (count($configurator->oldFiles) > 0) { |
152 | 152 | // foreach (array_keys($GLOBALS['uploadFolders']) as $i) { |
153 | 153 | foreach (array_keys($configurator->oldFiles) as $i) { |
154 | - $tempFile = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFiles[$i]); |
|
154 | + $tempFile = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator->oldFiles[$i]); |
|
155 | 155 | if (is_file($tempFile)) { |
156 | 156 | unlink($tempFile); |
157 | 157 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | if (count($configurator->oldFolders) > 0) { |
164 | 164 | // foreach (array_keys($GLOBALS['uploadFolders']) as $i) { |
165 | 165 | foreach (array_keys($configurator->oldFolders) as $i) { |
166 | - $tempFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFolders[$i]); |
|
166 | + $tempFolder = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator->oldFolders[$i]); |
|
167 | 167 | /* @var XoopsObjectHandler $folderHandler */ |
168 | 168 | $folderHandler = XoopsFile::getHandler('folder', $tempFolder); |
169 | 169 | $folderHandler->delete($tempFolder); |
@@ -180,15 +180,15 @@ discard block |
||
180 | 180 | |
181 | 181 | // --- COPY blank.png FILES --------------- |
182 | 182 | if (count($configurator->copyBlankFiles) > 0) { |
183 | - $file = dirname(__DIR__) . '/assets/images/blank.png'; |
|
183 | + $file = dirname(__DIR__).'/assets/images/blank.png'; |
|
184 | 184 | foreach (array_keys($configurator->copyBlankFiles) as $i) { |
185 | - $dest = $configurator->copyBlankFiles[$i] . '/blank.png'; |
|
185 | + $dest = $configurator->copyBlankFiles[$i].'/blank.png'; |
|
186 | 186 | $utility::copyFile($file, $dest); |
187 | 187 | } |
188 | 188 | } |
189 | 189 | |
190 | 190 | //delete .html entries from the tpl table |
191 | - $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . '\' AND `tpl_file` LIKE \'%.html%\''; |
|
191 | + $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('tplfile')." WHERE `tpl_module` = '".$module->getVar('dirname', 'n').'\' AND `tpl_file` LIKE \'%.html%\''; |
|
192 | 192 | $GLOBALS['xoopsDB']->queryF($sql); |
193 | 193 | |
194 | 194 | /** @var \XoopsGroupPermHandler $grouppermHandler */ |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | |
200 | 200 | if ($previousVersion < 227) { |
201 | 201 | // Add contact_skype |
202 | - $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD `contact_skype` VARCHAR(255) NULL AFTER `contact_icq`'; |
|
202 | + $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD `contact_skype` VARCHAR(255) NULL AFTER `contact_icq`'; |
|
203 | 203 | $xoopsDB->query($sql); |
204 | 204 | } |
205 | 205 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | use Xmf\Module\Admin; |
24 | 24 | use XoopsModules\Contact; |
25 | 25 | |
26 | -require_once dirname(__DIR__) . '/preloads/autoloader.php'; |
|
26 | +require_once dirname(__DIR__).'/preloads/autoloader.php'; |
|
27 | 27 | |
28 | 28 | $moduleDirName = \basename(\dirname(__DIR__)); |
29 | 29 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName |
@@ -42,20 +42,20 @@ discard block |
||
42 | 42 | //$categoryHandler = new Contact\CategoryHandler($db); |
43 | 43 | //$downloadHandler = new Contact\DownloadHandler($db); |
44 | 44 | |
45 | -if (!defined($moduleDirNameUpper . '_CONSTANTS_DEFINED')) { |
|
46 | - define($moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__))); |
|
47 | - define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/'); |
|
48 | - define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/'); |
|
49 | - define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . $moduleDirName . '/'); |
|
50 | - define($moduleDirNameUpper . '_IMAGE_URL', constant($moduleDirNameUpper . '_URL') . '/assets/images/'); |
|
51 | - define($moduleDirNameUpper . '_IMAGE_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/assets/images'); |
|
52 | - define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin/'); |
|
53 | - define($moduleDirNameUpper . '_ADMIN_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/admin/'); |
|
54 | - define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php'); |
|
55 | - define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png'); |
|
56 | - define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash |
|
57 | - define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash |
|
58 | - define($moduleDirNameUpper . '_CONSTANTS_DEFINED', 1); |
|
45 | +if (!defined($moduleDirNameUpper.'_CONSTANTS_DEFINED')) { |
|
46 | + define($moduleDirNameUpper.'_DIRNAME', basename(dirname(__DIR__))); |
|
47 | + define($moduleDirNameUpper.'_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/'); |
|
48 | + define($moduleDirNameUpper.'_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/'); |
|
49 | + define($moduleDirNameUpper.'_URL', XOOPS_URL.'/modules/'.$moduleDirName.'/'); |
|
50 | + define($moduleDirNameUpper.'_IMAGE_URL', constant($moduleDirNameUpper.'_URL').'/assets/images/'); |
|
51 | + define($moduleDirNameUpper.'_IMAGE_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/assets/images'); |
|
52 | + define($moduleDirNameUpper.'_ADMIN_URL', constant($moduleDirNameUpper.'_URL').'/admin/'); |
|
53 | + define($moduleDirNameUpper.'_ADMIN_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/admin/'); |
|
54 | + define($moduleDirNameUpper.'_ADMIN', constant($moduleDirNameUpper.'_URL').'/admin/index.php'); |
|
55 | + define($moduleDirNameUpper.'_AUTHOR_LOGOIMG', constant($moduleDirNameUpper.'_URL').'/assets/images/logoModule.png'); |
|
56 | + define($moduleDirNameUpper.'_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.$moduleDirName); // WITHOUT Trailing slash |
|
57 | + define($moduleDirNameUpper.'_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.$moduleDirName); // WITHOUT Trailing slash |
|
58 | + define($moduleDirNameUpper.'_CONSTANTS_DEFINED', 1); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | $pathIcon16 = Admin::iconUrl('', 16); |
@@ -64,15 +64,15 @@ discard block |
||
64 | 64 | //$pathModIcon32 = $helper->getModule()->getInfo('modicons32'); |
65 | 65 | |
66 | 66 | $icons = [ |
67 | - 'edit' => "<img src='" . $pathIcon16 . "/edit.png' alt=" . _EDIT . "' align='middle'>", |
|
68 | - 'delete' => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _DELETE . "' align='middle'>", |
|
69 | - 'clone' => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _CLONE . "' align='middle'>", |
|
70 | - 'preview' => "<img src='" . $pathIcon16 . "/view.png' alt='" . _PREVIEW . "' align='middle'>", |
|
71 | - 'print' => "<img src='" . $pathIcon16 . "/printer.png' alt='" . _CLONE . "' align='middle'>", |
|
72 | - 'pdf' => "<img src='" . $pathIcon16 . "/pdf.png' alt='" . _CLONE . "' align='middle'>", |
|
73 | - 'add' => "<img src='" . $pathIcon16 . "/add.png' alt='" . _ADD . "' align='middle'>", |
|
74 | - '0' => "<img src='" . $pathIcon16 . "/0.png' alt='" . 0 . "' align='middle'>", |
|
75 | - '1' => "<img src='" . $pathIcon16 . "/1.png' alt='" . 1 . "' align='middle'>", |
|
67 | + 'edit' => "<img src='".$pathIcon16."/edit.png' alt="._EDIT."' align='middle'>", |
|
68 | + 'delete' => "<img src='".$pathIcon16."/delete.png' alt='"._DELETE."' align='middle'>", |
|
69 | + 'clone' => "<img src='".$pathIcon16."/editcopy.png' alt='"._CLONE."' align='middle'>", |
|
70 | + 'preview' => "<img src='".$pathIcon16."/view.png' alt='"._PREVIEW."' align='middle'>", |
|
71 | + 'print' => "<img src='".$pathIcon16."/printer.png' alt='"._CLONE."' align='middle'>", |
|
72 | + 'pdf' => "<img src='".$pathIcon16."/pdf.png' alt='"._CLONE."' align='middle'>", |
|
73 | + 'add' => "<img src='".$pathIcon16."/add.png' alt='"._ADD."' align='middle'>", |
|
74 | + '0' => "<img src='".$pathIcon16."/0.png' alt='".0."' align='middle'>", |
|
75 | + '1' => "<img src='".$pathIcon16."/1.png' alt='".1."' align='middle'>", |
|
76 | 76 | ]; |
77 | 77 | |
78 | 78 | $debug = false; |
@@ -85,13 +85,13 @@ discard block |
||
85 | 85 | $GLOBALS['xoopsTpl'] = new \XoopsTpl(); |
86 | 86 | } |
87 | 87 | |
88 | -$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL . '/modules/' . $moduleDirName); |
|
88 | +$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL.'/modules/'.$moduleDirName); |
|
89 | 89 | // Local icons path |
90 | 90 | if (is_object($helper->getModule())) { |
91 | 91 | $pathModIcon16 = $helper->getModule()->getInfo('modicons16'); |
92 | 92 | $pathModIcon32 = $helper->getModule()->getInfo('modicons32'); |
93 | 93 | |
94 | - $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . $pathModIcon16); |
|
94 | + $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL.'/modules/'.$moduleDirName.'/'.$pathModIcon16); |
|
95 | 95 | $GLOBALS['xoopsTpl']->assign('pathModIcon32', $pathModIcon32); |
96 | 96 | } |
97 | 97 |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | }; |
27 | 27 | /** @var ContactHandler $contactHandler */ |
28 | 28 | |
29 | -require_once __DIR__ . '/header.php'; |
|
29 | +require_once __DIR__.'/header.php'; |
|
30 | 30 | $GLOBALS['xoopsOption']['template_main'] = 'contact_index.tpl'; |
31 | 31 | //unset($_SESSION); |
32 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
32 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
33 | 33 | |
34 | 34 | $helper = Helper::getInstance(); |
35 | 35 | /** reCaptcha by google **/ |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | if (!$captcha && $helper->getConfig('recaptchause')) { |
47 | 47 | redirect_header('index.php', 2, _MD_CONTACT_MES_NOCAPTCHA); |
48 | 48 | } else { |
49 | - $response = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . $helper->getConfig('recaptchakey') . '&response=' . $captcha . '&remoteip=' . $_SERVER['REMOTE_ADDR']); |
|
49 | + $response = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$helper->getConfig('recaptchakey').'&response='.$captcha.'&remoteip='.$_SERVER['REMOTE_ADDR']); |
|
50 | 50 | if (false === $response && $helper->getConfig('recaptchause')) { |
51 | 51 | redirect_header('index.php', 2, _MD_CONTACT_MES_CAPTCHAINCORRECT); |
52 | 52 | } else { |
@@ -92,4 +92,4 @@ discard block |
||
92 | 92 | } |
93 | 93 | } |
94 | 94 | |
95 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
95 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |