@@ -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 |
@@ -19,9 +19,9 @@ |
||
| 19 | 19 | * @author Hossein Azizabadi (AKA Voltan) |
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | -include __DIR__ . '/../../mainfile.php'; |
|
| 23 | -include __DIR__ . '/class/contact.php'; |
|
| 24 | -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 22 | +include __DIR__.'/../../mainfile.php'; |
|
| 23 | +include __DIR__.'/class/contact.php'; |
|
| 24 | +include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 25 | 25 | |
| 26 | 26 | xoops_load('XoopsRequest'); |
| 27 | 27 | /** @var ContactContactHandler $contactHandler*/ |
@@ -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 |
@@ -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) { |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | |
| 71 | 71 | xoops_loadLanguage('main', 'contact'); |
| 72 | 72 | |
| 73 | - include_once XOOPS_ROOT_PATH . '/modules/contact/class/contact.php'; |
|
| 73 | + include_once XOOPS_ROOT_PATH.'/modules/contact/class/contact.php'; |
|
| 74 | 74 | |
| 75 | 75 | $block['lng_username'] = 'name'; |
| 76 | 76 | |