@@ -27,7 +27,7 @@ |
||
| 27 | 27 | define('CONTACT_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.CONTACT_DIRNAME); |
| 28 | 28 | define('CONTACT_IMAGE_PATH', CONTACT_PATH.'/assets/images'); |
| 29 | 29 | define('CONTACT_IMAGE_URL', CONTACT_URL.'/assets/images/'); |
| 30 | - define('CONTACT_ADMIN', CONTACT_URL . '/admin/index.php'); |
|
| 30 | + define('CONTACT_ADMIN', CONTACT_URL.'/admin/index.php'); |
|
| 31 | 31 | } |
| 32 | 32 | // module information |
| 33 | 33 | $copyright = "<a href='http://xoops.wedega.com' title='WEDEGA Webdesign Gabor' target='_blank'> |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | * @author Hossein Azizabadi (AKA Voltan) |
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | -include __DIR__ . '/header.php'; |
|
| 22 | +include __DIR__.'/header.php'; |
|
| 23 | 23 | |
| 24 | 24 | if (!empty($_POST)) { |
| 25 | 25 | // Info Processing |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | /** |
| 57 | 57 | * ContactHelper constructor. |
| 58 | - * @param $debug |
|
| 58 | + * @param boolean $debug |
|
| 59 | 59 | */ |
| 60 | 60 | protected function __construct($debug) |
| 61 | 61 | { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | /** |
| 125 | 125 | * @param null $name |
| 126 | 126 | * @param null $value |
| 127 | - * @return mixed |
|
| 127 | + * @return string |
|
| 128 | 128 | */ |
| 129 | 129 | public function setConfig($name = null, $value = null) |
| 130 | 130 | { |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | /** |
| 143 | 143 | * @param $name |
| 144 | - * @return mixed |
|
| 144 | + * @return string |
|
| 145 | 145 | */ |
| 146 | 146 | public function getHandler($name) |
| 147 | 147 | { |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | protected function __construct($debug) |
| 61 | 61 | { |
| 62 | 62 | $this->debug = $debug; |
| 63 | - $this->dirname = basename(dirname(__DIR__)); |
|
| 63 | + $this->dirname = basename(dirname(__DIR__)); |
|
| 64 | 64 | } |
| 65 | 65 | /* |
| 66 | 66 | * @static function getInstance |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | $this->addLog("ERROR :: CONFIG '{$name}' does not exist"); |
| 114 | 114 | return null; |
| 115 | 115 | } |
| 116 | - $this->addLog("Getting config '{$name}' : " . $this->config[$name]); |
|
| 116 | + $this->addLog("Getting config '{$name}' : ".$this->config[$name]); |
|
| 117 | 117 | return $this->config[$name]; |
| 118 | 118 | } |
| 119 | 119 | /* |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $this->initConfig(); |
| 133 | 133 | } |
| 134 | 134 | $this->config[$name] = $value; |
| 135 | - $this->addLog("Setting config '{$name}' : " . $this->config[$name]); |
|
| 135 | + $this->addLog("Setting config '{$name}' : ".$this->config[$name]); |
|
| 136 | 136 | return $this->config[$name]; |
| 137 | 137 | } |
| 138 | 138 | /* |
@@ -145,11 +145,11 @@ discard block |
||
| 145 | 145 | */ |
| 146 | 146 | public function getHandler($name) |
| 147 | 147 | { |
| 148 | - if (!isset($this->handler[$name . 'Handler'])) { |
|
| 148 | + if (!isset($this->handler[$name.'Handler'])) { |
|
| 149 | 149 | $this->initHandler($name); |
| 150 | 150 | } |
| 151 | 151 | $this->addLog("Getting handler '{$name}'"); |
| 152 | - return $this->handler[$name . 'Handler']; |
|
| 152 | + return $this->handler[$name.'Handler']; |
|
| 153 | 153 | } |
| 154 | 154 | /* |
| 155 | 155 | * @static function initModule |
@@ -187,8 +187,8 @@ discard block |
||
| 187 | 187 | */ |
| 188 | 188 | public function initHandler($name) |
| 189 | 189 | { |
| 190 | - $this->addLog('INIT ' . $name . ' HANDLER'); |
|
| 191 | - $this->handler[$name . 'Handler'] = xoops_getModuleHandler($name, $this->dirname); |
|
| 190 | + $this->addLog('INIT '.$name.' HANDLER'); |
|
| 191 | + $this->handler[$name.'Handler'] = xoops_getModuleHandler($name, $this->dirname); |
|
| 192 | 192 | } |
| 193 | 193 | /* |
| 194 | 194 | * @static function addLog |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | if (!mkdir($folder) && !is_dir($folder)) { |
| 30 | 30 | throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder)); |
| 31 | 31 | } else { |
| 32 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
| 32 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
| 33 | 33 | } |
| 34 | 34 | } |
| 35 | 35 | } catch (Exception $e) { |
@@ -67,10 +67,10 @@ discard block |
||
| 67 | 67 | // @mkdir($dst); |
| 68 | 68 | while (false !== ($file = readdir($dir))) { |
| 69 | 69 | if (($file !== '.') && ($file !== '..')) { |
| 70 | - if (is_dir($src . '/' . $file)) { |
|
| 71 | - self::recurseCopy($src . '/' . $file, $dst . '/' . $file); |
|
| 70 | + if (is_dir($src.'/'.$file)) { |
|
| 71 | + self::recurseCopy($src.'/'.$file, $dst.'/'.$file); |
|
| 72 | 72 | } else { |
| 73 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
| 73 | + copy($src.'/'.$file, $dst.'/'.$file); |
|
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | //check for minimum XOOPS version |
| 92 | 92 | $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string |
| 93 | 93 | $currArray = explode('.', $currentVer); |
| 94 | - $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string |
|
| 94 | + $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string |
|
| 95 | 95 | $reqArray = explode('.', $requiredVer); |
| 96 | 96 | $success = true; |
| 97 | 97 | foreach ($reqArray as $k => $v) { |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | break; |
| 106 | 106 | } |
| 107 | 107 | } else { |
| 108 | - if ((int)$v > 0) { // handles things like x.x.x.0_RC2 |
|
| 108 | + if ((int) $v > 0) { // handles things like x.x.x.0_RC2 |
|
| 109 | 109 | $success = false; |
| 110 | 110 | break; |
| 111 | 111 | } |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | // check for minimum PHP version |
| 134 | 134 | $success = true; |
| 135 | 135 | $verNum = PHP_VERSION; |
| 136 | - $reqVer =& $module->getInfo('min_php'); |
|
| 136 | + $reqVer = & $module->getInfo('min_php'); |
|
| 137 | 137 | if (false !== $reqVer && '' !== $reqVer) { |
| 138 | 138 | if (version_compare($verNum, $reqVer, '<')) { |
| 139 | 139 | $module->setErrors(sprintf(_AM_CONTACT_ERROR_BAD_PHP, $reqVer, $verNum)); |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | use Xmf\Request; |
| 23 | 23 | |
| 24 | 24 | // Call header |
| 25 | -require __DIR__ . '/admin_header.php'; |
|
| 25 | +require __DIR__.'/admin_header.php'; |
|
| 26 | 26 | // Display Admin header |
| 27 | 27 | xoops_cp_header(); |
| 28 | 28 | // Define default value |
@@ -55,6 +55,6 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | $GLOBALS['xoopsTpl']->assign('navigation', $adminObject->displayNavigation(basename(__FILE__))); |
| 57 | 57 | // Call template file |
| 58 | -$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_tools.tpl'); |
|
| 58 | +$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH.'/modules/contact/templates/admin/contact_tools.tpl'); |
|
| 59 | 59 | // Call footer |
| 60 | -require __DIR__ . '/admin_footer.php'; |
|
| 60 | +require __DIR__.'/admin_footer.php'; |
|
@@ -19,9 +19,9 @@ |
||
| 19 | 19 | * @author Hossein Azizabadi (AKA Voltan) |
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
| 23 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 24 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 22 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
| 23 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 24 | +require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 25 | 25 | global $xoopsModule; |
| 26 | 26 | |
| 27 | 27 | $moduleDirName = $GLOBALS['xoopsModule']->getVar('dirname'); |
@@ -22,12 +22,12 @@ discard block |
||
| 22 | 22 | use Xmf\Request; |
| 23 | 23 | |
| 24 | 24 | // Call header |
| 25 | -require __DIR__ . '/admin_header.php'; |
|
| 25 | +require __DIR__.'/admin_header.php'; |
|
| 26 | 26 | // Display Admin header |
| 27 | 27 | xoops_cp_header(); |
| 28 | 28 | global $xoopsModuleConfig; |
| 29 | 29 | // Define default value |
| 30 | -$level = ''; |
|
| 30 | +$level = ''; |
|
| 31 | 31 | |
| 32 | 32 | $saveinfo = $xoopsModuleConfig['saveinfo']; |
| 33 | 33 | $sendmail = $xoopsModuleConfig['sendmail']; |
@@ -38,11 +38,11 @@ discard block |
||
| 38 | 38 | // Define scripts |
| 39 | 39 | $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js'); |
| 40 | 40 | $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); |
| 41 | -$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/modules/contact/assets/js/admin.js'); |
|
| 41 | +$GLOBALS['xoTheme']->addScript(XOOPS_URL.'/modules/contact/assets/js/admin.js'); |
|
| 42 | 42 | // Add module stylesheet |
| 43 | -$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/contact/assets/css/admin.css'); |
|
| 44 | -$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/system/css/ui/' . xoops_getModuleOption('jquery_theme', 'system') . '/ui.all.css'); |
|
| 45 | -$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css'); |
|
| 43 | +$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL.'/modules/contact/assets/css/admin.css'); |
|
| 44 | +$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL.'/modules/system/css/ui/'.xoops_getModuleOption('jquery_theme', 'system').'/ui.all.css'); |
|
| 45 | +$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL.'/modules/system/css/admin.css'); |
|
| 46 | 46 | |
| 47 | 47 | switch ($op) { |
| 48 | 48 | case 'list': |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $contacts = $contactHandler->contactGetAdminList($contact, 'contact_cid'); |
| 62 | 62 | |
| 63 | 63 | if ($contact_numrows > $contact['limit']) { |
| 64 | - $contact_pagenav = new XoopsPageNav($contact_numrows, $contact['limit'], $contact['start'], 'start', 'limit=' . $contact['limit']); |
|
| 64 | + $contact_pagenav = new XoopsPageNav($contact_numrows, $contact['limit'], $contact['start'], 'start', 'limit='.$contact['limit']); |
|
| 65 | 65 | $contact_pagenav = $contact_pagenav->renderNav(4); |
| 66 | 66 | } else { |
| 67 | 67 | $contact_pagenav = ''; |
@@ -194,6 +194,6 @@ discard block |
||
| 194 | 194 | $GLOBALS['xoopsTpl']->assign('level', $level); |
| 195 | 195 | |
| 196 | 196 | // Call template file |
| 197 | -$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_main.tpl'); |
|
| 197 | +$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH.'/modules/contact/templates/admin/contact_main.tpl'); |
|
| 198 | 198 | // Call footer |
| 199 | -require __DIR__ . '/admin_footer.php'; |
|
| 199 | +require __DIR__.'/admin_footer.php'; |
|
@@ -20,12 +20,12 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | // Call header |
| 23 | -require_once __DIR__ . '/admin_header.php'; |
|
| 23 | +require_once __DIR__.'/admin_header.php'; |
|
| 24 | 24 | xoops_cp_header(); |
| 25 | 25 | |
| 26 | 26 | $adminObject->displayNavigation(basename(__FILE__)); |
| 27 | 27 | $adminObject->setPaypal('[email protected]'); |
| 28 | 28 | $adminObject->displayAbout(false); |
| 29 | 29 | |
| 30 | -require_once __DIR__ . '/admin_footer.php'; |
|
| 30 | +require_once __DIR__.'/admin_footer.php'; |
|
| 31 | 31 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | use Xmf\Request; |
| 23 | 23 | |
| 24 | 24 | // Call header |
| 25 | -require __DIR__ . '/admin_header.php'; |
|
| 25 | +require __DIR__.'/admin_header.php'; |
|
| 26 | 26 | // Display Admin header |
| 27 | 27 | xoops_cp_header(); |
| 28 | 28 | // Define default value |
@@ -51,6 +51,6 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | $GLOBALS['xoopsTpl']->assign('navigation', $adminObject->displayNavigation(basename(__FILE__))); |
| 53 | 53 | // Call template file |
| 54 | -$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH . '/modules/contact/templates/admin/contact_logs.tpl'); |
|
| 54 | +$GLOBALS['xoopsTpl']->display(XOOPS_ROOT_PATH.'/modules/contact/templates/admin/contact_logs.tpl'); |
|
| 55 | 55 | // Call footer |
| 56 | -require __DIR__ . '/admin_footer.php'; |
|
| 56 | +require __DIR__.'/admin_footer.php'; |
|