Completed
Push — master ( c5aa4f...a09810 )
by Michael
02:13
created
class/utility.php 2 patches
Indentation   +138 added lines, -138 removed lines patch added patch discarded remove patch
@@ -5,149 +5,149 @@
 block discarded – undo
5 5
  */
6 6
 class SmartObjectUtility extends XoopsObject
7 7
 {
8
-    /**
9
-     * Function responsible for checking if a directory exists, we can also write in and create an index.html file
10
-     *
11
-     * @param string $folder The full path of the directory to check
12
-     *
13
-     * @return void
14
-     */
15
-    public static function createFolder($folder)
16
-    {
17
-        //        try {
18
-        //            if (!mkdir($folder) && !is_dir($folder)) {
19
-        //                throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder));
20
-        //            } else {
21
-        //                file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
22
-        //            }
23
-        //        }
24
-        //        catch (Exception $e) {
25
-        //            echo 'Caught exception: ', $e->getMessage(), "\n", '<br>';
26
-        //        }
27
-        try {
28
-            if (!file_exists($folder)) {
29
-                if (!mkdir($folder) && !is_dir($folder)) {
30
-                    throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder));
31
-                } else {
32
-                    file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
33
-                }
34
-            }
35
-        } catch (Exception $e) {
36
-            echo 'Caught exception: ', $e->getMessage(), "\n", '<br>';
37
-        }
38
-    }
8
+	/**
9
+	 * Function responsible for checking if a directory exists, we can also write in and create an index.html file
10
+	 *
11
+	 * @param string $folder The full path of the directory to check
12
+	 *
13
+	 * @return void
14
+	 */
15
+	public static function createFolder($folder)
16
+	{
17
+		//        try {
18
+		//            if (!mkdir($folder) && !is_dir($folder)) {
19
+		//                throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder));
20
+		//            } else {
21
+		//                file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
22
+		//            }
23
+		//        }
24
+		//        catch (Exception $e) {
25
+		//            echo 'Caught exception: ', $e->getMessage(), "\n", '<br>';
26
+		//        }
27
+		try {
28
+			if (!file_exists($folder)) {
29
+				if (!mkdir($folder) && !is_dir($folder)) {
30
+					throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder));
31
+				} else {
32
+					file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
33
+				}
34
+			}
35
+		} catch (Exception $e) {
36
+			echo 'Caught exception: ', $e->getMessage(), "\n", '<br>';
37
+		}
38
+	}
39 39
 
40
-    /**
41
-     * @param $file
42
-     * @param $folder
43
-     * @return bool
44
-     */
45
-    public static function copyFile($file, $folder)
46
-    {
47
-        return copy($file, $folder);
48
-        //        try {
49
-        //            if (!is_dir($folder)) {
50
-        //                throw new \RuntimeException(sprintf('Unable to copy file as: %s ', $folder));
51
-        //            } else {
52
-        //                return copy($file, $folder);
53
-        //            }
54
-        //        } catch (Exception $e) {
55
-        //            echo 'Caught exception: ', $e->getMessage(), "\n", "<br>";
56
-        //        }
57
-        //        return false;
58
-    }
40
+	/**
41
+	 * @param $file
42
+	 * @param $folder
43
+	 * @return bool
44
+	 */
45
+	public static function copyFile($file, $folder)
46
+	{
47
+		return copy($file, $folder);
48
+		//        try {
49
+		//            if (!is_dir($folder)) {
50
+		//                throw new \RuntimeException(sprintf('Unable to copy file as: %s ', $folder));
51
+		//            } else {
52
+		//                return copy($file, $folder);
53
+		//            }
54
+		//        } catch (Exception $e) {
55
+		//            echo 'Caught exception: ', $e->getMessage(), "\n", "<br>";
56
+		//        }
57
+		//        return false;
58
+	}
59 59
 
60
-    /**
61
-     * @param $src
62
-     * @param $dst
63
-     */
64
-    public static function recurseCopy($src, $dst)
65
-    {
66
-        $dir = opendir($src);
67
-        //    @mkdir($dst);
68
-        while (false !== ($file = readdir($dir))) {
69
-            if (($file !== '.') && ($file !== '..')) {
70
-                if (is_dir($src . '/' . $file)) {
71
-                    self::recurseCopy($src . '/' . $file, $dst . '/' . $file);
72
-                } else {
73
-                    copy($src . '/' . $file, $dst . '/' . $file);
74
-                }
75
-            }
76
-        }
77
-        closedir($dir);
78
-    }
60
+	/**
61
+	 * @param $src
62
+	 * @param $dst
63
+	 */
64
+	public static function recurseCopy($src, $dst)
65
+	{
66
+		$dir = opendir($src);
67
+		//    @mkdir($dst);
68
+		while (false !== ($file = readdir($dir))) {
69
+			if (($file !== '.') && ($file !== '..')) {
70
+				if (is_dir($src . '/' . $file)) {
71
+					self::recurseCopy($src . '/' . $file, $dst . '/' . $file);
72
+				} else {
73
+					copy($src . '/' . $file, $dst . '/' . $file);
74
+				}
75
+			}
76
+		}
77
+		closedir($dir);
78
+	}
79 79
 
80
-    /**
81
-     *
82
-     * Verifies XOOPS version meets minimum requirements for this module
83
-     * @static
84
-     * @param XoopsModule $module
85
-     *
86
-     * @param null|string $requiredVer
87
-     * @return bool true if meets requirements, false if not
88
-     */
89
-    public static function checkVerXoops(XoopsModule $module = null, $requiredVer = null)
90
-    {
91
-        $moduleDirName = basename(dirname(__DIR__));
92
-        if (null === $module) {
93
-            $module = XoopsModule::getByDirname($moduleDirName);
94
-        }
95
-        xoops_loadLanguage('admin', $moduleDirName);
96
-        //check for minimum XOOPS version
97
-        $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string
98
-        $currArray  = explode('.', $currentVer);
99
-        if (null === $requiredVer) {
100
-            $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
101
-        }
102
-        $reqArray = explode('.', $requiredVer);
103
-        $success  = true;
104
-        foreach ($reqArray as $k => $v) {
105
-            if (isset($currArray[$k])) {
106
-                if ($currArray[$k] > $v) {
107
-                    break;
108
-                } elseif ($currArray[$k] == $v) {
109
-                    continue;
110
-                } else {
111
-                    $success = false;
112
-                    break;
113
-                }
114
-            } else {
115
-                if ((int)$v > 0) { // handles versions like x.x.x.0_RC2
116
-                    $success = false;
117
-                    break;
118
-                }
119
-            }
120
-        }
80
+	/**
81
+	 *
82
+	 * Verifies XOOPS version meets minimum requirements for this module
83
+	 * @static
84
+	 * @param XoopsModule $module
85
+	 *
86
+	 * @param null|string $requiredVer
87
+	 * @return bool true if meets requirements, false if not
88
+	 */
89
+	public static function checkVerXoops(XoopsModule $module = null, $requiredVer = null)
90
+	{
91
+		$moduleDirName = basename(dirname(__DIR__));
92
+		if (null === $module) {
93
+			$module = XoopsModule::getByDirname($moduleDirName);
94
+		}
95
+		xoops_loadLanguage('admin', $moduleDirName);
96
+		//check for minimum XOOPS version
97
+		$currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string
98
+		$currArray  = explode('.', $currentVer);
99
+		if (null === $requiredVer) {
100
+			$requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
101
+		}
102
+		$reqArray = explode('.', $requiredVer);
103
+		$success  = true;
104
+		foreach ($reqArray as $k => $v) {
105
+			if (isset($currArray[$k])) {
106
+				if ($currArray[$k] > $v) {
107
+					break;
108
+				} elseif ($currArray[$k] == $v) {
109
+					continue;
110
+				} else {
111
+					$success = false;
112
+					break;
113
+				}
114
+			} else {
115
+				if ((int)$v > 0) { // handles versions like x.x.x.0_RC2
116
+					$success = false;
117
+					break;
118
+				}
119
+			}
120
+		}
121 121
 
122
-        if (!$success) {
123
-            $module->setErrors(sprintf(_AM_XXXXX_ERROR_BAD_XOOPS, $requiredVer, $currentVer));
124
-        }
122
+		if (!$success) {
123
+			$module->setErrors(sprintf(_AM_XXXXX_ERROR_BAD_XOOPS, $requiredVer, $currentVer));
124
+		}
125 125
 
126
-        return $success;
127
-    }
126
+		return $success;
127
+	}
128 128
 
129
-    /**
130
-     *
131
-     * Verifies PHP version meets minimum requirements for this module
132
-     * @static
133
-     * @param XoopsModule $module
134
-     *
135
-     * @return bool true if meets requirements, false if not
136
-     */
137
-    public static function checkVerPhp(XoopsModule $module)
138
-    {
139
-        xoops_loadLanguage('admin', $module->dirname());
140
-        // check for minimum PHP version
141
-        $success = true;
142
-        $verNum  = PHP_VERSION;
143
-        $reqVer  = $module->getInfo('min_php');
144
-        if (false !== $reqVer && '' !== $reqVer) {
145
-            if (version_compare($verNum, $reqVer, '<')) {
146
-                $module->setErrors(sprintf(_AM_XXXXX_ERROR_BAD_PHP, $reqVer, $verNum));
147
-                $success = false;
148
-            }
149
-        }
129
+	/**
130
+	 *
131
+	 * Verifies PHP version meets minimum requirements for this module
132
+	 * @static
133
+	 * @param XoopsModule $module
134
+	 *
135
+	 * @return bool true if meets requirements, false if not
136
+	 */
137
+	public static function checkVerPhp(XoopsModule $module)
138
+	{
139
+		xoops_loadLanguage('admin', $module->dirname());
140
+		// check for minimum PHP version
141
+		$success = true;
142
+		$verNum  = PHP_VERSION;
143
+		$reqVer  = $module->getInfo('min_php');
144
+		if (false !== $reqVer && '' !== $reqVer) {
145
+			if (version_compare($verNum, $reqVer, '<')) {
146
+				$module->setErrors(sprintf(_AM_XXXXX_ERROR_BAD_PHP, $reqVer, $verNum));
147
+				$success = false;
148
+			}
149
+		}
150 150
 
151
-        return $success;
152
-    }
151
+		return $success;
152
+	}
153 153
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 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
         }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string
98 98
         $currArray  = explode('.', $currentVer);
99 99
         if (null === $requiredVer) {
100
-            $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
100
+            $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string
101 101
         }
102 102
         $reqArray = explode('.', $requiredVer);
103 103
         $success  = true;
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                     break;
113 113
                 }
114 114
             } else {
115
-                if ((int)$v > 0) { // handles versions like x.x.x.0_RC2
115
+                if ((int) $v > 0) { // handles versions like x.x.x.0_RC2
116 116
                     $success = false;
117 117
                     break;
118 118
                 }
Please login to merge, or discard this patch.
class/smartprinterfriendly.php 2 patches
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -15,65 +15,65 @@
 block discarded – undo
15 15
  */
16 16
 class SmartPrinterFriendly
17 17
 {
18
-    public $_title;
19
-    public $_dsc;
20
-    public $_content;
21
-    public $_tpl;
22
-    public $_pageTitle = false;
23
-    public $_width     = 680;
18
+	public $_title;
19
+	public $_dsc;
20
+	public $_content;
21
+	public $_tpl;
22
+	public $_pageTitle = false;
23
+	public $_width     = 680;
24 24
 
25
-    /**
26
-     * SmartPrinterFriendly constructor.
27
-     * @param      $content
28
-     * @param bool $title
29
-     * @param bool $dsc
30
-     */
31
-    public function __construct($content, $title = false, $dsc = false)
32
-    {
33
-        $this->_title   = $title;
34
-        $this->_dsc     = $dsc;
35
-        $this->_content = $content;
36
-    }
25
+	/**
26
+	 * SmartPrinterFriendly constructor.
27
+	 * @param      $content
28
+	 * @param bool $title
29
+	 * @param bool $dsc
30
+	 */
31
+	public function __construct($content, $title = false, $dsc = false)
32
+	{
33
+		$this->_title   = $title;
34
+		$this->_dsc     = $dsc;
35
+		$this->_content = $content;
36
+	}
37 37
 
38
-    public function render()
39
-    {
40
-        /**
41
-         * @todo move the output to a template
42
-         * @todo make the output XHTML compliant
43
-         */
38
+	public function render()
39
+	{
40
+		/**
41
+		 * @todo move the output to a template
42
+		 * @todo make the output XHTML compliant
43
+		 */
44 44
 
45
-        require_once XOOPS_ROOT_PATH . '/class/template.php';
45
+		require_once XOOPS_ROOT_PATH . '/class/template.php';
46 46
 
47
-        $this->_tpl = new XoopsTpl();
47
+		$this->_tpl = new XoopsTpl();
48 48
 
49
-        $this->_tpl->assign('smartobject_print_pageTitle', $this->_pageTitle ?: $this->_title);
50
-        $this->_tpl->assign('smartobject_print_title', $this->_title);
51
-        $this->_tpl->assign('smartobject_print_dsc', $this->_dsc);
52
-        $this->_tpl->assign('smartobject_print_content', $this->_content);
53
-        $this->_tpl->assign('smartobject_print_width', $this->_width);
49
+		$this->_tpl->assign('smartobject_print_pageTitle', $this->_pageTitle ?: $this->_title);
50
+		$this->_tpl->assign('smartobject_print_title', $this->_title);
51
+		$this->_tpl->assign('smartobject_print_dsc', $this->_dsc);
52
+		$this->_tpl->assign('smartobject_print_content', $this->_content);
53
+		$this->_tpl->assign('smartobject_print_width', $this->_width);
54 54
 
55
-        $current_urls = smart_getCurrentUrls();
56
-        $current_url  = $current_urls['full'];
55
+		$current_urls = smart_getCurrentUrls();
56
+		$current_url  = $current_urls['full'];
57 57
 
58
-        $this->_tpl->assign('smartobject_print_currenturl', $current_url);
59
-        $this->_tpl->assign('smartobject_print_url', $this->url);
58
+		$this->_tpl->assign('smartobject_print_currenturl', $current_url);
59
+		$this->_tpl->assign('smartobject_print_url', $this->url);
60 60
 
61
-        $this->_tpl->display('db:smartobject_print.tpl');
62
-    }
61
+		$this->_tpl->display('db:smartobject_print.tpl');
62
+	}
63 63
 
64
-    /**
65
-     * @param $text
66
-     */
67
-    public function setPageTitle($text)
68
-    {
69
-        $this->_pageTitle = $text;
70
-    }
64
+	/**
65
+	 * @param $text
66
+	 */
67
+	public function setPageTitle($text)
68
+	{
69
+		$this->_pageTitle = $text;
70
+	}
71 71
 
72
-    /**
73
-     * @param $width
74
-     */
75
-    public function setWidth($width)
76
-    {
77
-        $this->_width = $width;
78
-    }
72
+	/**
73
+	 * @param $width
74
+	 */
75
+	public function setWidth($width)
76
+	{
77
+		$this->_width = $width;
78
+	}
79 79
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
          * @todo make the output XHTML compliant
43 43
          */
44 44
 
45
-        require_once XOOPS_ROOT_PATH . '/class/template.php';
45
+        require_once XOOPS_ROOT_PATH.'/class/template.php';
46 46
 
47 47
         $this->_tpl = new XoopsTpl();
48 48
 
Please login to merge, or discard this patch.
class/smartloader.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,6 +30,6 @@
 block discarded – undo
30 30
 $smarthookHandler = SmartHookHandler::getInstance();
31 31
 
32 32
 if (!class_exists('smartmetagen')) {
33
-    require_once SMARTOBJECT_ROOT_PATH . 'class/smartmetagen.php';
33
+	require_once SMARTOBJECT_ROOT_PATH . 'class/smartmetagen.php';
34 34
 }
35 35
 //$smartobjectConfig = smart_getModuleConfig('smartobject');
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,23 +13,23 @@
 block discarded – undo
13 13
 
14 14
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
15 15
 
16
-require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
16
+require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php';
17 17
 
18 18
 /**
19 19
  * Include other classes used by the SmartObject
20 20
  */
21
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecthandler.php';
22
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartobject.php';
23
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectsregistry.php';
21
+require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecthandler.php';
22
+require_once SMARTOBJECT_ROOT_PATH.'class/smartobject.php';
23
+require_once SMARTOBJECT_ROOT_PATH.'class/smartobjectsregistry.php';
24 24
 
25 25
 /**
26 26
  * Including SmartHook feature
27 27
  */
28 28
 
29
-require_once SMARTOBJECT_ROOT_PATH . 'class/smarthookhandler.php';
29
+require_once SMARTOBJECT_ROOT_PATH.'class/smarthookhandler.php';
30 30
 $smarthookHandler = SmartHookHandler::getInstance();
31 31
 
32 32
 if (!class_exists('smartmetagen')) {
33
-    require_once SMARTOBJECT_ROOT_PATH . 'class/smartmetagen.php';
33
+    require_once SMARTOBJECT_ROOT_PATH.'class/smartmetagen.php';
34 34
 }
35 35
 //$smartobjectConfig = smart_getModuleConfig('smartobject');
Please login to merge, or discard this patch.
blocks/addto.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@  discard block
 block discarded – undo
8 8
  */
9 9
 function smartobject_addto_show($options)
10 10
 {
11
-    require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
12
-    require_once SMARTOBJECT_ROOT_PATH . 'class/smartaddto.php';
13
-    $smartaddto = new SmartAddTo($options[0]);
14
-    $block      = $smartaddto->renderForBlock();
11
+	require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
12
+	require_once SMARTOBJECT_ROOT_PATH . 'class/smartaddto.php';
13
+	$smartaddto = new SmartAddTo($options[0]);
14
+	$block      = $smartaddto->renderForBlock();
15 15
 
16
-    return $block;
16
+	return $block;
17 17
 }
18 18
 
19 19
 /**
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
  */
23 23
 function smartobject_addto_edit($options)
24 24
 {
25
-    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
25
+	require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
26 26
 
27
-    $form = '';
27
+	$form = '';
28 28
 
29
-    $layout_select = new XoopsFormSelect(_MB_SOBJECT_BLOCKS_ADDTO_LAYOUT, 'options[]', $options[0]);
30
-    $layout_select->addOption(0, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION0);
31
-    $layout_select->addOption(1, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION1);
32
-    $layout_select->addOption(2, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION2);
33
-    $layout_select->addOption(3, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION3);
34
-    $form .= $layout_select->getCaption() . ' ' . $layout_select->render() . '<br>';
29
+	$layout_select = new XoopsFormSelect(_MB_SOBJECT_BLOCKS_ADDTO_LAYOUT, 'options[]', $options[0]);
30
+	$layout_select->addOption(0, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION0);
31
+	$layout_select->addOption(1, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION1);
32
+	$layout_select->addOption(2, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION2);
33
+	$layout_select->addOption(3, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION3);
34
+	$form .= $layout_select->getCaption() . ' ' . $layout_select->render() . '<br>';
35 35
 
36
-    return $form;
36
+	return $form;
37 37
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
  */
9 9
 function smartobject_addto_show($options)
10 10
 {
11
-    require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
12
-    require_once SMARTOBJECT_ROOT_PATH . 'class/smartaddto.php';
11
+    require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php';
12
+    require_once SMARTOBJECT_ROOT_PATH.'class/smartaddto.php';
13 13
     $smartaddto = new SmartAddTo($options[0]);
14 14
     $block      = $smartaddto->renderForBlock();
15 15
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  */
23 23
 function smartobject_addto_edit($options)
24 24
 {
25
-    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
25
+    require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
26 26
 
27 27
     $form = '';
28 28
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     $layout_select->addOption(1, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION1);
32 32
     $layout_select->addOption(2, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION2);
33 33
     $layout_select->addOption(3, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION3);
34
-    $form .= $layout_select->getCaption() . ' ' . $layout_select->render() . '<br>';
34
+    $form .= $layout_select->getCaption().' '.$layout_select->render().'<br>';
35 35
 
36 36
     return $form;
37 37
 }
Please login to merge, or discard this patch.
sendlink.php 2 patches
Indentation   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -26,82 +26,82 @@
 block discarded – undo
26 26
 $op = isset($_POST['op']) ? $_POST['op'] : '';
27 27
 
28 28
 switch ($op) {
29
-    case 'sendlink':
30
-
31
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
32
-        $controller = new SmartObjectController($smartobjectLinkHandler);
33
-
34
-        $linkObj = $controller->storeSmartObject();
35
-        if ($linkObj->hasError()) {
36
-            /**
37
-             * @todo inform user and propose to close the window if a problem occured when saving the link
38
-             */
39
-        }
40
-
41
-        $xoopsMailer = xoops_getMailer();
42
-        $xoopsMailer->useMail();
43
-        $xoopsMailer->setTemplateDir('language/' . $xoopsConfig['language'] . '/mail_template');
44
-
45
-        $xoopsMailer->setTemplate('sendlink.tpl');
46
-        $xoopsMailer->assign('X_SITENAME', $xoopsConfig['sitename']);
47
-        $xoopsMailer->assign('TO_NAME', $linkObj->getVar('to_name'));
48
-        $xoopsMailer->assign('FROM_NAME', $linkObj->getVar('from_name'));
49
-        $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
50
-        $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
51
-        $xoopsMailer->assign('MESSAGE', $_POST['body']);
52
-        $xoopsMailer->setToEmails($linkObj->getVar('to_email'));
53
-        $xoopsMailer->setFromEmail($linkObj->getVar('from_email'));
54
-        $xoopsMailer->setFromName($xoopsConfig['sitename']);
55
-        $xoopsMailer->setSubject(sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $myts->oopsStripSlashesGPC($xoopsConfig['sitename'])));
56
-
57
-        if (!$xoopsMailer->send(true)) {
58
-            $xoopsTpl->assign('send_error', sprintf(_CO_SOBJECT_SEND_ERROR, $xoopsConfig['adminmail']) . '<br>' . $xoopsMailer->getErrors(true));
59
-        } else {
60
-            $xoopsTpl->assign('send_success', _CO_SOBJECT_SEND_SUCCESS);
61
-        }
62
-
63
-        break;
64
-
65
-    default:
66
-        if (isset($_GET['mid'])) {
67
-            $mid = $_GET['mid'];
68
-        } else {
69
-            /**
70
-             * @todo close the window if no mid is passed as GET
71
-             */
72
-        }
73
-
74
-        $hModule = xoops_getHandler('module');
75
-        $module  = $hModule->get($mid);
76
-        $linkObj->setVar('mid', $module->getVar('mid'));
77
-        $linkObj->setVar('mid_name', $module->getVar('name'));
78
-
79
-        if (isset($_GET['link'])) {
80
-            $link = $_GET['link'];
81
-        } else {
82
-            /**
83
-             * @todo close the window if no link is passed as GET
84
-             */
85
-        }
86
-        $linkObj->setVar('link', $link);
87
-
88
-        if (is_object($xoopsUser)) {
89
-            $linkObj->setVar('from_uid', $xoopsUser->getVar('uid'));
90
-            $linkObj->setVar('from_name', $xoopsUser->getVar('name') !== '' ? $xoopsUser->getVar('name') : $xoopsUser->getVar('uname'));
91
-            $linkObj->setVar('from_email', $xoopsUser->getVar('email'));
92
-        }
93
-
94
-        $linkObj->setVar('subject', sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $xoopsConfig['sitename']));
95
-        $linkObj->setVar('body', sprintf(_CO_SOBJECT_BODY_DEFAULT, $xoopsConfig['sitename'], $link));
96
-        $linkObj->setVar('date', time());
97
-        $linkObj->hideFieldFromForm(array('from_uid', 'to_uid', 'link', 'mid', 'mid_name'));
98
-
99
-        $form = $linkObj->getForm(_CO_SOBJECT_SEND_LINK_FORM, 'sendlink', false, _SEND, 'javascript:window.close();');
100
-
101
-        $form->assign($xoopsTpl);
102
-
103
-        $xoopsTpl->assign('showform', true);
104
-        break;
29
+	case 'sendlink':
30
+
31
+		require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
32
+		$controller = new SmartObjectController($smartobjectLinkHandler);
33
+
34
+		$linkObj = $controller->storeSmartObject();
35
+		if ($linkObj->hasError()) {
36
+			/**
37
+			 * @todo inform user and propose to close the window if a problem occured when saving the link
38
+			 */
39
+		}
40
+
41
+		$xoopsMailer = xoops_getMailer();
42
+		$xoopsMailer->useMail();
43
+		$xoopsMailer->setTemplateDir('language/' . $xoopsConfig['language'] . '/mail_template');
44
+
45
+		$xoopsMailer->setTemplate('sendlink.tpl');
46
+		$xoopsMailer->assign('X_SITENAME', $xoopsConfig['sitename']);
47
+		$xoopsMailer->assign('TO_NAME', $linkObj->getVar('to_name'));
48
+		$xoopsMailer->assign('FROM_NAME', $linkObj->getVar('from_name'));
49
+		$xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
50
+		$xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
51
+		$xoopsMailer->assign('MESSAGE', $_POST['body']);
52
+		$xoopsMailer->setToEmails($linkObj->getVar('to_email'));
53
+		$xoopsMailer->setFromEmail($linkObj->getVar('from_email'));
54
+		$xoopsMailer->setFromName($xoopsConfig['sitename']);
55
+		$xoopsMailer->setSubject(sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $myts->oopsStripSlashesGPC($xoopsConfig['sitename'])));
56
+
57
+		if (!$xoopsMailer->send(true)) {
58
+			$xoopsTpl->assign('send_error', sprintf(_CO_SOBJECT_SEND_ERROR, $xoopsConfig['adminmail']) . '<br>' . $xoopsMailer->getErrors(true));
59
+		} else {
60
+			$xoopsTpl->assign('send_success', _CO_SOBJECT_SEND_SUCCESS);
61
+		}
62
+
63
+		break;
64
+
65
+	default:
66
+		if (isset($_GET['mid'])) {
67
+			$mid = $_GET['mid'];
68
+		} else {
69
+			/**
70
+			 * @todo close the window if no mid is passed as GET
71
+			 */
72
+		}
73
+
74
+		$hModule = xoops_getHandler('module');
75
+		$module  = $hModule->get($mid);
76
+		$linkObj->setVar('mid', $module->getVar('mid'));
77
+		$linkObj->setVar('mid_name', $module->getVar('name'));
78
+
79
+		if (isset($_GET['link'])) {
80
+			$link = $_GET['link'];
81
+		} else {
82
+			/**
83
+			 * @todo close the window if no link is passed as GET
84
+			 */
85
+		}
86
+		$linkObj->setVar('link', $link);
87
+
88
+		if (is_object($xoopsUser)) {
89
+			$linkObj->setVar('from_uid', $xoopsUser->getVar('uid'));
90
+			$linkObj->setVar('from_name', $xoopsUser->getVar('name') !== '' ? $xoopsUser->getVar('name') : $xoopsUser->getVar('uname'));
91
+			$linkObj->setVar('from_email', $xoopsUser->getVar('email'));
92
+		}
93
+
94
+		$linkObj->setVar('subject', sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $xoopsConfig['sitename']));
95
+		$linkObj->setVar('body', sprintf(_CO_SOBJECT_BODY_DEFAULT, $xoopsConfig['sitename'], $link));
96
+		$linkObj->setVar('date', time());
97
+		$linkObj->hideFieldFromForm(array('from_uid', 'to_uid', 'link', 'mid', 'mid_name'));
98
+
99
+		$form = $linkObj->getForm(_CO_SOBJECT_SEND_LINK_FORM, 'sendlink', false, _SEND, 'javascript:window.close();');
100
+
101
+		$form->assign($xoopsTpl);
102
+
103
+		$xoopsTpl->assign('showform', true);
104
+		break;
105 105
 }
106 106
 
107 107
 $xoopsTpl->display('db:smartobject_sendlink.tpl');
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@  discard block
 block discarded – undo
7 7
  * Licence: GNU
8 8
  */
9 9
 
10
-require_once __DIR__ . '/header.php';
11
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartloader.php';
12
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectlink.php';
13
-require_once XOOPS_ROOT_PATH . '/class/template.php';
10
+require_once __DIR__.'/header.php';
11
+require_once SMARTOBJECT_ROOT_PATH.'class/smartloader.php';
12
+require_once SMARTOBJECT_ROOT_PATH.'class/smartobjectlink.php';
13
+require_once XOOPS_ROOT_PATH.'/class/template.php';
14 14
 
15 15
 $xoopsTpl                = new XoopsTpl();
16 16
 $myts                    = MyTextSanitizer::getInstance();
17 17
 $xoopsConfig['sitename'] = $myts->displayTarea($xoopsConfig['sitename']);
18 18
 
19 19
 xoops_header(false);
20
-echo smart_get_css_link(SMARTOBJECT_URL . 'assets/css/module.css');
20
+echo smart_get_css_link(SMARTOBJECT_URL.'assets/css/module.css');
21 21
 echo '</head><body>';
22 22
 
23 23
 $smartobjectLinkHandler = xoops_getModuleHandler('link', 'smartobject');
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 switch ($op) {
29 29
     case 'sendlink':
30 30
 
31
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
31
+        require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php';
32 32
         $controller = new SmartObjectController($smartobjectLinkHandler);
33 33
 
34 34
         $linkObj = $controller->storeSmartObject();
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
 
41 41
         $xoopsMailer = xoops_getMailer();
42 42
         $xoopsMailer->useMail();
43
-        $xoopsMailer->setTemplateDir('language/' . $xoopsConfig['language'] . '/mail_template');
43
+        $xoopsMailer->setTemplateDir('language/'.$xoopsConfig['language'].'/mail_template');
44 44
 
45 45
         $xoopsMailer->setTemplate('sendlink.tpl');
46 46
         $xoopsMailer->assign('X_SITENAME', $xoopsConfig['sitename']);
47 47
         $xoopsMailer->assign('TO_NAME', $linkObj->getVar('to_name'));
48 48
         $xoopsMailer->assign('FROM_NAME', $linkObj->getVar('from_name'));
49
-        $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
49
+        $xoopsMailer->assign('SITEURL', XOOPS_URL.'/');
50 50
         $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
51 51
         $xoopsMailer->assign('MESSAGE', $_POST['body']);
52 52
         $xoopsMailer->setToEmails($linkObj->getVar('to_email'));
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $xoopsMailer->setSubject(sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $myts->oopsStripSlashesGPC($xoopsConfig['sitename'])));
56 56
 
57 57
         if (!$xoopsMailer->send(true)) {
58
-            $xoopsTpl->assign('send_error', sprintf(_CO_SOBJECT_SEND_ERROR, $xoopsConfig['adminmail']) . '<br>' . $xoopsMailer->getErrors(true));
58
+            $xoopsTpl->assign('send_error', sprintf(_CO_SOBJECT_SEND_ERROR, $xoopsConfig['adminmail']).'<br>'.$xoopsMailer->getErrors(true));
59 59
         } else {
60 60
             $xoopsTpl->assign('send_success', _CO_SOBJECT_SEND_SUCCESS);
61 61
         }
Please login to merge, or discard this patch.
admin/adsense.php 3 patches
Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -12,32 +12,32 @@  discard block
 block discarded – undo
12 12
 
13 13
 function editclass($showmenu = false, $adsenseid = 0, $clone = false)
14 14
 {
15
-    global $smartobjectAdsenseHandler;
16
-
17
-    $adsenseObj = $smartobjectAdsenseHandler->get($adsenseid);
18
-
19
-    if (!$clone && !$adsenseObj->isNew()) {
20
-        if ($showmenu) {
21
-            //smart_adminMenu(3, _AM_SOBJECT_ADSENSES . " > " . _AM_SOBJECT_EDITING);
22
-        }
23
-        smart_collapsableBar('adsenseedit', _AM_SOBJECT_ADSENSES_EDIT, _AM_SOBJECT_ADSENSES_EDIT_INFO);
24
-
25
-        $sform = $adsenseObj->getForm(_AM_SOBJECT_ADSENSES_EDIT, 'addadsense');
26
-        $sform->display();
27
-        smart_close_collapsable('adsenseedit');
28
-    } else {
29
-        $adsenseObj->setVar('adsenseid', 0);
30
-        $adsenseObj->setVar('tag', '');
31
-
32
-        if ($showmenu) {
33
-            //smart_adminMenu(3, _AM_SOBJECT_ADSENSES . " > " . _CO_SOBJECT_CREATINGNEW);
34
-        }
35
-
36
-        smart_collapsableBar('adsensecreate', _AM_SOBJECT_ADSENSES_CREATE, _AM_SOBJECT_ADSENSES_CREATE_INFO);
37
-        $sform = $adsenseObj->getForm(_AM_SOBJECT_ADSENSES_CREATE, 'addadsense', false, false, false, true);
38
-        $sform->display();
39
-        smart_close_collapsable('adsensecreate');
40
-    }
15
+	global $smartobjectAdsenseHandler;
16
+
17
+	$adsenseObj = $smartobjectAdsenseHandler->get($adsenseid);
18
+
19
+	if (!$clone && !$adsenseObj->isNew()) {
20
+		if ($showmenu) {
21
+			//smart_adminMenu(3, _AM_SOBJECT_ADSENSES . " > " . _AM_SOBJECT_EDITING);
22
+		}
23
+		smart_collapsableBar('adsenseedit', _AM_SOBJECT_ADSENSES_EDIT, _AM_SOBJECT_ADSENSES_EDIT_INFO);
24
+
25
+		$sform = $adsenseObj->getForm(_AM_SOBJECT_ADSENSES_EDIT, 'addadsense');
26
+		$sform->display();
27
+		smart_close_collapsable('adsenseedit');
28
+	} else {
29
+		$adsenseObj->setVar('adsenseid', 0);
30
+		$adsenseObj->setVar('tag', '');
31
+
32
+		if ($showmenu) {
33
+			//smart_adminMenu(3, _AM_SOBJECT_ADSENSES . " > " . _CO_SOBJECT_CREATINGNEW);
34
+		}
35
+
36
+		smart_collapsableBar('adsensecreate', _AM_SOBJECT_ADSENSES_CREATE, _AM_SOBJECT_ADSENSES_CREATE_INFO);
37
+		$sform = $adsenseObj->getForm(_AM_SOBJECT_ADSENSES_CREATE, 'addadsense', false, false, false, true);
38
+		$sform->display();
39
+		smart_close_collapsable('adsensecreate');
40
+	}
41 41
 }
42 42
 
43 43
 require_once __DIR__ . '/admin_header.php';
@@ -50,73 +50,73 @@  discard block
 block discarded – undo
50 50
 $op = '';
51 51
 
52 52
 if (isset($_GET['op'])) {
53
-    $op = $_GET['op'];
53
+	$op = $_GET['op'];
54 54
 }
55 55
 if (isset($_POST['op'])) {
56
-    $op = $_POST['op'];
56
+	$op = $_POST['op'];
57 57
 }
58 58
 
59 59
 switch ($op) {
60
-    case 'mod':
60
+	case 'mod':
61 61
 
62
-        $adsenseid = isset($_GET['adsenseid']) ? (int)$_GET['adsenseid'] : 0;
62
+		$adsenseid = isset($_GET['adsenseid']) ? (int)$_GET['adsenseid'] : 0;
63 63
 
64
-        smart_xoops_cp_header();
65
-        $adminObject->displayNavigation(basename(__FILE__));
64
+		smart_xoops_cp_header();
65
+		$adminObject->displayNavigation(basename(__FILE__));
66 66
 
67
-        editclass(true, $adsenseid);
68
-        break;
67
+		editclass(true, $adsenseid);
68
+		break;
69 69
 
70
-    case 'clone':
70
+	case 'clone':
71 71
 
72
-        $adsenseid = isset($_GET['adsenseid']) ? (int)$_GET['adsenseid'] : 0;
72
+		$adsenseid = isset($_GET['adsenseid']) ? (int)$_GET['adsenseid'] : 0;
73 73
 
74
-        smart_xoops_cp_header();
75
-        $adminObject->displayNavigation(basename(__FILE__));
74
+		smart_xoops_cp_header();
75
+		$adminObject->displayNavigation(basename(__FILE__));
76 76
 
77
-        editclass(true, $adsenseid, true);
78
-        break;
77
+		editclass(true, $adsenseid, true);
78
+		break;
79 79
 
80
-    case 'addadsense':
81
-        if (@require_once SMARTOBJECT_ROOT_PATH . 'include/captcha/captcha.php') {
82
-            $xoopsCaptcha = XoopsCaptcha::getInstance();
83
-            if (!$xoopsCaptcha->verify()) {
84
-                redirect_header('javascript:history.go(-1);', 3, $xoopsCaptcha->getMessage());
85
-                exit;
86
-            }
87
-        }
88
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
89
-        $controller = new SmartObjectController($smartobjectAdsenseHandler);
90
-        $controller->storeFromDefaultForm(_AM_SOBJECT_ADSENSES_CREATED, _AM_SOBJECT_ADSENSES_MODIFIED);
91
-        break;
80
+	case 'addadsense':
81
+		if (@require_once SMARTOBJECT_ROOT_PATH . 'include/captcha/captcha.php') {
82
+			$xoopsCaptcha = XoopsCaptcha::getInstance();
83
+			if (!$xoopsCaptcha->verify()) {
84
+				redirect_header('javascript:history.go(-1);', 3, $xoopsCaptcha->getMessage());
85
+				exit;
86
+			}
87
+		}
88
+		require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
89
+		$controller = new SmartObjectController($smartobjectAdsenseHandler);
90
+		$controller->storeFromDefaultForm(_AM_SOBJECT_ADSENSES_CREATED, _AM_SOBJECT_ADSENSES_MODIFIED);
91
+		break;
92 92
 
93
-    case 'del':
93
+	case 'del':
94 94
 
95
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
96
-        $controller = new SmartObjectController($smartobjectAdsenseHandler);
97
-        $controller->handleObjectDeletion();
95
+		require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
96
+		$controller = new SmartObjectController($smartobjectAdsenseHandler);
97
+		$controller->handleObjectDeletion();
98 98
 
99
-        break;
99
+		break;
100 100
 
101
-    default:
101
+	default:
102 102
 
103
-        smart_xoops_cp_header();
104
-        $adminObject->displayNavigation(basename(__FILE__));
103
+		smart_xoops_cp_header();
104
+		$adminObject->displayNavigation(basename(__FILE__));
105 105
 
106
-        //smart_adminMenu(3, _AM_SOBJECT_ADSENSES);
106
+		//smart_adminMenu(3, _AM_SOBJECT_ADSENSES);
107 107
 
108
-        smart_collapsableBar('createdadsenses', _AM_SOBJECT_ADSENSES, _AM_SOBJECT_ADSENSES_DSC);
108
+		smart_collapsableBar('createdadsenses', _AM_SOBJECT_ADSENSES, _AM_SOBJECT_ADSENSES_DSC);
109 109
 
110
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
111
-        $objectTable = new SmartObjectTable($smartobjectAdsenseHandler);
112
-        $objectTable->addColumn(new SmartObjectColumn('description', 'left'));
113
-        $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_ADSENSE_TAG, 'center', 200, 'getXoopsCode'));
110
+		require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
111
+		$objectTable = new SmartObjectTable($smartobjectAdsenseHandler);
112
+		$objectTable->addColumn(new SmartObjectColumn('description', 'left'));
113
+		$objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_ADSENSE_TAG, 'center', 200, 'getXoopsCode'));
114 114
 
115
-        //      $objectTable->addCustomAction('getCreateItemLink');
116
-        //      $objectTable->addCustomAction('getCreateAttributLink');
115
+		//      $objectTable->addCustomAction('getCreateItemLink');
116
+		//      $objectTable->addCustomAction('getCreateAttributLink');
117 117
 
118
-        $objectTable->addIntroButton('addadsense', 'adsense.php?op=mod', _AM_SOBJECT_ADSENSES_CREATE);
119
-        /*
118
+		$objectTable->addIntroButton('addadsense', 'adsense.php?op=mod', _AM_SOBJECT_ADSENSES_CREATE);
119
+		/*
120 120
                 $criteria_upcoming = new CriteriaCompo();
121 121
                 $criteria_upcoming->add(new Criteria('start_date', time(), '>'));
122 122
                 $objectTable->addFilter(_AM_SOBJECT_FILTER_UPCOMING, array(
@@ -140,16 +140,16 @@  discard block
 block discarded – undo
140 140
                                             'criteria' => $criteria_last30days
141 141
                 ));
142 142
         */
143
-        $objectTable->addQuickSearch(array('title', 'summary', 'description'));
144
-        $objectTable->addCustomAction('getCloneLink');
143
+		$objectTable->addQuickSearch(array('title', 'summary', 'description'));
144
+		$objectTable->addCustomAction('getCloneLink');
145 145
 
146
-        $objectTable->render();
146
+		$objectTable->render();
147 147
 
148
-        echo '<br>';
149
-        smart_close_collapsable('createdadsenses');
150
-        echo '<br>';
148
+		echo '<br>';
149
+		smart_close_collapsable('createdadsenses');
150
+		echo '<br>';
151 151
 
152
-        break;
152
+		break;
153 153
 }
154 154
 
155 155
 //smart_modFooter();
Please login to merge, or discard this patch.
Switch Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -57,66 +57,66 @@  discard block
 block discarded – undo
57 57
 }
58 58
 
59 59
 switch ($op) {
60
-    case 'mod':
60
+    	case 'mod':
61 61
 
62
-        $adsenseid = isset($_GET['adsenseid']) ? (int)$_GET['adsenseid'] : 0;
62
+        	$adsenseid = isset($_GET['adsenseid']) ? (int)$_GET['adsenseid'] : 0;
63 63
 
64
-        smart_xoops_cp_header();
65
-        $adminObject->displayNavigation(basename(__FILE__));
64
+        	smart_xoops_cp_header();
65
+        	$adminObject->displayNavigation(basename(__FILE__));
66 66
 
67
-        editclass(true, $adsenseid);
68
-        break;
67
+        	editclass(true, $adsenseid);
68
+        	break;
69 69
 
70
-    case 'clone':
70
+    	case 'clone':
71 71
 
72
-        $adsenseid = isset($_GET['adsenseid']) ? (int)$_GET['adsenseid'] : 0;
72
+        	$adsenseid = isset($_GET['adsenseid']) ? (int)$_GET['adsenseid'] : 0;
73 73
 
74
-        smart_xoops_cp_header();
75
-        $adminObject->displayNavigation(basename(__FILE__));
74
+        	smart_xoops_cp_header();
75
+        	$adminObject->displayNavigation(basename(__FILE__));
76 76
 
77
-        editclass(true, $adsenseid, true);
78
-        break;
77
+        	editclass(true, $adsenseid, true);
78
+        	break;
79 79
 
80
-    case 'addadsense':
81
-        if (@require_once SMARTOBJECT_ROOT_PATH . 'include/captcha/captcha.php') {
82
-            $xoopsCaptcha = XoopsCaptcha::getInstance();
83
-            if (!$xoopsCaptcha->verify()) {
84
-                redirect_header('javascript:history.go(-1);', 3, $xoopsCaptcha->getMessage());
85
-                exit;
86
-            }
87
-        }
88
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
89
-        $controller = new SmartObjectController($smartobjectAdsenseHandler);
90
-        $controller->storeFromDefaultForm(_AM_SOBJECT_ADSENSES_CREATED, _AM_SOBJECT_ADSENSES_MODIFIED);
91
-        break;
80
+    	case 'addadsense':
81
+        	if (@require_once SMARTOBJECT_ROOT_PATH . 'include/captcha/captcha.php') {
82
+            	$xoopsCaptcha = XoopsCaptcha::getInstance();
83
+            	if (!$xoopsCaptcha->verify()) {
84
+                	redirect_header('javascript:history.go(-1);', 3, $xoopsCaptcha->getMessage());
85
+                	exit;
86
+            	}
87
+        	}
88
+        	require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
89
+        	$controller = new SmartObjectController($smartobjectAdsenseHandler);
90
+        	$controller->storeFromDefaultForm(_AM_SOBJECT_ADSENSES_CREATED, _AM_SOBJECT_ADSENSES_MODIFIED);
91
+        	break;
92 92
 
93
-    case 'del':
93
+    	case 'del':
94 94
 
95
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
96
-        $controller = new SmartObjectController($smartobjectAdsenseHandler);
97
-        $controller->handleObjectDeletion();
95
+        	require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
96
+        	$controller = new SmartObjectController($smartobjectAdsenseHandler);
97
+        	$controller->handleObjectDeletion();
98 98
 
99
-        break;
99
+        	break;
100 100
 
101
-    default:
101
+    	default:
102 102
 
103
-        smart_xoops_cp_header();
104
-        $adminObject->displayNavigation(basename(__FILE__));
103
+        	smart_xoops_cp_header();
104
+        	$adminObject->displayNavigation(basename(__FILE__));
105 105
 
106
-        //smart_adminMenu(3, _AM_SOBJECT_ADSENSES);
106
+        	//smart_adminMenu(3, _AM_SOBJECT_ADSENSES);
107 107
 
108
-        smart_collapsableBar('createdadsenses', _AM_SOBJECT_ADSENSES, _AM_SOBJECT_ADSENSES_DSC);
108
+        	smart_collapsableBar('createdadsenses', _AM_SOBJECT_ADSENSES, _AM_SOBJECT_ADSENSES_DSC);
109 109
 
110
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
111
-        $objectTable = new SmartObjectTable($smartobjectAdsenseHandler);
112
-        $objectTable->addColumn(new SmartObjectColumn('description', 'left'));
113
-        $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_ADSENSE_TAG, 'center', 200, 'getXoopsCode'));
110
+        	require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
111
+        	$objectTable = new SmartObjectTable($smartobjectAdsenseHandler);
112
+        	$objectTable->addColumn(new SmartObjectColumn('description', 'left'));
113
+        	$objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_ADSENSE_TAG, 'center', 200, 'getXoopsCode'));
114 114
 
115
-        //      $objectTable->addCustomAction('getCreateItemLink');
116
-        //      $objectTable->addCustomAction('getCreateAttributLink');
115
+        	//      $objectTable->addCustomAction('getCreateItemLink');
116
+        	//      $objectTable->addCustomAction('getCreateAttributLink');
117 117
 
118
-        $objectTable->addIntroButton('addadsense', 'adsense.php?op=mod', _AM_SOBJECT_ADSENSES_CREATE);
119
-        /*
118
+        	$objectTable->addIntroButton('addadsense', 'adsense.php?op=mod', _AM_SOBJECT_ADSENSES_CREATE);
119
+        	/*
120 120
                 $criteria_upcoming = new CriteriaCompo();
121 121
                 $criteria_upcoming->add(new Criteria('start_date', time(), '>'));
122 122
                 $objectTable->addFilter(_AM_SOBJECT_FILTER_UPCOMING, array(
@@ -140,16 +140,16 @@  discard block
 block discarded – undo
140 140
                                             'criteria' => $criteria_last30days
141 141
                 ));
142 142
         */
143
-        $objectTable->addQuickSearch(array('title', 'summary', 'description'));
144
-        $objectTable->addCustomAction('getCloneLink');
143
+        	$objectTable->addQuickSearch(array('title', 'summary', 'description'));
144
+        	$objectTable->addCustomAction('getCloneLink');
145 145
 
146
-        $objectTable->render();
146
+        	$objectTable->render();
147 147
 
148
-        echo '<br>';
149
-        smart_close_collapsable('createdadsenses');
150
-        echo '<br>';
148
+        	echo '<br>';
149
+        	smart_close_collapsable('createdadsenses');
150
+        	echo '<br>';
151 151
 
152
-        break;
152
+        	break;
153 153
 }
154 154
 
155 155
 //smart_modFooter();
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
     }
41 41
 }
42 42
 
43
-require_once __DIR__ . '/admin_header.php';
44
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
45
-require_once SMARTOBJECT_ROOT_PATH . 'class/adsense.php';
43
+require_once __DIR__.'/admin_header.php';
44
+require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php';
45
+require_once SMARTOBJECT_ROOT_PATH.'class/adsense.php';
46 46
 $smartobjectAdsenseHandler = xoops_getModuleHandler('adsense');
47 47
 smart_loadLanguageFile('smartobject', 'adsense');
48 48
 $adminObject = \Xmf\Module\Admin::getInstance();
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 switch ($op) {
60 60
     case 'mod':
61 61
 
62
-        $adsenseid = isset($_GET['adsenseid']) ? (int)$_GET['adsenseid'] : 0;
62
+        $adsenseid = isset($_GET['adsenseid']) ? (int) $_GET['adsenseid'] : 0;
63 63
 
64 64
         smart_xoops_cp_header();
65 65
         $adminObject->displayNavigation(basename(__FILE__));
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
     case 'clone':
71 71
 
72
-        $adsenseid = isset($_GET['adsenseid']) ? (int)$_GET['adsenseid'] : 0;
72
+        $adsenseid = isset($_GET['adsenseid']) ? (int) $_GET['adsenseid'] : 0;
73 73
 
74 74
         smart_xoops_cp_header();
75 75
         $adminObject->displayNavigation(basename(__FILE__));
@@ -78,21 +78,21 @@  discard block
 block discarded – undo
78 78
         break;
79 79
 
80 80
     case 'addadsense':
81
-        if (@require_once SMARTOBJECT_ROOT_PATH . 'include/captcha/captcha.php') {
81
+        if (@require_once SMARTOBJECT_ROOT_PATH.'include/captcha/captcha.php') {
82 82
             $xoopsCaptcha = XoopsCaptcha::getInstance();
83 83
             if (!$xoopsCaptcha->verify()) {
84 84
                 redirect_header('javascript:history.go(-1);', 3, $xoopsCaptcha->getMessage());
85 85
                 exit;
86 86
             }
87 87
         }
88
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
88
+        require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php';
89 89
         $controller = new SmartObjectController($smartobjectAdsenseHandler);
90 90
         $controller->storeFromDefaultForm(_AM_SOBJECT_ADSENSES_CREATED, _AM_SOBJECT_ADSENSES_MODIFIED);
91 91
         break;
92 92
 
93 93
     case 'del':
94 94
 
95
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
95
+        require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php';
96 96
         $controller = new SmartObjectController($smartobjectAdsenseHandler);
97 97
         $controller->handleObjectDeletion();
98 98
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
         smart_collapsableBar('createdadsenses', _AM_SOBJECT_ADSENSES, _AM_SOBJECT_ADSENSES_DSC);
109 109
 
110
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
110
+        require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php';
111 111
         $objectTable = new SmartObjectTable($smartobjectAdsenseHandler);
112 112
         $objectTable->addColumn(new SmartObjectColumn('description', 'left'));
113 113
         $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_ADSENSE_TAG, 'center', 200, 'getXoopsCode'));
@@ -154,4 +154,4 @@  discard block
 block discarded – undo
154 154
 
155 155
 //smart_modFooter();
156 156
 //xoops_cp_footer();
157
-require_once __DIR__ . '/admin_footer.php';
157
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/admin_header2.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  * Licence: GNU
8 8
  */
9 9
 
10
-require_once __DIR__ . '/../../../include/cp_header.php';
10
+require_once __DIR__.'/../../../include/cp_header.php';
11 11
 
12
-require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
12
+require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php';
13 13
 smart_loadCommonLanguageFile();
Please login to merge, or discard this patch.
admin/about2.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
  * Licence: GNU
8 8
  */
9 9
 //
10
-require_once __DIR__ . '/admin_header.php';
10
+require_once __DIR__.'/admin_header.php';
11 11
 
12
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectabout.php';
12
+require_once SMARTOBJECT_ROOT_PATH.'class/smartobjectabout.php';
13 13
 $aboutObj = new SmartobjectAbout();
14 14
 $aboutObj->render();
Please login to merge, or discard this patch.
admin/menu.php 2 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 if (false !== ($moduleHelper = Xmf\Module\Helper::getHelper($moduleDirName))) {
11 11
 } else {
12
-    $moduleHelper = Xmf\Module\Helper::getHelper('system');
12
+	$moduleHelper = Xmf\Module\Helper::getHelper('system');
13 13
 }
14 14
 $adminObject = \Xmf\Module\Admin::getInstance();
15 15
 
@@ -54,43 +54,43 @@  discard block
 block discarded – undo
54 54
 //---------------------------------
55 55
 
56 56
 if (!defined('SMARTOBJECT_ROOT_PATH')) {
57
-    require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/functions.php';
57
+	require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/functions.php';
58 58
 }
59 59
 
60 60
 $smartobjectConfig = smart_getModuleConfig('smartobject');
61 61
 
62 62
 if (isset($smartobjectConfig['enable_currencyman']) && $smartobjectConfig['enable_currencyman'] === true) {
63
-    ++$i;
64
-    $adminmenu[$i]['title'] = _MI_SOBJECT_CURRENCIES;
65
-    $adminmenu[$i]['link']  = 'admin/currency.php';
66
-    $adminmenu[$i]['icon']  = $pathIcon32 . '/cash_stack.png';
63
+	++$i;
64
+	$adminmenu[$i]['title'] = _MI_SOBJECT_CURRENCIES;
65
+	$adminmenu[$i]['link']  = 'admin/currency.php';
66
+	$adminmenu[$i]['icon']  = $pathIcon32 . '/cash_stack.png';
67 67
 }
68 68
 
69 69
 global $xoopsModule;
70 70
 if (isset($xoopsModule)) {
71
-    //  $i = -1;
72
-
73
-    // --- for XCL ---
74
-    //  $headermenu[$i]['link'] = '../../system/admin.php?fct=preferences&amp;op=showmod&amp;mod=' . $xoopsModule->getVar('mid');
75
-    $mid = $xoopsModule->getVar('mid');
76
-    if (defined('XOOPS_CUBE_LEGACY')) {
77
-        $link_pref = XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid;
78
-    } else {
79
-        $link_pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid;
80
-    }
81
-    $headermenu[$i]['link'] = $link_pref;
82
-    // -----
83
-
84
-    // --- for XCL ---
85
-    //  $headermenu[$i]['link'] = XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule->getVar('dirname');
86
-    $dirname = $xoopsModule->getVar('dirname');
87
-    if (defined('XOOPS_CUBE_LEGACY')) {
88
-        $link_module = XOOPS_URL . '/modules/legacy/admin/index.php?action=ModuleUpdate&dirname=' . $dirname;
89
-    } else {
90
-        $link_module = XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=' . $dirname;
91
-    }
92
-    $headermenu[$i]['link'] = $link_module;
93
-    // -----
94
-
95
-    ++$i;
71
+	//  $i = -1;
72
+
73
+	// --- for XCL ---
74
+	//  $headermenu[$i]['link'] = '../../system/admin.php?fct=preferences&amp;op=showmod&amp;mod=' . $xoopsModule->getVar('mid');
75
+	$mid = $xoopsModule->getVar('mid');
76
+	if (defined('XOOPS_CUBE_LEGACY')) {
77
+		$link_pref = XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid;
78
+	} else {
79
+		$link_pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid;
80
+	}
81
+	$headermenu[$i]['link'] = $link_pref;
82
+	// -----
83
+
84
+	// --- for XCL ---
85
+	//  $headermenu[$i]['link'] = XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule->getVar('dirname');
86
+	$dirname = $xoopsModule->getVar('dirname');
87
+	if (defined('XOOPS_CUBE_LEGACY')) {
88
+		$link_module = XOOPS_URL . '/modules/legacy/admin/index.php?action=ModuleUpdate&dirname=' . $dirname;
89
+	} else {
90
+		$link_module = XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=' . $dirname;
91
+	}
92
+	$headermenu[$i]['link'] = $link_module;
93
+	// -----
94
+
95
+	++$i;
96 96
 }
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 $i                      = 0;
23 23
 $adminmenu[$i]['title'] = _AM_MODULEADMIN_HOME;
24 24
 $adminmenu[$i]['link']  = 'admin/index.php';
25
-$adminmenu[$i]['icon']  = $pathIcon32 . '/home.png';
25
+$adminmenu[$i]['icon']  = $pathIcon32.'/home.png';
26 26
 //++$i;
27 27
 //$adminmenu[$i]['title'] = _MI_SOBJECT_INDEX;
28 28
 //$adminmenu[$i]['link'] = "admin/main.php";
@@ -31,30 +31,30 @@  discard block
 block discarded – undo
31 31
 ++$i;
32 32
 $adminmenu[$i]['title'] = _MI_SOBJECT_SENT_LINKS;
33 33
 $adminmenu[$i]['link']  = 'admin/link.php';
34
-$adminmenu[$i]['icon']  = $pathIcon32 . '/addlink.png';
34
+$adminmenu[$i]['icon']  = $pathIcon32.'/addlink.png';
35 35
 
36 36
 ++$i;
37 37
 $adminmenu[$i]['title'] = _MI_SOBJECT_TAGS;
38 38
 $adminmenu[$i]['link']  = 'admin/customtag.php';
39
-$adminmenu[$i]['icon']  = $pathIcon32 . '/identity.png';
39
+$adminmenu[$i]['icon']  = $pathIcon32.'/identity.png';
40 40
 
41 41
 ++$i;
42 42
 $adminmenu[$i]['title'] = _MI_SOBJECT_ADSENSES;
43 43
 $adminmenu[$i]['link']  = 'admin/adsense.php';
44
-$adminmenu[$i]['icon']  = $pathIcon32 . '/alert.png';
44
+$adminmenu[$i]['icon']  = $pathIcon32.'/alert.png';
45 45
 ++$i;
46 46
 $adminmenu[$i]['title'] = _MI_SOBJECT_RATINGS;
47 47
 $adminmenu[$i]['link']  = 'admin/rating.php';
48
-$adminmenu[$i]['icon']  = $pathIcon32 . '/stats.png';
48
+$adminmenu[$i]['icon']  = $pathIcon32.'/stats.png';
49 49
 
50 50
 ++$i;
51 51
 $adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT;
52 52
 $adminmenu[$i]['link']  = 'admin/about.php';
53
-$adminmenu[$i]['icon']  = $pathIcon32 . '/about.png';
53
+$adminmenu[$i]['icon']  = $pathIcon32.'/about.png';
54 54
 //---------------------------------
55 55
 
56 56
 if (!defined('SMARTOBJECT_ROOT_PATH')) {
57
-    require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/functions.php';
57
+    require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/functions.php';
58 58
 }
59 59
 
60 60
 $smartobjectConfig = smart_getModuleConfig('smartobject');
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     ++$i;
64 64
     $adminmenu[$i]['title'] = _MI_SOBJECT_CURRENCIES;
65 65
     $adminmenu[$i]['link']  = 'admin/currency.php';
66
-    $adminmenu[$i]['icon']  = $pathIcon32 . '/cash_stack.png';
66
+    $adminmenu[$i]['icon']  = $pathIcon32.'/cash_stack.png';
67 67
 }
68 68
 
69 69
 global $xoopsModule;
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
     //  $headermenu[$i]['link'] = '../../system/admin.php?fct=preferences&amp;op=showmod&amp;mod=' . $xoopsModule->getVar('mid');
75 75
     $mid = $xoopsModule->getVar('mid');
76 76
     if (defined('XOOPS_CUBE_LEGACY')) {
77
-        $link_pref = XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid;
77
+        $link_pref = XOOPS_URL.'/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id='.$mid;
78 78
     } else {
79
-        $link_pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid;
79
+        $link_pref = XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$mid;
80 80
     }
81 81
     $headermenu[$i]['link'] = $link_pref;
82 82
     // -----
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
     //  $headermenu[$i]['link'] = XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule->getVar('dirname');
86 86
     $dirname = $xoopsModule->getVar('dirname');
87 87
     if (defined('XOOPS_CUBE_LEGACY')) {
88
-        $link_module = XOOPS_URL . '/modules/legacy/admin/index.php?action=ModuleUpdate&dirname=' . $dirname;
88
+        $link_module = XOOPS_URL.'/modules/legacy/admin/index.php?action=ModuleUpdate&dirname='.$dirname;
89 89
     } else {
90
-        $link_module = XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=' . $dirname;
90
+        $link_module = XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=update&module='.$dirname;
91 91
     }
92 92
     $headermenu[$i]['link'] = $link_module;
93 93
     // -----
Please login to merge, or discard this patch.