@@ -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'> |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | * @author Trabis <[email protected]> |
| 19 | 19 | * @author Hossein Azizabadi (AKA Voltan) |
| 20 | 20 | * @author Mirza (AKA Bleekk) |
| 21 | - */ |
|
| 21 | + */ |
|
| 22 | 22 | include __DIR__ . '/header.php'; |
| 23 | 23 | $GLOBALS['xoopsOption']['template_main'] = 'contact_index.tpl'; |
| 24 | 24 | //unset($_SESSION); |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | * @author Hossein Azizabadi (AKA Voltan) |
| 20 | 20 | * @author Mirza (AKA Bleekk) |
| 21 | 21 | */ |
| 22 | -include __DIR__ . '/header.php'; |
|
| 22 | +include __DIR__.'/header.php'; |
|
| 23 | 23 | $GLOBALS['xoopsOption']['template_main'] = 'contact_index.tpl'; |
| 24 | 24 | //unset($_SESSION); |
| 25 | -include XOOPS_ROOT_PATH . '/header.php'; |
|
| 25 | +include XOOPS_ROOT_PATH.'/header.php'; |
|
| 26 | 26 | global $xoopsModuleConfig, $xoopsModule; |
| 27 | 27 | /*Modules Options*/ |
| 28 | 28 | if ($xoopsModuleConfig['form_dept'] == 1) { |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $GLOBALS['xoopsTpl']->assign('map', $xoopsModuleConfig['embed_maps']); |
| 50 | 50 | /*end Modules options*/ |
| 51 | 51 | |
| 52 | -$GLOBALS['xoopsTpl']->assign('breadcrumb', '<li><a href="' . XOOPS_URL . '">' . _YOURHOME . '</a></li> <li class="active">' . $xoopsModule->name().'</li>'); |
|
| 52 | +$GLOBALS['xoopsTpl']->assign('breadcrumb', '<li><a href="'.XOOPS_URL.'">'._YOURHOME.'</a></li> <li class="active">'.$xoopsModule->name().'</li>'); |
|
| 53 | 53 | $GLOBALS['xoopsTpl']->assign('info', xoops_getModuleOption('contact_info', 'contact')); |
| 54 | 54 | $GLOBALS['xoopsTpl']->assign('contact_default', xoops_getModuleOption('contact_default', 'contact')); |
| 55 | 55 | |
@@ -80,4 +80,4 @@ discard block |
||
| 80 | 80 | $GLOBALS['xoopsTpl']->assign('lng_subject_info', _MD_CONTACT_SUBJECT_INFO); |
| 81 | 81 | $GLOBALS['xoopsTpl']->assign('lng_message_info', _MD_CONTACT_MESSAGE_INFO); |
| 82 | 82 | |
| 83 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 83 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|
@@ -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 |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $form->addElement(new XoopsFormLabel(_AM_CONTACT_TO, '', '')); |
| 82 | 82 | $form->addElement(new XoopsFormText(_AM_CONTACT_NAMETO, 'contact_nameto', 50, 255, $this->getVar('contact_name')), true); |
| 83 | 83 | $form->addElement(new XoopsFormText(_AM_CONTACT_MAILTO, 'contact_mailto', 50, 255, $this->getVar('contact_mail')), true); |
| 84 | - $form->addElement(new XoopsFormText(_AM_CONTACT_SUBJECT, 'contact_subject', 50, 255, _RE . $this->getVar('contact_subject')), true); |
|
| 84 | + $form->addElement(new XoopsFormText(_AM_CONTACT_SUBJECT, 'contact_subject', 50, 255, _RE.$this->getVar('contact_subject')), true); |
|
| 85 | 85 | $form->addElement(new XoopsFormTextArea(_AM_CONTACT_MESSAGE, 'contact_message', '', 5, 60), true); |
| 86 | 86 | $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
| 87 | 87 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | public function toArray() |
| 97 | 97 | { |
| 98 | 98 | $ret = array(); |
| 99 | - $vars =& $this->getVars(); |
|
| 99 | + $vars = & $this->getVars(); |
|
| 100 | 100 | foreach (array_keys($vars) as $i) { |
| 101 | 101 | $ret [$i] = $this->getVar($i); |
| 102 | 102 | } |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | */ |
| 211 | 211 | public function contactSendMail($contact) |
| 212 | 212 | { |
| 213 | - $xoopsMailer =& xoops_getMailer(); |
|
| 213 | + $xoopsMailer = & xoops_getMailer(); |
|
| 214 | 214 | $xoopsMailer->useMail(); |
| 215 | 215 | $xoopsMailer->setToEmails($this->contactToEmails($contact['contact_department'])); |
| 216 | 216 | $xoopsMailer->setFromEmail($contact['contact_mail']); |
@@ -218,9 +218,9 @@ discard block |
||
| 218 | 218 | |
| 219 | 219 | $subjectPrefix = ''; |
| 220 | 220 | if ($GLOBALS['xoopsModuleConfig']['form_dept'] && $GLOBALS['xoopsModuleConfig']['subject_prefix'] && $GLOBALS['xoopsModuleConfig']['contact_dept']) { |
| 221 | - $subjectPrefix = '[' . $GLOBALS['xoopsModuleConfig']['prefix_text'] . ' ' . $contact['contact_department'] . ']: '; |
|
| 221 | + $subjectPrefix = '['.$GLOBALS['xoopsModuleConfig']['prefix_text'].' '.$contact['contact_department'].']: '; |
|
| 222 | 222 | } |
| 223 | - $xoopsMailer->setSubject($subjectPrefix . html_entity_decode($contact['contact_subject'], ENT_QUOTES, 'UTF-8')); |
|
| 223 | + $xoopsMailer->setSubject($subjectPrefix.html_entity_decode($contact['contact_subject'], ENT_QUOTES, 'UTF-8')); |
|
| 224 | 224 | $xoopsMailer->setBody(html_entity_decode($contact['contact_message'], ENT_QUOTES, 'UTF-8')); |
| 225 | 225 | if ($xoopsMailer->send()) { |
| 226 | 226 | $message = _MD_CONTACT_MES_SEND; |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | */ |
| 238 | 238 | public function contactSendMailConfirm($contact) |
| 239 | 239 | { |
| 240 | - $xoopsMailer =& xoops_getMailer(); |
|
| 240 | + $xoopsMailer = & xoops_getMailer(); |
|
| 241 | 241 | $xoopsMailer->useMail(); |
| 242 | 242 | $xoopsMailer->setToEmails($contact['contact_mail']); |
| 243 | 243 | $xoopsMailer->setFromEmail($this->contactToEmails($contact['contact_department'])); |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | */ |
| 264 | 264 | public function contactReplyMail($contact) |
| 265 | 265 | { |
| 266 | - $xoopsMailer =& xoops_getMailer(); |
|
| 266 | + $xoopsMailer = & xoops_getMailer(); |
|
| 267 | 267 | $xoopsMailer->useMail(); |
| 268 | 268 | $xoopsMailer->setToEmails($contact['contact_mailto']); |
| 269 | 269 | $xoopsMailer->setFromEmail($contact['contact_mail']); |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | $criteria = new CriteriaCompo(); |
| 325 | 325 | $criteria->add(new Criteria('contact_cid', $contact_id)); |
| 326 | 326 | $criteria->add(new Criteria('contact_type', 'Contact')); |
| 327 | - $contacts =& $this->getObjects($criteria, false); |
|
| 327 | + $contacts = & $this->getObjects($criteria, false); |
|
| 328 | 328 | if ($contacts) { |
| 329 | 329 | $ret = array(); |
| 330 | 330 | /** @var Contact $root */ |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | $criteria->setOrder($contact['order']); |
| 358 | 358 | $criteria->setStart($contact['start']); |
| 359 | 359 | $criteria->setLimit($contact['limit']); |
| 360 | - $contacts =& $this->getObjects($criteria, false); |
|
| 360 | + $contacts = & $this->getObjects($criteria, false); |
|
| 361 | 361 | if ($contacts) { |
| 362 | 362 | /** @var Contact $root */ |
| 363 | 363 | foreach ($contacts as $root) { |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | } |
| 498 | 498 | $criteria->setSort('contact_create'); |
| 499 | 499 | $criteria->setOrder('DESC'); |
| 500 | - $contacts =& $this->getObjects($criteria, false); |
|
| 500 | + $contacts = & $this->getObjects($criteria, false); |
|
| 501 | 501 | if ($contacts) { |
| 502 | 502 | /** @var Contact $root */ |
| 503 | 503 | foreach ($contacts as $root) { |
@@ -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'; |
|