Completed
Push — master ( e9c2cc...266444 )
by Michael
01:47
created
include/common.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
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'>
Please login to merge, or discard this patch.
include/functions_update.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection();
27 27
 
28 28
     if ($version < 180) {
29
-        $sql = 'CREATE TABLE ' . $xoopsDB->prefix('contact') . ' (
29
+        $sql = 'CREATE TABLE '.$xoopsDB->prefix('contact').' (
30 30
         contact_id int(10) unsigned NOT NULL auto_increment,
31 31
         contact_uid int(10) NOT NULL,
32 32
         contact_cid int(10) NOT NULL,
@@ -51,31 +51,31 @@  discard block
 block discarded – undo
51 51
 
52 52
     if ($version < 181) {
53 53
         // Add contact_platform
54
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . "` ADD `contact_platform` ENUM('Android','Ios','Web') NOT NULL DEFAULT 'Web'";
54
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact')."` ADD `contact_platform` ENUM('Android','Ios','Web') NOT NULL DEFAULT 'Web'";
55 55
         $xoopsDB->query($sql);
56 56
         // Add contact_type
57
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . "` ADD `contact_type` ENUM('Contact','Phone','Mail') NOT NULL DEFAULT 'Contact'";
57
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact')."` ADD `contact_type` ENUM('Contact','Phone','Mail') NOT NULL DEFAULT 'Contact'";
58 58
         $xoopsDB->query($sql);
59 59
         // Add index contact_uid
60
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_uid` ( `contact_uid` )';
60
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_uid` ( `contact_uid` )';
61 61
         $xoopsDB->query($sql);
62 62
         // Add index contact_cid
63
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_cid` ( `contact_cid` )';
63
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_cid` ( `contact_cid` )';
64 64
         $xoopsDB->query($sql);
65 65
         // Add index contact_create
66
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_create` ( `contact_create` )';
66
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_create` ( `contact_create` )';
67 67
         $xoopsDB->query($sql);
68 68
         // Add index contact_mail
69
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_mail` ( `contact_mail` )';
69
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_mail` ( `contact_mail` )';
70 70
         $xoopsDB->query($sql);
71 71
         // Add index contact_phone
72
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_phone` ( `contact_phone` )';
72
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_phone` ( `contact_phone` )';
73 73
         $xoopsDB->query($sql);
74 74
         // Add index contact_platform
75
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_platform` ( `contact_platform` )';
75
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_platform` ( `contact_platform` )';
76 76
         $xoopsDB->query($sql);
77 77
         // Add index contact_type
78
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_type` ( `contact_type` )';
78
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_type` ( `contact_type` )';
79 79
         $xoopsDB->query($sql);
80 80
     }
81 81
 }
Please login to merge, or discard this patch.
index.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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';
Please login to merge, or discard this patch.
ajax.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
class/helper.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
141 141
     */
142 142
     /**
143 143
      * @param $name
144
-     * @return mixed
144
+     * @return string
145 145
      */
146 146
     public function getHandler($name)
147 147
     {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
class/utility.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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));
Please login to merge, or discard this patch.
admin/tools.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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';
Please login to merge, or discard this patch.
admin/admin_header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
admin/main.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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';
Please login to merge, or discard this patch.