@@ -86,7 +86,7 @@ |
||
| 86 | 86 | //2.25 RC1 |
| 87 | 87 | //Help |
| 88 | 88 | define('_MI_CONTACT_DIRNAME', basename(dirname(__DIR__, 2))); |
| 89 | -define('_MI_CONTACT_HELP_HEADER', __DIR__ . '/help/helpheader.tpl'); |
|
| 89 | +define('_MI_CONTACT_HELP_HEADER', __DIR__.'/help/helpheader.tpl'); |
|
| 90 | 90 | define('_MI_CONTACT_BACK_2_ADMIN', 'Back to Administration of '); |
| 91 | 91 | define('_MI_CONTACT_OVERVIEW', 'Overview'); |
| 92 | 92 | |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | $form->addElement(new \XoopsFormLabel(_AM_CONTACT_TO, '', '')); |
| 80 | 80 | $form->addElement(new \XoopsFormText(_AM_CONTACT_NAMETO, 'contact_nameto', 50, 255, $this->getVar('contact_name')), true); |
| 81 | 81 | $form->addElement(new \XoopsFormText(_AM_CONTACT_MAILTO, 'contact_mailto', 50, 255, $this->getVar('contact_mail')), true); |
| 82 | - $form->addElement(new \XoopsFormText(_AM_CONTACT_SUBJECT, 'contact_subject', 50, 255, _RE . $this->getVar('contact_subject')), true); |
|
| 82 | + $form->addElement(new \XoopsFormText(_AM_CONTACT_SUBJECT, 'contact_subject', 50, 255, _RE.$this->getVar('contact_subject')), true); |
|
| 83 | 83 | $form->addElement(new \XoopsFormTextArea(_AM_CONTACT_MESSAGE, 'contact_message', '', 5, 60), true); |
| 84 | 84 | $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
| 85 | 85 | |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | { |
| 70 | 70 | $ret = false; |
| 71 | 71 | |
| 72 | - $class = __NAMESPACE__ . '\\' . \ucfirst($name) . 'Handler'; |
|
| 72 | + $class = __NAMESPACE__.'\\'.\ucfirst($name).'Handler'; |
|
| 73 | 73 | if (!\class_exists($class)) { |
| 74 | 74 | throw new \RuntimeException("Class '$class' not found"); |
| 75 | 75 | } |
@@ -36,19 +36,19 @@ discard block |
||
| 36 | 36 | // $sql .= " WHERE metakey='version' LIMIT 1"; |
| 37 | 37 | // $query = $GLOBALS['xoopsDB']->query($sql); |
| 38 | 38 | // list($meta) = $GLOBALS['xoopsDB']->fetchRow($query); |
| 39 | - $html .= "<fieldset><legend style='font-weight: bold; color: #900;'>" . \constant('CO_' . $moduleDirNameUpper . '_IMAGEINFO') . "</legend>\n"; |
|
| 39 | + $html .= "<fieldset><legend style='font-weight: bold; color: #900;'>".\constant('CO_'.$moduleDirNameUpper.'_IMAGEINFO')."</legend>\n"; |
|
| 40 | 40 | $html .= "<div style='padding: 8px;'>\n"; |
| 41 | 41 | // $html .= '<div>' . constant('CO_' . $moduleDirNameUpper . '_METAVERSION') . $meta . "</div>\n"; |
| 42 | 42 | // $html .= "<br>\n"; |
| 43 | 43 | // $html .= "<br>\n"; |
| 44 | - $html .= '<div>' . \constant('CO_' . $moduleDirNameUpper . '_SPHPINI') . "</div>\n"; |
|
| 44 | + $html .= '<div>'.\constant('CO_'.$moduleDirNameUpper.'_SPHPINI')."</div>\n"; |
|
| 45 | 45 | $html .= "<ul>\n"; |
| 46 | 46 | |
| 47 | - $gdlib = \function_exists('gd_info') ? '<span style="color: green;">' . \constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: red;">' . \constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>'; |
|
| 48 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib; |
|
| 47 | + $gdlib = \function_exists('gd_info') ? '<span style="color: green;">'.\constant('CO_'.$moduleDirNameUpper.'_GDON').'</span>' : '<span style="color: red;">'.\constant('CO_'.$moduleDirNameUpper.'_GDOFF').'</span>'; |
|
| 48 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS').$gdlib; |
|
| 49 | 49 | if (\function_exists('gd_info')) { |
| 50 | 50 | if (true === ($gdlib = gd_info())) { |
| 51 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>'; |
|
| 51 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_GDLIBVERSION').'<b>'.$gdlib['GD Version'].'</b>'; |
|
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | // |
@@ -58,18 +58,18 @@ discard block |
||
| 58 | 58 | // $registerglobals = (!ini_get('register_globals')) ? "<span style=\"color: green;\">" . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>' : "<span style=\"color: red;\">" . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>'; |
| 59 | 59 | // $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals; |
| 60 | 60 | // |
| 61 | - $downloads = \ini_get('file_uploads') ? '<span style="color: green;">' . \constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: red;">' . \constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>'; |
|
| 62 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads; |
|
| 61 | + $downloads = \ini_get('file_uploads') ? '<span style="color: green;">'.\constant('CO_'.$moduleDirNameUpper.'_ON').'</span>' : '<span style="color: red;">'.\constant('CO_'.$moduleDirNameUpper.'_OFF').'</span>'; |
|
| 62 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS').$downloads; |
|
| 63 | 63 | |
| 64 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: blue;">' . \ini_get('upload_max_filesize') . "</span></b>\n"; |
|
| 65 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: blue;">' . \ini_get('post_max_size') . "</span></b>\n"; |
|
| 66 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT') . ' <b><span style="color: blue;">' . \ini_get('memory_limit') . "</span></b>\n"; |
|
| 64 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE').' <b><span style="color: blue;">'.\ini_get('upload_max_filesize')."</span></b>\n"; |
|
| 65 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE').' <b><span style="color: blue;">'.\ini_get('post_max_size')."</span></b>\n"; |
|
| 66 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT').' <b><span style="color: blue;">'.\ini_get('memory_limit')."</span></b>\n"; |
|
| 67 | 67 | $html .= "</ul>\n"; |
| 68 | 68 | $html .= "<ul>\n"; |
| 69 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERPATH') . ' <b>' . XOOPS_ROOT_PATH . "</b>\n"; |
|
| 69 | + $html .= '<li>'.\constant('CO_'.$moduleDirNameUpper.'_SERVERPATH').' <b>'.XOOPS_ROOT_PATH."</b>\n"; |
|
| 70 | 70 | $html .= "</ul>\n"; |
| 71 | 71 | $html .= "<br>\n"; |
| 72 | - $html .= \constant('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC') . "\n"; |
|
| 72 | + $html .= \constant('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC')."\n"; |
|
| 73 | 73 | $html .= '</div>'; |
| 74 | 74 | $html .= '</fieldset><br>'; |
| 75 | 75 | |
@@ -26,8 +26,8 @@ |
||
| 26 | 26 | /** @var ContactHandler $contactHandler */ |
| 27 | 27 | |
| 28 | 28 | $moduleDirName = basename(__DIR__); |
| 29 | -require_once \dirname(__DIR__, 2) . '/mainfile.php'; |
|
| 29 | +require_once \dirname(__DIR__, 2).'/mainfile.php'; |
|
| 30 | 30 | //require_once __DIR__ . '/class/contact.php'; |
| 31 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 31 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 32 | 32 | |
| 33 | 33 | $contactHandler = Helper::getInstance()->getHandler('Contact'); |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | /** @var Admin $adminObject */ |
| 30 | 30 | |
| 31 | 31 | // Call header |
| 32 | -require_once __DIR__ . '/admin_header.php'; |
|
| 32 | +require_once __DIR__.'/admin_header.php'; |
|
| 33 | 33 | |
| 34 | 34 | // Display Admin header |
| 35 | 35 | xoops_cp_header(); |
@@ -48,11 +48,11 @@ discard block |
||
| 48 | 48 | // Define scripts |
| 49 | 49 | $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js'); |
| 50 | 50 | $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); |
| 51 | -$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/modules/contact/assets/js/admin.js'); |
|
| 51 | +$GLOBALS['xoTheme']->addScript(XOOPS_URL.'/modules/contact/assets/js/admin.js'); |
|
| 52 | 52 | // Add module stylesheet |
| 53 | -$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/contact/assets/css/admin.css'); |
|
| 54 | -$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/system/css/ui/' . xoops_getModuleOption('jquery_theme', 'system') . '/ui.all.css'); |
|
| 55 | -$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css'); |
|
| 53 | +$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL.'/modules/contact/assets/css/admin.css'); |
|
| 54 | +$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL.'/modules/system/css/ui/'.xoops_getModuleOption('jquery_theme', 'system').'/ui.all.css'); |
|
| 55 | +$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL.'/modules/system/css/admin.css'); |
|
| 56 | 56 | |
| 57 | 57 | switch ($op) { |
| 58 | 58 | case 'list': |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $contacts = $contactHandler->contactGetAdminList($contact, 'contact_cid'); |
| 72 | 72 | |
| 73 | 73 | if ($contact_numrows > $contact['limit']) { |
| 74 | - $contact_pagenav = new \XoopsPageNav($contact_numrows, $contact['limit'], $contact['start'], 'start', 'limit=' . $contact['limit']); |
|
| 74 | + $contact_pagenav = new \XoopsPageNav($contact_numrows, $contact['limit'], $contact['start'], 'start', 'limit='.$contact['limit']); |
|
| 75 | 75 | $contact_pagenav = $contact_pagenav->renderNav(4); |
| 76 | 76 | } else { |
| 77 | 77 | $contact_pagenav = ''; |
@@ -198,6 +198,6 @@ discard block |
||
| 198 | 198 | $GLOBALS['xoopsTpl']->assign('level', $level); |
| 199 | 199 | |
| 200 | 200 | // Call template file |
| 201 | -$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_main.tpl'); |
|
| 201 | +$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH.'/modules/contact/templates/admin/contact_main.tpl'); |
|
| 202 | 202 | // Call footer |
| 203 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 203 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | /** @var ContactHandler $contactHandler */ |
| 23 | 23 | // Call header |
| 24 | -require_once __DIR__ . '/admin_header.php'; |
|
| 24 | +require_once __DIR__.'/admin_header.php'; |
|
| 25 | 25 | // Display Admin header |
| 26 | 26 | xoops_cp_header(); |
| 27 | 27 | |
@@ -33,6 +33,6 @@ discard block |
||
| 33 | 33 | $adminObject->displayIndex(); |
| 34 | 34 | |
| 35 | 35 | // Call template file |
| 36 | -$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_index.tpl'); |
|
| 36 | +$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH.'/modules/contact/templates/admin/contact_index.tpl'); |
|
| 37 | 37 | // Call footer |
| 38 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 38 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | /** @var Admin $adminObject */ |
| 25 | 25 | |
| 26 | 26 | // Call header |
| 27 | -require_once __DIR__ . '/admin_header.php'; |
|
| 27 | +require_once __DIR__.'/admin_header.php'; |
|
| 28 | 28 | // Display Admin header |
| 29 | 29 | xoops_cp_header(); |
| 30 | 30 | // Define default value |
@@ -52,6 +52,6 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | $GLOBALS['xoopsTpl']->assign('navigation', $adminObject->displayNavigation(basename(__FILE__))); |
| 54 | 54 | // Call template file |
| 55 | -$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_logs.tpl'); |
|
| 55 | +$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH.'/modules/contact/templates/admin/contact_logs.tpl'); |
|
| 56 | 56 | // Call footer |
| 57 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 57 | +require_once __DIR__.'/admin_footer.php'; |
|
@@ -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 | |