Completed
Push — master ( a50592...10bab4 )
by Michael
01:56
created
class/xml.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 
28 28
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
29
-require_once __DIR__ . '/../include/vars.php';
29
+require_once __DIR__.'/../include/vars.php';
30 30
 //mod_loadFunctions('', $GLOBALS['moddirname']);
31 31
 
32 32
 /*** GENERAL USAGE *********************************************************
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
  */
65 65
 
66 66
 // your local timezone, set to "" to disable or for GMT
67
-$server_TZ = abs((int)($GLOBALS['xoopsConfig']['server_TZ'] * 3600.0));
68
-$prefix    = ($GLOBALS['xoopsConfig']['server_TZ'] < 0) ? '-' : '+';
69
-$TIME_ZONE = $prefix . date('H:i', $server_TZ);
67
+$server_TZ = abs((int) ($GLOBALS['xoopsConfig']['server_TZ']*3600.0));
68
+$prefix    = ($GLOBALS['xoopsConfig']['server_TZ']<0) ? '-' : '+';
69
+$TIME_ZONE = $prefix.date('H:i', $server_TZ);
70 70
 define('TIME_ZONE', $TIME_ZONE);
71 71
 // Version string.
72 72
 define('FEEDCREATOR_VERSION', 'ARTICLE @ XOOPS powered by FeedCreator');
73 73
 
74
-require_once __DIR__ . '/feedcreator.class.php';
74
+require_once __DIR__.'/feedcreator.class.php';
75 75
 
76 76
 /**
77 77
  * Description
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
          */
96 96
         public function __construct($version)
97 97
         {
98
-            $this->filename = XOOPS_CACHE_PATH . '/feed.xml';
98
+            $this->filename = XOOPS_CACHE_PATH.'/feed.xml';
99 99
             $this->version  = $version;
100 100
         }
101 101
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 foreach (array_keys($val) as $key) {
123 123
                     $val[$key] = $this->convert_encoding($val[$key]);
124 124
                 }
125
-            } else {
125
+            }else {
126 126
                 $val = XoopsLocal::convert_encoding($val, $this->encoding, _CHARSET);
127 127
             }
128 128
 
Please login to merge, or discard this patch.
Indentation   +94 added lines, -94 removed lines patch added patch discarded remove patch
@@ -81,100 +81,100 @@
 block discarded – undo
81 81
  * @link
82 82
  */
83 83
 if (!class_exists('Xmlfeed')) {
84
-    /**
85
-     * Class Bxmlfeed
86
-     */
87
-    class Bxmlfeed extends UniversalFeedCreator
88
-    {
89
-        public $version;
90
-        public $filename = '';
91
-
92
-        /**
93
-         * Bxmlfeed constructor.
94
-         * @param $version
95
-         */
96
-        public function __construct($version)
97
-        {
98
-            $this->filename = XOOPS_CACHE_PATH . '/feed.xml';
99
-            $this->version  = $version;
100
-        }
101
-
102
-        /**
103
-         * @param      $var
104
-         * @param      $val
105
-         * @param bool $encoding
106
-         */
107
-        public function setVar($var, $val, $encoding = false)
108
-        {
109
-            if (!empty($encoding)) {
110
-                $val = $this->convert_encoding($val);
111
-            }
112
-            $this->$var = $val;
113
-        }
114
-
115
-        /**
116
-         * @param $val
117
-         * @return array|mixed|string
118
-         */
119
-        public function convert_encoding($val)
120
-        {
121
-            if (is_array($val)) {
122
-                foreach (array_keys($val) as $key) {
123
-                    $val[$key] = $this->convert_encoding($val[$key]);
124
-                }
125
-            } else {
126
-                $val = XoopsLocal::convert_encoding($val, $this->encoding, _CHARSET);
127
-            }
128
-
129
-            return $val;
130
-        }
131
-
132
-        /**
133
-         * @param $var
134
-         * @return mixed
135
-         */
136
-        public function getVar($var)
137
-        {
138
-            return $this->$var;
139
-        }
140
-
141
-        /**
142
-         * @param $img
143
-         */
144
-        public function setImage(&$img)
145
-        {
146
-            $image = new FeedImage();
147
-            foreach ($img as $key => $val) {
148
-                $image->$key = $this->convert_encoding($val);
149
-            }
150
-            $this->setVar('image', $image);
151
-        }
152
-
153
-        /**
154
-         * @param $itm
155
-         */
156
-        public function _addItem(&$itm)
157
-        {
158
-            $item = new FeedItem();
159
-            foreach ($itm as $key => $val) {
160
-                $item->$key = $this->convert_encoding($val);
161
-            }
162
-            $this->addItem($item);
163
-        }
164
-
165
-        /**
166
-         * @param $items
167
-         */
168
-        public function addItems(&$items)
169
-        {
170
-            if (!is_array($items) || 0 == count($items)) {
171
-                return;
172
-            }
173
-            foreach ($items as $item) {
174
-                $this->_addItem($item);
175
-            }
176
-        }
177
-    }
84
+	/**
85
+	 * Class Bxmlfeed
86
+	 */
87
+	class Bxmlfeed extends UniversalFeedCreator
88
+	{
89
+		public $version;
90
+		public $filename = '';
91
+
92
+		/**
93
+		 * Bxmlfeed constructor.
94
+		 * @param $version
95
+		 */
96
+		public function __construct($version)
97
+		{
98
+			$this->filename = XOOPS_CACHE_PATH . '/feed.xml';
99
+			$this->version  = $version;
100
+		}
101
+
102
+		/**
103
+		 * @param      $var
104
+		 * @param      $val
105
+		 * @param bool $encoding
106
+		 */
107
+		public function setVar($var, $val, $encoding = false)
108
+		{
109
+			if (!empty($encoding)) {
110
+				$val = $this->convert_encoding($val);
111
+			}
112
+			$this->$var = $val;
113
+		}
114
+
115
+		/**
116
+		 * @param $val
117
+		 * @return array|mixed|string
118
+		 */
119
+		public function convert_encoding($val)
120
+		{
121
+			if (is_array($val)) {
122
+				foreach (array_keys($val) as $key) {
123
+					$val[$key] = $this->convert_encoding($val[$key]);
124
+				}
125
+			} else {
126
+				$val = XoopsLocal::convert_encoding($val, $this->encoding, _CHARSET);
127
+			}
128
+
129
+			return $val;
130
+		}
131
+
132
+		/**
133
+		 * @param $var
134
+		 * @return mixed
135
+		 */
136
+		public function getVar($var)
137
+		{
138
+			return $this->$var;
139
+		}
140
+
141
+		/**
142
+		 * @param $img
143
+		 */
144
+		public function setImage(&$img)
145
+		{
146
+			$image = new FeedImage();
147
+			foreach ($img as $key => $val) {
148
+				$image->$key = $this->convert_encoding($val);
149
+			}
150
+			$this->setVar('image', $image);
151
+		}
152
+
153
+		/**
154
+		 * @param $itm
155
+		 */
156
+		public function _addItem(&$itm)
157
+		{
158
+			$item = new FeedItem();
159
+			foreach ($itm as $key => $val) {
160
+				$item->$key = $this->convert_encoding($val);
161
+			}
162
+			$this->addItem($item);
163
+		}
164
+
165
+		/**
166
+		 * @param $items
167
+		 */
168
+		public function addItems(&$items)
169
+		{
170
+			if (!is_array($items) || 0 == count($items)) {
171
+				return;
172
+			}
173
+			foreach ($items as $item) {
174
+				$this->_addItem($item);
175
+			}
176
+		}
177
+	}
178 178
 }
179 179
 
180 180
 PlanetUtility::planetParseClass('
Please login to merge, or discard this patch.
admin/admin.category.php 2 patches
Indentation   +129 added lines, -129 removed lines patch added patch discarded remove patch
@@ -41,136 +41,136 @@
 block discarded – undo
41 41
 $blogHandler     = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
42 42
 
43 43
 switch ($op) {
44
-    case 'save':
45
-        if ($cat_id) {
46
-            $category_obj = $categoryHandler->get($cat_id);
47
-        } else {
48
-            $category_obj = $categoryHandler->create();
49
-        }
50
-
51
-        $category_obj->setVar('cat_title', $_POST['cat_title']);
52
-        $category_obj->setVar('cat_order', $_POST['cat_order']);
53
-
54
-        if (!$categoryHandler->insert($category_obj)) {
55
-            $message = planet_constant('AM_ERROR');
56
-        } else {
57
-            $message = planet_constant('AM_DBUPDATED');
58
-        }
59
-        redirect_header('admin.category.php', 2, $message);
60
-
61
-        // no break
62
-    case 'del':
63
-        if (!is_array($cat_id)) {
64
-            $cat_id = [$cat_id];
65
-        }
66
-        foreach ($cat_id as $cid) {
67
-            $category_obj = $categoryHandler->get($cid);
68
-            if (!$categoryHandler->delete($category_obj)) {
69
-            }
70
-        }
71
-        $message = planet_constant('AM_DBUPDATED');
72
-        redirect_header('admin.category.php', 2, $message);
73
-
74
-        // no break
75
-    case 'order':
76
-        $count = count($_POST['cat_order']);
77
-        for ($i = 0; $i < $count; ++$i) {
78
-            $category_obj = $categoryHandler->get($_POST['cat'][$i]);
79
-            $category_obj->setVar('cat_order', $_POST['cat_order'][$i]);
80
-            $categoryHandler->insert($category_obj, true);
81
-            unset($category_obj);
82
-        }
83
-        $message = planet_constant('AM_DBUPDATED');
84
-        redirect_header('admin.category.php', 2, $message);
85
-
86
-        // no break
87
-    case 'edit':
88
-        $category_obj = $categoryHandler->get($cat_id);
89
-        $form         = new XoopsThemeForm(_EDIT, 'edit', xoops_getenv('PHP_SELF'), 'post', true);
90
-        $form->addElement(new XoopsFormText(planet_constant('AM_TITLE'), 'cat_title', 50, 80, $category_obj->getVar('cat_title', 'E')), true);
91
-        $form->addElement(new XoopsFormText(planet_constant('AM_ORDER'), 'cat_order', 5, 10, $category_obj->getVar('cat_order')), false);
92
-        $form->addElement(new XoopsFormHidden('category', $cat_id));
93
-        $form->addElement(new XoopsFormHidden('op', 'save'));
94
-
95
-        $button_tray = new XoopsFormElementTray('', '');
96
-        $butt_save   = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
97
-        $button_tray->addElement($butt_save);
98
-        $butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
99
-        $button_tray->addElement($butt_cancel);
100
-        $form->addElement($button_tray);
101
-
102
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
103
-        echo '<br>';
104
-        $form->display();
105
-        echo '</fieldset>';
106
-        break;
107
-
108
-    default:
109
-        $crit = new Criteria('1', 1);
110
-        $crit->setSort('cat_order');
111
-        $crit->setOrder('ASC');
112
-        $categories  = $categoryHandler->getList($crit);
113
-        $blog_counts = $blogHandler->getCountsByCategory();
114
-        foreach (array_keys($categories) as $cid) {
115
-            if (!empty($blog_counts[$cid])) {
116
-                $categories[$cid] .= ' (' . (int)$blog_counts[$cid] . ')';
117
-            }
118
-        }
119
-
120
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_LIST') . '</legend>';
121
-        echo "<br style=\"clear:both;\">";
122
-
123
-        echo "<form name='list' method='post'>";
124
-        echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
125
-        echo "<tr align='center'>";
126
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_ORDER') . '</td>';
127
-        echo "<th align='left' class='bg3' width='80%'>" . planet_constant('AM_TITLE') . '</td>';
128
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_BLOGCOUNT') . '</td>';
129
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_ACTIONS') . '</td>';
130
-        //        echo "<td class='bg3' width='5%'>" . _DELETE . "</td>";
131
-
132
-        echo '</tr>';
133
-
134
-        $ii = 0;
135
-        foreach (array_keys($categories) as $cid) {
136
-            echo "<tr class='odd' align='left'>";
137
-            echo "<td><input type='hidden' name='cat[]' value='" . $cid . "'>";
138
-            echo "<input type='text' name='cat_order[]' value='" . ($ii * 10) . "'></td>";
139
-            echo '<td>' . $categories[$cid] . '</td>';
140
-            echo "<td align='center'>" . @$blog_counts[$cid] . '</td>';
141
-
142
-            echo "<td align='center'><a href='admin.category.php?op=edit &amp;category='" . $cid . "' title='" . _EDIT . "'><img src='" . $pathIcon16 . "/edit.png '" . "alt='" . _EDIT . "' title='" . _EDIT . "' </a>&nbsp;
44
+	case 'save':
45
+		if ($cat_id) {
46
+			$category_obj = $categoryHandler->get($cat_id);
47
+		} else {
48
+			$category_obj = $categoryHandler->create();
49
+		}
50
+
51
+		$category_obj->setVar('cat_title', $_POST['cat_title']);
52
+		$category_obj->setVar('cat_order', $_POST['cat_order']);
53
+
54
+		if (!$categoryHandler->insert($category_obj)) {
55
+			$message = planet_constant('AM_ERROR');
56
+		} else {
57
+			$message = planet_constant('AM_DBUPDATED');
58
+		}
59
+		redirect_header('admin.category.php', 2, $message);
60
+
61
+		// no break
62
+	case 'del':
63
+		if (!is_array($cat_id)) {
64
+			$cat_id = [$cat_id];
65
+		}
66
+		foreach ($cat_id as $cid) {
67
+			$category_obj = $categoryHandler->get($cid);
68
+			if (!$categoryHandler->delete($category_obj)) {
69
+			}
70
+		}
71
+		$message = planet_constant('AM_DBUPDATED');
72
+		redirect_header('admin.category.php', 2, $message);
73
+
74
+		// no break
75
+	case 'order':
76
+		$count = count($_POST['cat_order']);
77
+		for ($i = 0; $i < $count; ++$i) {
78
+			$category_obj = $categoryHandler->get($_POST['cat'][$i]);
79
+			$category_obj->setVar('cat_order', $_POST['cat_order'][$i]);
80
+			$categoryHandler->insert($category_obj, true);
81
+			unset($category_obj);
82
+		}
83
+		$message = planet_constant('AM_DBUPDATED');
84
+		redirect_header('admin.category.php', 2, $message);
85
+
86
+		// no break
87
+	case 'edit':
88
+		$category_obj = $categoryHandler->get($cat_id);
89
+		$form         = new XoopsThemeForm(_EDIT, 'edit', xoops_getenv('PHP_SELF'), 'post', true);
90
+		$form->addElement(new XoopsFormText(planet_constant('AM_TITLE'), 'cat_title', 50, 80, $category_obj->getVar('cat_title', 'E')), true);
91
+		$form->addElement(new XoopsFormText(planet_constant('AM_ORDER'), 'cat_order', 5, 10, $category_obj->getVar('cat_order')), false);
92
+		$form->addElement(new XoopsFormHidden('category', $cat_id));
93
+		$form->addElement(new XoopsFormHidden('op', 'save'));
94
+
95
+		$button_tray = new XoopsFormElementTray('', '');
96
+		$butt_save   = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
97
+		$button_tray->addElement($butt_save);
98
+		$butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
99
+		$button_tray->addElement($butt_cancel);
100
+		$form->addElement($button_tray);
101
+
102
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
103
+		echo '<br>';
104
+		$form->display();
105
+		echo '</fieldset>';
106
+		break;
107
+
108
+	default:
109
+		$crit = new Criteria('1', 1);
110
+		$crit->setSort('cat_order');
111
+		$crit->setOrder('ASC');
112
+		$categories  = $categoryHandler->getList($crit);
113
+		$blog_counts = $blogHandler->getCountsByCategory();
114
+		foreach (array_keys($categories) as $cid) {
115
+			if (!empty($blog_counts[$cid])) {
116
+				$categories[$cid] .= ' (' . (int)$blog_counts[$cid] . ')';
117
+			}
118
+		}
119
+
120
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_LIST') . '</legend>';
121
+		echo "<br style=\"clear:both;\">";
122
+
123
+		echo "<form name='list' method='post'>";
124
+		echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
125
+		echo "<tr align='center'>";
126
+		echo "<th class='bg3' width='5%'>" . planet_constant('AM_ORDER') . '</td>';
127
+		echo "<th align='left' class='bg3' width='80%'>" . planet_constant('AM_TITLE') . '</td>';
128
+		echo "<th class='bg3' width='5%'>" . planet_constant('AM_BLOGCOUNT') . '</td>';
129
+		echo "<th class='bg3' width='5%'>" . planet_constant('AM_ACTIONS') . '</td>';
130
+		//        echo "<td class='bg3' width='5%'>" . _DELETE . "</td>";
131
+
132
+		echo '</tr>';
133
+
134
+		$ii = 0;
135
+		foreach (array_keys($categories) as $cid) {
136
+			echo "<tr class='odd' align='left'>";
137
+			echo "<td><input type='hidden' name='cat[]' value='" . $cid . "'>";
138
+			echo "<input type='text' name='cat_order[]' value='" . ($ii * 10) . "'></td>";
139
+			echo '<td>' . $categories[$cid] . '</td>';
140
+			echo "<td align='center'>" . @$blog_counts[$cid] . '</td>';
141
+
142
+			echo "<td align='center'><a href='admin.category.php?op=edit &amp;category='" . $cid . "' title='" . _EDIT . "'><img src='" . $pathIcon16 . "/edit.png '" . "alt='" . _EDIT . "' title='" . _EDIT . "' </a>&nbsp;
143 143
                   <a href='admin.category.php?op=del &amp;category='" . $cid . "' title='" . _DELETE . "'><img src='" . $pathIcon16 . "/delete.png '" . " alt='" . _EDIT . "' title='" . _DELETE . "' </a></td>";
144
-            echo '</tr>';
145
-            ++$ii;
146
-        }
147
-        echo "<tr class='even' align='center'>";
148
-        echo "<td colspan='5'>";
149
-        echo "<input name='submit' value='" . _SUBMIT . "' type='submit'>";
150
-        echo "<input name='' value='" . _CANCEL . "' type='reset'>";
151
-        echo "<input name='op' value='order' type='hidden'>";
152
-        echo '</td>';
153
-        echo '</tr>';
154
-        echo '</table></form>';
155
-        echo "</fieldset><br style='clear:both;'>";
156
-
157
-        $form = new XoopsThemeForm(_ADD, 'mod', xoops_getenv('PHP_SELF'), 'post', true);
158
-        $form->addElement(new XoopsFormText(planet_constant('AM_TITLE'), 'cat_title', 50, 80), true);
159
-        $form->addElement(new XoopsFormText(planet_constant('AM_ORDER'), 'cat_order', 5, 10), false);
160
-        $form->addElement(new XoopsFormHidden('op', 'save'));
161
-
162
-        $button_tray = new XoopsFormElementTray('', '');
163
-        $butt_save   = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
164
-        $button_tray->addElement($butt_save);
165
-        $butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
166
-        $button_tray->addElement($butt_cancel);
167
-        $form->addElement($button_tray);
168
-
169
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _ADD . '</legend>';
170
-        echo '<br>';
171
-        $form->display();
172
-        echo '</fieldset>';
173
-        break;
144
+			echo '</tr>';
145
+			++$ii;
146
+		}
147
+		echo "<tr class='even' align='center'>";
148
+		echo "<td colspan='5'>";
149
+		echo "<input name='submit' value='" . _SUBMIT . "' type='submit'>";
150
+		echo "<input name='' value='" . _CANCEL . "' type='reset'>";
151
+		echo "<input name='op' value='order' type='hidden'>";
152
+		echo '</td>';
153
+		echo '</tr>';
154
+		echo '</table></form>';
155
+		echo "</fieldset><br style='clear:both;'>";
156
+
157
+		$form = new XoopsThemeForm(_ADD, 'mod', xoops_getenv('PHP_SELF'), 'post', true);
158
+		$form->addElement(new XoopsFormText(planet_constant('AM_TITLE'), 'cat_title', 50, 80), true);
159
+		$form->addElement(new XoopsFormText(planet_constant('AM_ORDER'), 'cat_order', 5, 10), false);
160
+		$form->addElement(new XoopsFormHidden('op', 'save'));
161
+
162
+		$button_tray = new XoopsFormElementTray('', '');
163
+		$butt_save   = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
164
+		$button_tray->addElement($butt_save);
165
+		$butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
166
+		$button_tray->addElement($butt_cancel);
167
+		$form->addElement($button_tray);
168
+
169
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _ADD . '</legend>';
170
+		echo '<br>';
171
+		$form->display();
172
+		echo '</fieldset>';
173
+		break;
174 174
 }
175 175
 
176 176
 xoops_cp_footer();
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -24,18 +24,18 @@  discard block
 block discarded – undo
24 24
 // URL: https://xoops.org                         //
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27
-require_once __DIR__ . '/admin_header.php';
28
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
27
+require_once __DIR__.'/admin_header.php';
28
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
29 29
 
30 30
 xoops_cp_header();
31 31
 $adminObject = \Xmf\Module\Admin::getInstance();
32 32
 $adminObject->displayNavigation(basename(__FILE__));
33
-require XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
33
+require XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
34 34
 //planet_adminmenu(1);
35 35
 
36 36
 $op     = !empty($_POST['op']) ? $_POST['op'] : (!empty($_GET['op']) ? $_GET['op'] : '');
37 37
 $cat_id = !empty($_POST['category']) ? $_POST['category'] : (!empty($_GET['category']) ? $_GET['category'] : 0);
38
-$cat_id = is_array($cat_id) ? array_map('intval', $cat_id) : (int)$cat_id;
38
+$cat_id = is_array($cat_id) ? array_map('intval', $cat_id) : (int) $cat_id;
39 39
 
40 40
 $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
41 41
 $blogHandler     = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     case 'save':
45 45
         if ($cat_id) {
46 46
             $category_obj = $categoryHandler->get($cat_id);
47
-        } else {
47
+        }else {
48 48
             $category_obj = $categoryHandler->create();
49 49
         }
50 50
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         if (!$categoryHandler->insert($category_obj)) {
55 55
             $message = planet_constant('AM_ERROR');
56
-        } else {
56
+        }else {
57 57
             $message = planet_constant('AM_DBUPDATED');
58 58
         }
59 59
         redirect_header('admin.category.php', 2, $message);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         // no break
75 75
     case 'order':
76 76
         $count = count($_POST['cat_order']);
77
-        for ($i = 0; $i < $count; ++$i) {
77
+        for ($i = 0; $i<$count; ++$i) {
78 78
             $category_obj = $categoryHandler->get($_POST['cat'][$i]);
79 79
             $category_obj->setVar('cat_order', $_POST['cat_order'][$i]);
80 80
             $categoryHandler->insert($category_obj, true);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $button_tray->addElement($butt_cancel);
100 100
         $form->addElement($button_tray);
101 101
 
102
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
102
+        echo "<fieldset><legend style='font-weight: bold; color: #900;'>"._EDIT.'</legend>';
103 103
         echo '<br>';
104 104
         $form->display();
105 105
         echo '</fieldset>';
@@ -113,20 +113,20 @@  discard block
 block discarded – undo
113 113
         $blog_counts = $blogHandler->getCountsByCategory();
114 114
         foreach (array_keys($categories) as $cid) {
115 115
             if (!empty($blog_counts[$cid])) {
116
-                $categories[$cid] .= ' (' . (int)$blog_counts[$cid] . ')';
116
+                $categories[$cid] .= ' ('.(int) $blog_counts[$cid].')';
117 117
             }
118 118
         }
119 119
 
120
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_LIST') . '</legend>';
120
+        echo "<fieldset><legend style='font-weight: bold; color: #900;'>".planet_constant('AM_LIST').'</legend>';
121 121
         echo "<br style=\"clear:both;\">";
122 122
 
123 123
         echo "<form name='list' method='post'>";
124 124
         echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
125 125
         echo "<tr align='center'>";
126
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_ORDER') . '</td>';
127
-        echo "<th align='left' class='bg3' width='80%'>" . planet_constant('AM_TITLE') . '</td>';
128
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_BLOGCOUNT') . '</td>';
129
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_ACTIONS') . '</td>';
126
+        echo "<th class='bg3' width='5%'>".planet_constant('AM_ORDER').'</td>';
127
+        echo "<th align='left' class='bg3' width='80%'>".planet_constant('AM_TITLE').'</td>';
128
+        echo "<th class='bg3' width='5%'>".planet_constant('AM_BLOGCOUNT').'</td>';
129
+        echo "<th class='bg3' width='5%'>".planet_constant('AM_ACTIONS').'</td>';
130 130
         //        echo "<td class='bg3' width='5%'>" . _DELETE . "</td>";
131 131
 
132 132
         echo '</tr>';
@@ -134,20 +134,20 @@  discard block
 block discarded – undo
134 134
         $ii = 0;
135 135
         foreach (array_keys($categories) as $cid) {
136 136
             echo "<tr class='odd' align='left'>";
137
-            echo "<td><input type='hidden' name='cat[]' value='" . $cid . "'>";
138
-            echo "<input type='text' name='cat_order[]' value='" . ($ii * 10) . "'></td>";
139
-            echo '<td>' . $categories[$cid] . '</td>';
140
-            echo "<td align='center'>" . @$blog_counts[$cid] . '</td>';
137
+            echo "<td><input type='hidden' name='cat[]' value='".$cid."'>";
138
+            echo "<input type='text' name='cat_order[]' value='".($ii*10)."'></td>";
139
+            echo '<td>'.$categories[$cid].'</td>';
140
+            echo "<td align='center'>".@$blog_counts[$cid].'</td>';
141 141
 
142
-            echo "<td align='center'><a href='admin.category.php?op=edit &amp;category='" . $cid . "' title='" . _EDIT . "'><img src='" . $pathIcon16 . "/edit.png '" . "alt='" . _EDIT . "' title='" . _EDIT . "' </a>&nbsp;
143
-                  <a href='admin.category.php?op=del &amp;category='" . $cid . "' title='" . _DELETE . "'><img src='" . $pathIcon16 . "/delete.png '" . " alt='" . _EDIT . "' title='" . _DELETE . "' </a></td>";
142
+            echo "<td align='center'><a href='admin.category.php?op=edit &amp;category='".$cid."' title='"._EDIT."'><img src='".$pathIcon16."/edit.png '"."alt='"._EDIT."' title='"._EDIT."' </a>&nbsp;
143
+                  <a href='admin.category.php?op=del &amp;category='" . $cid."' title='"._DELETE."'><img src='".$pathIcon16."/delete.png '"." alt='"._EDIT."' title='"._DELETE."' </a></td>";
144 144
             echo '</tr>';
145 145
             ++$ii;
146 146
         }
147 147
         echo "<tr class='even' align='center'>";
148 148
         echo "<td colspan='5'>";
149
-        echo "<input name='submit' value='" . _SUBMIT . "' type='submit'>";
150
-        echo "<input name='' value='" . _CANCEL . "' type='reset'>";
149
+        echo "<input name='submit' value='"._SUBMIT."' type='submit'>";
150
+        echo "<input name='' value='"._CANCEL."' type='reset'>";
151 151
         echo "<input name='op' value='order' type='hidden'>";
152 152
         echo '</td>';
153 153
         echo '</tr>';
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         $button_tray->addElement($butt_cancel);
167 167
         $form->addElement($button_tray);
168 168
 
169
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _ADD . '</legend>';
169
+        echo "<fieldset><legend style='font-weight: bold; color: #900;'>"._ADD.'</legend>';
170 170
         echo '<br>';
171 171
         $form->display();
172 172
         echo '</fieldset>';
Please login to merge, or discard this patch.
xml.php 2 patches
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 use Xmf\Request;
28 28
 
29 29
 ob_start();
30
-include __DIR__ . '/header.php';
30
+include __DIR__.'/header.php';
31 31
 
32 32
 if (PlanetUtility::planetParseArguments($args_num, $args, $args_str)) {
33 33
     $args['article'] = @$args_num[0];
@@ -86,16 +86,16 @@  discard block
 block discarded – undo
86 86
     }
87 87
 } elseif (!empty($uid)) {
88 88
     $source = 'bookmark';
89
-} else {
89
+}else {
90 90
     $source = '';
91 91
 }
92 92
 
93 93
 $xml_charset = 'UTF-8';
94
-require_once XOOPS_ROOT_PATH . '/class/template.php';
94
+require_once XOOPS_ROOT_PATH.'/class/template.php';
95 95
 $tpl = new XoopsTpl();
96 96
 $tpl->xoops_setCaching(2);
97 97
 $tpl->xoops_setCacheTime(3600);
98
-$xoopsCachedTemplateId = md5($xoopsModule->getVar('mid') . ',' . $article_id . ',' . $category_id . ',' . $blog_id . ',' . $uid . ',' . $type);
98
+$xoopsCachedTemplateId = md5($xoopsModule->getVar('mid').','.$article_id.','.$category_id.','.$blog_id.','.$uid.','.$type);
99 99
 if (!$tpl->is_cached('db:system_dummy.tpl', $xoopsCachedTemplateId)) {
100 100
     $criteria = new CriteriaCompo();
101 101
     $criteria->setLimit($xoopsModuleConfig['articles_perpage']);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
             $articles_obj[$article_id] = $article_obj;
109 109
 
110
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id');
110
+            $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$article_obj->getVar('art_id');
111 111
             break;
112 112
 
113 113
         case 'category':
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             $criteria->add(new Criteria('bc.cat_id', $category_id));
118 118
             $articles_obj = $articleHandler->getByCategory($criteria);
119 119
 
120
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'c' . $category_id;
120
+            $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'c'.$category_id;
121 121
             break;
122 122
 
123 123
         case 'blog':
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             $criteria->add(new Criteria('blog_id', $blog_id));
128 128
             $articles_obj = $articleHandler->getAll($criteria);
129 129
 
130
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $blog_id;
130
+            $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'b'.$blog_id;
131 131
             break;
132 132
 
133 133
         case 'bookmark':
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             $criteria->add(new Criteria('bm.bm_uid', $uid));
139 139
             $articles_obj = $articleHandler->getByBookmark($criteria);
140 140
 
141
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $uid;
141
+            $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'u'.$uid;
142 142
 
143 143
             break;
144 144
 
@@ -148,20 +148,20 @@  discard block
 block discarded – undo
148 148
 
149 149
             $articles_obj = $articleHandler->getAll($criteria);
150 150
 
151
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php';
151
+            $xml_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php';
152 152
             break;
153 153
     }
154 154
     $items = [];
155 155
     foreach (array_keys($articles_obj) as $id) {
156 156
         $content = $articles_obj[$id]->getVar('art_content');
157
-        $content .= '<br>' . planet_constant('MD_SOURCE') . ': ' . $articles_obj[$id]->getVar('art_link') . ' ' . $articles_obj[$id]->getVar('art_author');
157
+        $content .= '<br>'.planet_constant('MD_SOURCE').': '.$articles_obj[$id]->getVar('art_link').' '.$articles_obj[$id]->getVar('art_author');
158 158
         $items[] = [
159 159
             'title'                     => $articles_obj[$id]->getVar('art_title'),
160
-            'link'                      => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_obj[$id]->getVar('art_id'),
160
+            'link'                      => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$articles_obj[$id]->getVar('art_id'),
161 161
             'description'               => $content,
162 162
             'descriptionHtmlSyndicated' => true,
163 163
             'date'                      => $articles_obj[$id]->getTime('rss'),
164
-            'source'                    => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/',
164
+            'source'                    => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/',
165 165
             'author'                    => $articles_obj[$id]->getVar('art_author')
166 166
         ];
167 167
     }
@@ -170,24 +170,24 @@  discard block
 block discarded – undo
170 170
     $xmlHandler = xoops_getModuleHandler('xml', $GLOBALS['moddirname']);
171 171
     $xml        = $xmlHandler->create($type);
172 172
     $xml->setVar('encoding', $xml_charset);
173
-    $xml->setVar('title', $xoopsConfig['sitename'] . ' :: ' . $pagetitle, 'UTF-8', $xml_charset, true);
173
+    $xml->setVar('title', $xoopsConfig['sitename'].' :: '.$pagetitle, 'UTF-8', $xml_charset, true);
174 174
     $xml->setVar('description', $rssdesc, true);
175 175
     $xml->setVar('descriptionHtmlSyndicated', true);
176 176
     $xml->setVar('link', $xml_link);
177
-    $xml->setVar('syndicationURL', XOOPS_URL . '/' . xoops_getenv('PHP_SELF'), 'post', true);
177
+    $xml->setVar('syndicationURL', XOOPS_URL.'/'.xoops_getenv('PHP_SELF'), 'post', true);
178 178
     $xml->setVar('webmaster', checkEmail($xoopsConfig['adminmail'], true));
179 179
     $xml->setVar('editor', checkEmail($xoopsConfig['adminmail'], true));
180 180
     $xml->setVar('category', $xoopsModule->getVar('name'), true);
181 181
     $xml->setVar('generator', $xoopsModule->getInfo('version'));
182 182
     $xml->setVar('language', _LANGCODE);
183 183
 
184
-    $dimention = @getimagesize(XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'));
184
+    $dimention = @getimagesize(XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/'.$xoopsModule->getInfo('image'));
185 185
     $image     = [
186 186
         'width'       => $dimention[0],
187 187
         'height'      => $dimention[1],
188
-        'title'       => $xoopsConfig['sitename'] . ' :: ' . $pagetitle,
189
-        'url'         => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'),
190
-        'link'        => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/',
188
+        'title'       => $xoopsConfig['sitename'].' :: '.$pagetitle,
189
+        'url'         => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/'.$xoopsModule->getInfo('image'),
190
+        'link'        => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/',
191 191
         'description' => $rssdesc
192 192
     ];
193 193
     $xml->setImage($image);
@@ -205,11 +205,11 @@  discard block
 block discarded – undo
205 205
     */
206 206
     $xml->addItems($items);
207 207
 
208
-    $dummy_content = $xmlHandler->display($xml, XOOPS_CACHE_PATH . '/' . $GLOBALS['moddirname'] . '.xml.tmp');
208
+    $dummy_content = $xmlHandler->display($xml, XOOPS_CACHE_PATH.'/'.$GLOBALS['moddirname'].'.xml.tmp');
209 209
 
210 210
     $tpl->assign_by_ref('dummy_content', $dummy_content);
211 211
 }
212 212
 //$content = ob_get_contents();
213 213
 ob_end_clean();
214
-header('Content-Type:text/xml; charset=' . $xml_charset);
214
+header('Content-Type:text/xml; charset='.$xml_charset);
215 215
 $tpl->display('db:system_dummy.tpl', $xoopsCachedTemplateId);
Please login to merge, or discard this patch.
Indentation   +125 added lines, -125 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 include __DIR__ . '/header.php';
31 31
 
32 32
 if (PlanetUtility::planetParseArguments($args_num, $args, $args_str)) {
33
-    $args['article'] = @$args_num[0];
34
-    $args['type']    = @$args_str[0];
33
+	$args['article'] = @$args_num[0];
34
+	$args['type']    = @$args_str[0];
35 35
 }
36 36
 
37 37
 /* Specified Article */
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
 
49 49
 $valid_format = ['RSS0.91', 'RSS1.0', 'RSS2.0', 'PIE0.1', 'MBOX', 'OPML', 'ATOM', 'ATOM0.3', 'HTML', 'JS'];
50 50
 if ('RDF' === $type) {
51
-    $type = 'RSS1.0';
51
+	$type = 'RSS1.0';
52 52
 }
53 53
 if ('RSS' === $type) {
54
-    $type = 'RSS0.91';
54
+	$type = 'RSS0.91';
55 55
 }
56 56
 if (empty($type) || !in_array($type, $valid_format)) {
57
-    PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID'));
58
-    exit();
57
+	PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID'));
58
+	exit();
59 59
 }
60 60
 
61 61
 $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
@@ -64,30 +64,30 @@  discard block
 block discarded – undo
64 64
 $bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']);
65 65
 
66 66
 if (!empty($article_id)) {
67
-    $article_obj = $articleHandler->get($article_id);
68
-    if (!$article_obj->getVar('art_id')) {
69
-        PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_EXPIRED'));
70
-        exit();
71
-    }
72
-    $source = 'article';
67
+	$article_obj = $articleHandler->get($article_id);
68
+	if (!$article_obj->getVar('art_id')) {
69
+		PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_EXPIRED'));
70
+		exit();
71
+	}
72
+	$source = 'article';
73 73
 } elseif (!empty($blog_id)) {
74
-    $blog_obj = $blogHandler->get($blog_id);
75
-    if (!$blog_obj->getVar('blog_id')) {
76
-        PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID'));
77
-        exit();
78
-    }
79
-    $source = 'blog';
74
+	$blog_obj = $blogHandler->get($blog_id);
75
+	if (!$blog_obj->getVar('blog_id')) {
76
+		PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID'));
77
+		exit();
78
+	}
79
+	$source = 'blog';
80 80
 } elseif (!empty($category_id)) {
81
-    $source       = 'category';
82
-    $category_obj = $categoryHandler->get($category_id);
83
-    if (!$category_obj->getVar('cat_id')) {
84
-        PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID'));
85
-        exit();
86
-    }
81
+	$source       = 'category';
82
+	$category_obj = $categoryHandler->get($category_id);
83
+	if (!$category_obj->getVar('cat_id')) {
84
+		PlanetUtility::planetRespondToTrackback(1, planet_constant('MD_INVALID'));
85
+		exit();
86
+	}
87 87
 } elseif (!empty($uid)) {
88
-    $source = 'bookmark';
88
+	$source = 'bookmark';
89 89
 } else {
90
-    $source = '';
90
+	$source = '';
91 91
 }
92 92
 
93 93
 $xml_charset = 'UTF-8';
@@ -97,102 +97,102 @@  discard block
 block discarded – undo
97 97
 $tpl->xoops_setCacheTime(3600);
98 98
 $xoopsCachedTemplateId = md5($xoopsModule->getVar('mid') . ',' . $article_id . ',' . $category_id . ',' . $blog_id . ',' . $uid . ',' . $type);
99 99
 if (!$tpl->is_cached('db:system_dummy.tpl', $xoopsCachedTemplateId)) {
100
-    $criteria = new CriteriaCompo();
101
-    $criteria->setLimit($xoopsModuleConfig['articles_perpage']);
102
-    $articles_obj = [];
103
-    switch ($source) {
104
-        case 'article':
105
-            $pagetitle = planet_constant('MD_ARTICLE');
106
-            $rssdesc   = planet_constant('MD_XMLDESC_ARTICLE');
107
-
108
-            $articles_obj[$article_id] = $article_obj;
109
-
110
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id');
111
-            break;
112
-
113
-        case 'category':
114
-            $pagetitle = planet_constant('MD_CATEGORY');
115
-            $rssdesc   = sprintf(planet_constant('MD_XMLDESC_CATEGORY'), $category_obj->getVar('cat_title'));
116
-
117
-            $criteria->add(new Criteria('bc.cat_id', $category_id));
118
-            $articles_obj = $articleHandler->getByCategory($criteria);
119
-
120
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'c' . $category_id;
121
-            break;
122
-
123
-        case 'blog':
124
-            $pagetitle = planet_constant('MD_BLOG');
125
-            $rssdesc   = sprintf(planet_constant('MD_XMLDESC_BLOG'), $blog_obj->getVar('blog_title'));
126
-
127
-            $criteria->add(new Criteria('blog_id', $blog_id));
128
-            $articles_obj = $articleHandler->getAll($criteria);
129
-
130
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $blog_id;
131
-            break;
132
-
133
-        case 'bookmark':
134
-            $author_name = XoopsUser::getUnameFromId($uid);
135
-            $pagetitle   = planet_constant('MD_BOOKMARKS');
136
-            $rssdesc     = sprintf(planet_constant('MD_XMLDESC_BOOKMARK'), $author_name);
137
-
138
-            $criteria->add(new Criteria('bm.bm_uid', $uid));
139
-            $articles_obj = $articleHandler->getByBookmark($criteria);
140
-
141
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $uid;
142
-
143
-            break;
144
-
145
-        default:
146
-            $pagetitle = planet_constant('MD_INDEX');
147
-            $rssdesc   = planet_constant('MD_XMLDESC_INDEX');
148
-
149
-            $articles_obj = $articleHandler->getAll($criteria);
150
-
151
-            $xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php';
152
-            break;
153
-    }
154
-    $items = [];
155
-    foreach (array_keys($articles_obj) as $id) {
156
-        $content = $articles_obj[$id]->getVar('art_content');
157
-        $content .= '<br>' . planet_constant('MD_SOURCE') . ': ' . $articles_obj[$id]->getVar('art_link') . ' ' . $articles_obj[$id]->getVar('art_author');
158
-        $items[] = [
159
-            'title'                     => $articles_obj[$id]->getVar('art_title'),
160
-            'link'                      => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_obj[$id]->getVar('art_id'),
161
-            'description'               => $content,
162
-            'descriptionHtmlSyndicated' => true,
163
-            'date'                      => $articles_obj[$id]->getTime('rss'),
164
-            'source'                    => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/',
165
-            'author'                    => $articles_obj[$id]->getVar('art_author')
166
-        ];
167
-    }
168
-    unset($articles_obj, $criteria);
169
-
170
-    $xmlHandler = xoops_getModuleHandler('xml', $GLOBALS['moddirname']);
171
-    $xml        = $xmlHandler->create($type);
172
-    $xml->setVar('encoding', $xml_charset);
173
-    $xml->setVar('title', $xoopsConfig['sitename'] . ' :: ' . $pagetitle, 'UTF-8', $xml_charset, true);
174
-    $xml->setVar('description', $rssdesc, true);
175
-    $xml->setVar('descriptionHtmlSyndicated', true);
176
-    $xml->setVar('link', $xml_link);
177
-    $xml->setVar('syndicationURL', XOOPS_URL . '/' . xoops_getenv('PHP_SELF'), 'post', true);
178
-    $xml->setVar('webmaster', checkEmail($xoopsConfig['adminmail'], true));
179
-    $xml->setVar('editor', checkEmail($xoopsConfig['adminmail'], true));
180
-    $xml->setVar('category', $xoopsModule->getVar('name'), true);
181
-    $xml->setVar('generator', $xoopsModule->getInfo('version'));
182
-    $xml->setVar('language', _LANGCODE);
183
-
184
-    $dimention = @getimagesize(XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'));
185
-    $image     = [
186
-        'width'       => $dimention[0],
187
-        'height'      => $dimention[1],
188
-        'title'       => $xoopsConfig['sitename'] . ' :: ' . $pagetitle,
189
-        'url'         => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'),
190
-        'link'        => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/',
191
-        'description' => $rssdesc
192
-    ];
193
-    $xml->setImage($image);
194
-
195
-    /*
100
+	$criteria = new CriteriaCompo();
101
+	$criteria->setLimit($xoopsModuleConfig['articles_perpage']);
102
+	$articles_obj = [];
103
+	switch ($source) {
104
+		case 'article':
105
+			$pagetitle = planet_constant('MD_ARTICLE');
106
+			$rssdesc   = planet_constant('MD_XMLDESC_ARTICLE');
107
+
108
+			$articles_obj[$article_id] = $article_obj;
109
+
110
+			$xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id');
111
+			break;
112
+
113
+		case 'category':
114
+			$pagetitle = planet_constant('MD_CATEGORY');
115
+			$rssdesc   = sprintf(planet_constant('MD_XMLDESC_CATEGORY'), $category_obj->getVar('cat_title'));
116
+
117
+			$criteria->add(new Criteria('bc.cat_id', $category_id));
118
+			$articles_obj = $articleHandler->getByCategory($criteria);
119
+
120
+			$xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'c' . $category_id;
121
+			break;
122
+
123
+		case 'blog':
124
+			$pagetitle = planet_constant('MD_BLOG');
125
+			$rssdesc   = sprintf(planet_constant('MD_XMLDESC_BLOG'), $blog_obj->getVar('blog_title'));
126
+
127
+			$criteria->add(new Criteria('blog_id', $blog_id));
128
+			$articles_obj = $articleHandler->getAll($criteria);
129
+
130
+			$xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $blog_id;
131
+			break;
132
+
133
+		case 'bookmark':
134
+			$author_name = XoopsUser::getUnameFromId($uid);
135
+			$pagetitle   = planet_constant('MD_BOOKMARKS');
136
+			$rssdesc     = sprintf(planet_constant('MD_XMLDESC_BOOKMARK'), $author_name);
137
+
138
+			$criteria->add(new Criteria('bm.bm_uid', $uid));
139
+			$articles_obj = $articleHandler->getByBookmark($criteria);
140
+
141
+			$xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'u' . $uid;
142
+
143
+			break;
144
+
145
+		default:
146
+			$pagetitle = planet_constant('MD_INDEX');
147
+			$rssdesc   = planet_constant('MD_XMLDESC_INDEX');
148
+
149
+			$articles_obj = $articleHandler->getAll($criteria);
150
+
151
+			$xml_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php';
152
+			break;
153
+	}
154
+	$items = [];
155
+	foreach (array_keys($articles_obj) as $id) {
156
+		$content = $articles_obj[$id]->getVar('art_content');
157
+		$content .= '<br>' . planet_constant('MD_SOURCE') . ': ' . $articles_obj[$id]->getVar('art_link') . ' ' . $articles_obj[$id]->getVar('art_author');
158
+		$items[] = [
159
+			'title'                     => $articles_obj[$id]->getVar('art_title'),
160
+			'link'                      => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $articles_obj[$id]->getVar('art_id'),
161
+			'description'               => $content,
162
+			'descriptionHtmlSyndicated' => true,
163
+			'date'                      => $articles_obj[$id]->getTime('rss'),
164
+			'source'                    => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/',
165
+			'author'                    => $articles_obj[$id]->getVar('art_author')
166
+		];
167
+	}
168
+	unset($articles_obj, $criteria);
169
+
170
+	$xmlHandler = xoops_getModuleHandler('xml', $GLOBALS['moddirname']);
171
+	$xml        = $xmlHandler->create($type);
172
+	$xml->setVar('encoding', $xml_charset);
173
+	$xml->setVar('title', $xoopsConfig['sitename'] . ' :: ' . $pagetitle, 'UTF-8', $xml_charset, true);
174
+	$xml->setVar('description', $rssdesc, true);
175
+	$xml->setVar('descriptionHtmlSyndicated', true);
176
+	$xml->setVar('link', $xml_link);
177
+	$xml->setVar('syndicationURL', XOOPS_URL . '/' . xoops_getenv('PHP_SELF'), 'post', true);
178
+	$xml->setVar('webmaster', checkEmail($xoopsConfig['adminmail'], true));
179
+	$xml->setVar('editor', checkEmail($xoopsConfig['adminmail'], true));
180
+	$xml->setVar('category', $xoopsModule->getVar('name'), true);
181
+	$xml->setVar('generator', $xoopsModule->getInfo('version'));
182
+	$xml->setVar('language', _LANGCODE);
183
+
184
+	$dimention = @getimagesize(XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'));
185
+	$image     = [
186
+		'width'       => $dimention[0],
187
+		'height'      => $dimention[1],
188
+		'title'       => $xoopsConfig['sitename'] . ' :: ' . $pagetitle,
189
+		'url'         => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/' . $xoopsModule->getInfo('image'),
190
+		'link'        => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/',
191
+		'description' => $rssdesc
192
+	];
193
+	$xml->setImage($image);
194
+
195
+	/*
196 196
     $item = array(
197 197
         "title" => $datatitle,
198 198
         "link" => $dataurl,
@@ -203,11 +203,11 @@  discard block
 block discarded – undo
203 203
         "author" => $dataauthor
204 204
         );
205 205
     */
206
-    $xml->addItems($items);
206
+	$xml->addItems($items);
207 207
 
208
-    $dummy_content = $xmlHandler->display($xml, XOOPS_CACHE_PATH . '/' . $GLOBALS['moddirname'] . '.xml.tmp');
208
+	$dummy_content = $xmlHandler->display($xml, XOOPS_CACHE_PATH . '/' . $GLOBALS['moddirname'] . '.xml.tmp');
209 209
 
210
-    $tpl->assign_by_ref('dummy_content', $dummy_content);
210
+	$tpl->assign_by_ref('dummy_content', $dummy_content);
211 211
 }
212 212
 //$content = ob_get_contents();
213 213
 ob_end_clean();
Please login to merge, or discard this patch.
transfer.php 2 patches
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
 include __DIR__ . '/header.php';
18 18
 
19 19
 if (PlanetUtility::planetParseArguments($args_num, $args, $args_str)) {
20
-    $args['article'] = @$args_num[0];
21
-    $args['op']      = @$args_str[0];
20
+	$args['article'] = @$args_num[0];
21
+	$args['op']      = @$args_str[0];
22 22
 }
23 23
 
24 24
 $article_id = Request::getInt('article', Request::getInt('article', @$args['article'], 'POST'), 'GET');//(int)(empty($_GET['article']) ? (empty($_POST['article']) ? @$args['article'] : $_POST['article']) : $_GET['article']);
@@ -27,33 +27,33 @@  discard block
 block discarded – undo
27 27
 $op = strtolower(trim($op));
28 28
 
29 29
 if (empty($article_id)) {
30
-    if (empty(Request::getUrl('HTTP_REFERER', '', 'SERVER'))) {
31
-        //$_SERVER['HTTP_REFERER']))
30
+	if (empty(Request::getUrl('HTTP_REFERER', '', 'SERVER'))) {
31
+		//$_SERVER['HTTP_REFERER']))
32 32
 
33
-        include XOOPS_ROOT_PATH . '/header.php';
34
-        xoops_error(_NOPERM);
35
-        $xoopsOption['output_type'] = 'plain';
36
-        include XOOPS_ROOT_PATH . '/footer.php';
37
-        exit();
38
-    } else {
39
-        $ref_parser = parse_url(Request::getUrl('HTTP_REFERER', '', 'SERVER')); //$_SERVER['HTTP_REFERER']);
40
-        $uri_parser = parse_url(Request::getUrl('REQUEST_URI', '', 'SERVER'));// $_SERVER['REQUEST_URI']);
41
-        if ((!empty($ref_parser['host']) && !empty($uri_parser['host']) && $uri_parser['host'] != $ref_parser['host'])
42
-            || ($ref_parser['path'] != $uri_parser['path'])) {
43
-            include XOOPS_ROOT_PATH . '/header.php';
44
-            include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
45
-            xoops_confirm([], 'javascript: window.close();', sprintf(planet_constant('MD_TRANSFER_DONE'), ''), _CLOSE, Request::getUrl('HTTP_REFERER', '', 'SERVER'));
46
-            $xoopsOption['output_type'] = 'plain';
47
-            include XOOPS_ROOT_PATH . '/footer.php';
48
-            exit();
49
-        } else {
50
-            include XOOPS_ROOT_PATH . '/header.php';
51
-            xoops_error(_NOPERM);
52
-            $xoopsOption['output_type'] = 'plain';
53
-            include XOOPS_ROOT_PATH . '/footer.php';
54
-            exit();
55
-        }
56
-    }
33
+		include XOOPS_ROOT_PATH . '/header.php';
34
+		xoops_error(_NOPERM);
35
+		$xoopsOption['output_type'] = 'plain';
36
+		include XOOPS_ROOT_PATH . '/footer.php';
37
+		exit();
38
+	} else {
39
+		$ref_parser = parse_url(Request::getUrl('HTTP_REFERER', '', 'SERVER')); //$_SERVER['HTTP_REFERER']);
40
+		$uri_parser = parse_url(Request::getUrl('REQUEST_URI', '', 'SERVER'));// $_SERVER['REQUEST_URI']);
41
+		if ((!empty($ref_parser['host']) && !empty($uri_parser['host']) && $uri_parser['host'] != $ref_parser['host'])
42
+			|| ($ref_parser['path'] != $uri_parser['path'])) {
43
+			include XOOPS_ROOT_PATH . '/header.php';
44
+			include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
45
+			xoops_confirm([], 'javascript: window.close();', sprintf(planet_constant('MD_TRANSFER_DONE'), ''), _CLOSE, Request::getUrl('HTTP_REFERER', '', 'SERVER'));
46
+			$xoopsOption['output_type'] = 'plain';
47
+			include XOOPS_ROOT_PATH . '/footer.php';
48
+			exit();
49
+		} else {
50
+			include XOOPS_ROOT_PATH . '/header.php';
51
+			xoops_error(_NOPERM);
52
+			$xoopsOption['output_type'] = 'plain';
53
+			include XOOPS_ROOT_PATH . '/footer.php';
54
+			exit();
55
+		}
56
+	}
57 57
 }
58 58
 
59 59
 $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
@@ -61,37 +61,37 @@  discard block
 block discarded – undo
61 61
 
62 62
 // Display option form
63 63
 if (empty($op)) {
64
-    $module_variables .= "<input type=\"hidden\" name=\"article\" id=\"article\" value=\"{$article_id}\">";
65
-    include XOOPS_ROOT_PATH . '/Frameworks/transfer/option.transfer.php';
66
-    exit();
64
+	$module_variables .= "<input type=\"hidden\" name=\"article\" id=\"article\" value=\"{$article_id}\">";
65
+	include XOOPS_ROOT_PATH . '/Frameworks/transfer/option.transfer.php';
66
+	exit();
67 67
 } else {
68
-    $data           = [];
69
-    $data['id']     = $article_id;
70
-    $data['title']  = $article_obj->getVar('art_title');
71
-    $data['time']   = $article_obj->getTime('l');
72
-    $data['image']  = '';
73
-    $data['source'] = $article_obj->getVar('art_link');
74
-    $data['url']    = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id');
75
-    $data['author'] = $article_obj->getVar('art_author');
68
+	$data           = [];
69
+	$data['id']     = $article_id;
70
+	$data['title']  = $article_obj->getVar('art_title');
71
+	$data['time']   = $article_obj->getTime('l');
72
+	$data['image']  = '';
73
+	$data['source'] = $article_obj->getVar('art_link');
74
+	$data['url']    = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id');
75
+	$data['author'] = $article_obj->getVar('art_author');
76 76
 
77
-    switch ($op) {
77
+	switch ($op) {
78 78
 
79
-        // Use title
80
-        case 'bookmark':
81
-            break;
79
+		// Use title
80
+		case 'bookmark':
81
+			break;
82 82
 
83
-        case 'print':
84
-        case 'pdf':
85
-            ${"{$op}_data"}            =& $data;
86
-            ${"{$op}_data"}['date']    = $pdf_data['time'];
87
-            ${"{$op}_data"}['content'] = $article_obj->getVar('art_content');
88
-            break;
83
+		case 'print':
84
+		case 'pdf':
85
+			${"{$op}_data"}            =& $data;
86
+			${"{$op}_data"}['date']    = $pdf_data['time'];
87
+			${"{$op}_data"}['content'] = $article_obj->getVar('art_content');
88
+			break;
89 89
 
90
-        case 'newbb':
91
-        default:
92
-            $data['content'] = $article_obj->getSummary();
93
-            break;
94
-    }
95
-    include XOOPS_ROOT_PATH . '/Frameworks/transfer/action.transfer.php';
96
-    exit();
90
+		case 'newbb':
91
+		default:
92
+			$data['content'] = $article_obj->getSummary();
93
+			break;
94
+	}
95
+	include XOOPS_ROOT_PATH . '/Frameworks/transfer/action.transfer.php';
96
+	exit();
97 97
 }
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -14,43 +14,43 @@  discard block
 block discarded – undo
14 14
 
15 15
 use Xmf\Request;
16 16
 
17
-include __DIR__ . '/header.php';
17
+include __DIR__.'/header.php';
18 18
 
19 19
 if (PlanetUtility::planetParseArguments($args_num, $args, $args_str)) {
20 20
     $args['article'] = @$args_num[0];
21 21
     $args['op']      = @$args_str[0];
22 22
 }
23 23
 
24
-$article_id = Request::getInt('article', Request::getInt('article', @$args['article'], 'POST'), 'GET');//(int)(empty($_GET['article']) ? (empty($_POST['article']) ? @$args['article'] : $_POST['article']) : $_GET['article']);
24
+$article_id = Request::getInt('article', Request::getInt('article', @$args['article'], 'POST'), 'GET'); //(int)(empty($_GET['article']) ? (empty($_POST['article']) ? @$args['article'] : $_POST['article']) : $_GET['article']);
25 25
 
26
-$op = Request::getString('op', Request::getString('op', @$args['op'], 'POST'), 'GET');//empty($_GET['op']) ? (empty($_POST['op']) ? @$args['op'] : $_POST['op']) : $_GET['op'];
26
+$op = Request::getString('op', Request::getString('op', @$args['op'], 'POST'), 'GET'); //empty($_GET['op']) ? (empty($_POST['op']) ? @$args['op'] : $_POST['op']) : $_GET['op'];
27 27
 $op = strtolower(trim($op));
28 28
 
29 29
 if (empty($article_id)) {
30 30
     if (empty(Request::getUrl('HTTP_REFERER', '', 'SERVER'))) {
31 31
         //$_SERVER['HTTP_REFERER']))
32 32
 
33
-        include XOOPS_ROOT_PATH . '/header.php';
33
+        include XOOPS_ROOT_PATH.'/header.php';
34 34
         xoops_error(_NOPERM);
35 35
         $xoopsOption['output_type'] = 'plain';
36
-        include XOOPS_ROOT_PATH . '/footer.php';
36
+        include XOOPS_ROOT_PATH.'/footer.php';
37 37
         exit();
38
-    } else {
38
+    }else {
39 39
         $ref_parser = parse_url(Request::getUrl('HTTP_REFERER', '', 'SERVER')); //$_SERVER['HTTP_REFERER']);
40
-        $uri_parser = parse_url(Request::getUrl('REQUEST_URI', '', 'SERVER'));// $_SERVER['REQUEST_URI']);
40
+        $uri_parser = parse_url(Request::getUrl('REQUEST_URI', '', 'SERVER')); // $_SERVER['REQUEST_URI']);
41 41
         if ((!empty($ref_parser['host']) && !empty($uri_parser['host']) && $uri_parser['host'] != $ref_parser['host'])
42 42
             || ($ref_parser['path'] != $uri_parser['path'])) {
43
-            include XOOPS_ROOT_PATH . '/header.php';
44
-            include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
43
+            include XOOPS_ROOT_PATH.'/header.php';
44
+            include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
45 45
             xoops_confirm([], 'javascript: window.close();', sprintf(planet_constant('MD_TRANSFER_DONE'), ''), _CLOSE, Request::getUrl('HTTP_REFERER', '', 'SERVER'));
46 46
             $xoopsOption['output_type'] = 'plain';
47
-            include XOOPS_ROOT_PATH . '/footer.php';
47
+            include XOOPS_ROOT_PATH.'/footer.php';
48 48
             exit();
49
-        } else {
50
-            include XOOPS_ROOT_PATH . '/header.php';
49
+        }else {
50
+            include XOOPS_ROOT_PATH.'/header.php';
51 51
             xoops_error(_NOPERM);
52 52
             $xoopsOption['output_type'] = 'plain';
53
-            include XOOPS_ROOT_PATH . '/footer.php';
53
+            include XOOPS_ROOT_PATH.'/footer.php';
54 54
             exit();
55 55
         }
56 56
     }
@@ -62,16 +62,16 @@  discard block
 block discarded – undo
62 62
 // Display option form
63 63
 if (empty($op)) {
64 64
     $module_variables .= "<input type=\"hidden\" name=\"article\" id=\"article\" value=\"{$article_id}\">";
65
-    include XOOPS_ROOT_PATH . '/Frameworks/transfer/option.transfer.php';
65
+    include XOOPS_ROOT_PATH.'/Frameworks/transfer/option.transfer.php';
66 66
     exit();
67
-} else {
67
+}else {
68 68
     $data           = [];
69 69
     $data['id']     = $article_id;
70 70
     $data['title']  = $article_obj->getVar('art_title');
71 71
     $data['time']   = $article_obj->getTime('l');
72 72
     $data['image']  = '';
73 73
     $data['source'] = $article_obj->getVar('art_link');
74
-    $data['url']    = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id');
74
+    $data['url']    = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$article_obj->getVar('art_id');
75 75
     $data['author'] = $article_obj->getVar('art_author');
76 76
 
77 77
     switch ($op) {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
         case 'print':
84 84
         case 'pdf':
85
-            ${"{$op}_data"}            =& $data;
85
+            ${"{$op}_data"}            = & $data;
86 86
             ${"{$op}_data"}['date']    = $pdf_data['time'];
87 87
             ${"{$op}_data"}['content'] = $article_obj->getVar('art_content');
88 88
             break;
@@ -92,6 +92,6 @@  discard block
 block discarded – undo
92 92
             $data['content'] = $article_obj->getSummary();
93 93
             break;
94 94
     }
95
-    include XOOPS_ROOT_PATH . '/Frameworks/transfer/action.transfer.php';
95
+    include XOOPS_ROOT_PATH.'/Frameworks/transfer/action.transfer.php';
96 96
     exit();
97 97
 }
Please login to merge, or discard this patch.
xoops_version.php 2 patches
Indentation   +127 added lines, -127 removed lines patch added patch discarded remove patch
@@ -30,16 +30,16 @@  discard block
 block discarded – undo
30 30
 include __DIR__ . '/include/vars.php';
31 31
 
32 32
 $modversion                 = [
33
-    'name'          => planet_constant('MI_NAME'),
34
-    'version'       => 2.10,
35
-    'module_status' => 'Final',
36
-    'release_date'  => '2016/08/01',
37
-    'description'   => planet_constant('MI_DESC'),
38
-    'author'        => 'D.J. (phppp)',
39
-    'credits'       => 'XOOPS Project',
40
-    'image'         => 'assets/images/logoModule.png',
41
-    'dirname'       => $GLOBALS['moddirname'],
42
-    'help'          => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/readme.html'
33
+	'name'          => planet_constant('MI_NAME'),
34
+	'version'       => 2.10,
35
+	'module_status' => 'Final',
36
+	'release_date'  => '2016/08/01',
37
+	'description'   => planet_constant('MI_DESC'),
38
+	'author'        => 'D.J. (phppp)',
39
+	'credits'       => 'XOOPS Project',
40
+	'image'         => 'assets/images/logoModule.png',
41
+	'dirname'       => $GLOBALS['moddirname'],
42
+	'help'          => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/readme.html'
43 43
 ];
44 44
 $modversion['help']         = 'page=help';
45 45
 $modversion['license']      = 'GNU see LICENSE';
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
 // database tables
63 63
 $modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
64 64
 $modversion['tables']           = [
65
-    $GLOBALS['MOD_DB_PREFIX'] . '_category',
66
-    $GLOBALS['MOD_DB_PREFIX'] . '_article',
67
-    $GLOBALS['MOD_DB_PREFIX'] . '_blog',
68
-    $GLOBALS['MOD_DB_PREFIX'] . '_blogcat',
69
-    $GLOBALS['MOD_DB_PREFIX'] . '_bookmark',
70
-    $GLOBALS['MOD_DB_PREFIX'] . '_rate'
65
+	$GLOBALS['MOD_DB_PREFIX'] . '_category',
66
+	$GLOBALS['MOD_DB_PREFIX'] . '_article',
67
+	$GLOBALS['MOD_DB_PREFIX'] . '_blog',
68
+	$GLOBALS['MOD_DB_PREFIX'] . '_blogcat',
69
+	$GLOBALS['MOD_DB_PREFIX'] . '_bookmark',
70
+	$GLOBALS['MOD_DB_PREFIX'] . '_rate'
71 71
 ];
72 72
 
73 73
 // Admin things
@@ -149,162 +149,162 @@  discard block
 block discarded – undo
149 149
 // Configs
150 150
 // Config items
151 151
 $modversion['config'][] = [
152
-    'name'        => 'do_debug',
153
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG',
154
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG_DESC',
155
-    'formtype'    => 'yesno',
156
-    'valuetype'   => 'int',
157
-    'default'     => 1
152
+	'name'        => 'do_debug',
153
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG',
154
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG_DESC',
155
+	'formtype'    => 'yesno',
156
+	'valuetype'   => 'int',
157
+	'default'     => 1
158 158
 ];
159 159
 
160 160
 $modversion['config'][] = [
161
-    'name'        => 'do_urw',
162
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE',
163
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE_DESC',
164
-    'formtype'    => 'yesno',
165
-    'valuetype'   => 'int',
166
-    'default'     => in_array(php_sapi_name(), ['apache', 'apache2handler'])
161
+	'name'        => 'do_urw',
162
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE',
163
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE_DESC',
164
+	'formtype'    => 'yesno',
165
+	'valuetype'   => 'int',
166
+	'default'     => in_array(php_sapi_name(), ['apache', 'apache2handler'])
167 167
 ];
168 168
 
169 169
 $modversion['config'][] = [
170
-    'name'        => 'theme_set',
171
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET',
172
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET_DESC',
173
-    'formtype'    => 'select',
174
-    'valuetype'   => 'text',
175
-    'options'     => [_NONE => '0'],
176
-    'default'     => ''
170
+	'name'        => 'theme_set',
171
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET',
172
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET_DESC',
173
+	'formtype'    => 'select',
174
+	'valuetype'   => 'text',
175
+	'options'     => [_NONE => '0'],
176
+	'default'     => ''
177 177
 ];
178 178
 
179 179
 $modversion['config'][] = [
180
-    'name'        => 'timeformat',
181
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT',
182
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_DESC',
183
-    'formtype'    => 'select',
184
-    'valuetype'   => 'text',
185
-    'options'     => [
186
-        _DATESTRING                                       => 'l',
187
-        _MEDIUMDATESTRING                                 => 'm',
188
-        _SHORTDATESTRING                                  => 's',
189
-        $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_CUSTOM' => 'c'
190
-    ],
191
-    'default'     => 'c'
180
+	'name'        => 'timeformat',
181
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT',
182
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_DESC',
183
+	'formtype'    => 'select',
184
+	'valuetype'   => 'text',
185
+	'options'     => [
186
+		_DATESTRING                                       => 'l',
187
+		_MEDIUMDATESTRING                                 => 'm',
188
+		_SHORTDATESTRING                                  => 's',
189
+		$GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_CUSTOM' => 'c'
190
+	],
191
+	'default'     => 'c'
192 192
 ];
193 193
 
194 194
 $modversion['config'][] = [
195
-    'name'        => 'articles_perpage',
196
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE',
197
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE_DESC',
198
-    'formtype'    => 'textbox',
199
-    'valuetype'   => 'int',
200
-    'default'     => 10
195
+	'name'        => 'articles_perpage',
196
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE',
197
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE_DESC',
198
+	'formtype'    => 'textbox',
199
+	'valuetype'   => 'int',
200
+	'default'     => 10
201 201
 ];
202 202
 
203 203
 $modversion['config'][] = [
204
-    'name'        => 'list_perpage',
205
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE',
206
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE_DESC',
207
-    'formtype'    => 'textbox',
208
-    'valuetype'   => 'int',
209
-    'default'     => 20
204
+	'name'        => 'list_perpage',
205
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE',
206
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE_DESC',
207
+	'formtype'    => 'textbox',
208
+	'valuetype'   => 'int',
209
+	'default'     => 20
210 210
 ];
211 211
 
212 212
 $modversion['config'][] = [
213
-    'name'        => 'blogs_perupdate',
214
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE',
215
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE_DESC',
216
-    'formtype'    => 'textbox',
217
-    'valuetype'   => 'int',
218
-    'default'     => 10
213
+	'name'        => 'blogs_perupdate',
214
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE',
215
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE_DESC',
216
+	'formtype'    => 'textbox',
217
+	'valuetype'   => 'int',
218
+	'default'     => 10
219 219
 ];
220 220
 
221 221
 $modversion['config'][] = [
222
-    'name'        => 'article_expire',
223
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE',
224
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE_DESC',
225
-    'formtype'    => 'textbox',
226
-    'valuetype'   => 'int',
227
-    'default'     => 30
222
+	'name'        => 'article_expire',
223
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE',
224
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE_DESC',
225
+	'formtype'    => 'textbox',
226
+	'valuetype'   => 'int',
227
+	'default'     => 30
228 228
 ];
229 229
 
230 230
 $modversion['config'][] = [
231
-    'name'        => 'display_summary',
232
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY',
233
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY_DESC',
234
-    'formtype'    => 'textbox',
235
-    'valuetype'   => 'int',
236
-    'default'     => 0
231
+	'name'        => 'display_summary',
232
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY',
233
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY_DESC',
234
+	'formtype'    => 'textbox',
235
+	'valuetype'   => 'int',
236
+	'default'     => 0
237 237
 ];
238 238
 
239 239
 $modversion['config'][] = [
240
-    'name'        => 'do_sibling',
241
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING',
242
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING_DESC',
243
-    'formtype'    => 'yesno',
244
-    'valuetype'   => 'int',
245
-    'default'     => 1
240
+	'name'        => 'do_sibling',
241
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING',
242
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING_DESC',
243
+	'formtype'    => 'yesno',
244
+	'valuetype'   => 'int',
245
+	'default'     => 1
246 246
 ];
247 247
 
248 248
 $modversion['config'][] = [
249
-    'name'        => 'pings',
250
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PING',
251
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PING_DESC',
252
-    'formtype'    => 'textarea',
253
-    'valuetype'   => 'text',
254
-    'default'     => ''
249
+	'name'        => 'pings',
250
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PING',
251
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PING_DESC',
252
+	'formtype'    => 'textarea',
253
+	'valuetype'   => 'text',
254
+	'default'     => ''
255 255
 ];
256 256
 
257 257
 $modversion['config'][] = [
258
-    'name'        => 'trackback_option',
259
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION',
260
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION_DESC',
261
-    'formtype'    => 'select',
262
-    'valuetype'   => 'int',
263
-    'default'     => 0,
264
-    'options'     => [planet_constant('MI_MODERATION') => 0, _ALL => 1, _NONE => 2]
258
+	'name'        => 'trackback_option',
259
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION',
260
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION_DESC',
261
+	'formtype'    => 'select',
262
+	'valuetype'   => 'int',
263
+	'default'     => 0,
264
+	'options'     => [planet_constant('MI_MODERATION') => 0, _ALL => 1, _NONE => 2]
265 265
 ];
266 266
 
267 267
 $modversion['config'][] = [
268
-    'name'        => 'copyright',
269
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT',
270
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT_DESC',
271
-    'formtype'    => 'textbox',
272
-    'valuetype'   => 'text',
273
-    'default'     => 'Copyright&copy; %s & ' . $xoopsConfig['sitename']
268
+	'name'        => 'copyright',
269
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT',
270
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT_DESC',
271
+	'formtype'    => 'textbox',
272
+	'valuetype'   => 'text',
273
+	'default'     => 'Copyright&copy; %s & ' . $xoopsConfig['sitename']
274 274
 ];
275 275
 
276 276
 $modversion['config'][] = [
277
-    'name'        => 'newblog_submit',
278
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT',
279
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT_DESC',
280
-    'formtype'    => 'select',
281
-    'valuetype'   => 'int',
282
-    'default'     => 2,
283
-    'options'     => [
284
-        _NONE                            => 0,
285
-        planet_constant('MI_MODERATION') => 1,
286
-        planet_constant('MI_MEMBER')     => 2,
287
-        _ALL                             => 3
288
-    ]
289
-    // 0 - Only admin; 1 - all but need approval; 2 - members auto approved; 3 - all
277
+	'name'        => 'newblog_submit',
278
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT',
279
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT_DESC',
280
+	'formtype'    => 'select',
281
+	'valuetype'   => 'int',
282
+	'default'     => 2,
283
+	'options'     => [
284
+		_NONE                            => 0,
285
+		planet_constant('MI_MODERATION') => 1,
286
+		planet_constant('MI_MEMBER')     => 2,
287
+		_ALL                             => 3
288
+	]
289
+	// 0 - Only admin; 1 - all but need approval; 2 - members auto approved; 3 - all
290 290
 ];
291 291
 
292 292
 $modversion['config'][] = [
293
-    'name'        => 'anonymous_rate',
294
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE',
295
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE_DESC',
296
-    'formtype'    => 'yesno',
297
-    'valuetype'   => 'int',
298
-    'default'     => 0
293
+	'name'        => 'anonymous_rate',
294
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE',
295
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE_DESC',
296
+	'formtype'    => 'yesno',
297
+	'valuetype'   => 'int',
298
+	'default'     => 0
299 299
 ];
300 300
 
301 301
 $modversion['config'][] = [
302
-    'name'        => 'do_pseudocron',
303
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON',
304
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON_DESC',
305
-    'formtype'    => 'yesno',
306
-    'valuetype'   => 'int',
307
-    'default'     => 1
302
+	'name'        => 'do_pseudocron',
303
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON',
304
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON_DESC',
305
+	'formtype'    => 'yesno',
306
+	'valuetype'   => 'int',
307
+	'default'     => 1
308 308
 ];
309 309
 
310 310
 // Notification
Please login to merge, or discard this patch.
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 
28 28
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
29 29
 
30
-include __DIR__ . '/include/vars.php';
30
+include __DIR__.'/include/vars.php';
31 31
 
32
-$modversion                 = [
32
+$modversion = [
33 33
     'name'          => planet_constant('MI_NAME'),
34 34
     'version'       => 2.10,
35 35
     'module_status' => 'Final',
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
     'credits'       => 'XOOPS Project',
40 40
     'image'         => 'assets/images/logoModule.png',
41 41
     'dirname'       => $GLOBALS['moddirname'],
42
-    'help'          => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/readme.html'
42
+    'help'          => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/readme.html'
43 43
 ];
44 44
 $modversion['help']         = 'page=help';
45 45
 $modversion['license']      = 'GNU see LICENSE';
46
-$modversion['license_file'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/gpl.txt';
46
+$modversion['license_file'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/gpl.txt';
47 47
 $modversion['author_word']  = '';
48 48
 $modversion['module_team']  = '';
49 49
 
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
 // database tables
63 63
 $modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
64 64
 $modversion['tables']           = [
65
-    $GLOBALS['MOD_DB_PREFIX'] . '_category',
66
-    $GLOBALS['MOD_DB_PREFIX'] . '_article',
67
-    $GLOBALS['MOD_DB_PREFIX'] . '_blog',
68
-    $GLOBALS['MOD_DB_PREFIX'] . '_blogcat',
69
-    $GLOBALS['MOD_DB_PREFIX'] . '_bookmark',
70
-    $GLOBALS['MOD_DB_PREFIX'] . '_rate'
65
+    $GLOBALS['MOD_DB_PREFIX'].'_category',
66
+    $GLOBALS['MOD_DB_PREFIX'].'_article',
67
+    $GLOBALS['MOD_DB_PREFIX'].'_blog',
68
+    $GLOBALS['MOD_DB_PREFIX'].'_blogcat',
69
+    $GLOBALS['MOD_DB_PREFIX'].'_bookmark',
70
+    $GLOBALS['MOD_DB_PREFIX'].'_rate'
71 71
 ];
72 72
 
73 73
 // Admin things
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
 /**
94 94
  * Templates
95 95
  */
96
-$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_index.tpl', 'description' => ''];
97
-$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_article.tpl', 'description' => ''];
98
-$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_archive.tpl', 'description' => ''];
99
-$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_blogs.tpl', 'description' => ''];
100
-$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_search.tpl', 'description' => ''];
96
+$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'].'_index.tpl', 'description' => ''];
97
+$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'].'_article.tpl', 'description' => ''];
98
+$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'].'_archive.tpl', 'description' => ''];
99
+$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'].'_blogs.tpl', 'description' => ''];
100
+$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'].'_search.tpl', 'description' => ''];
101 101
 
102 102
 //module css
103 103
 $modversion['css'] = 'templates/style.css';
@@ -109,31 +109,31 @@  discard block
 block discarded – undo
109 109
 $modversion['blocks'][$i]['file']        = 'block.php';
110 110
 $modversion['blocks'][$i]['name']        = planet_constant('MI_ARTICLE');
111 111
 $modversion['blocks'][$i]['description'] = planet_constant('MI_ARTICLE_DESC');
112
-$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'] . '_article_show';
112
+$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'].'_article_show';
113 113
 $modversion['blocks'][$i]['options']     = 'time|10|0|0'; // type|MaxItems|TitleLength|SummaryLength
114
-$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'] . '_article_edit';
115
-$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'] . '_block_article.tpl';
114
+$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'].'_article_edit';
115
+$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'].'_block_article.tpl';
116 116
 
117 117
 ++$i;
118 118
 $modversion['blocks'][$i]['file']        = 'block.php';
119 119
 $modversion['blocks'][$i]['name']        = planet_constant('MI_CATEGORY');
120 120
 $modversion['blocks'][$i]['description'] = planet_constant('MI_CATEGORY_DESC');
121
-$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'] . '_category_show';
122
-$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'] . '_block_category.tpl';
121
+$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'].'_category_show';
122
+$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'].'_block_category.tpl';
123 123
 
124 124
 ++$i;
125 125
 $modversion['blocks'][$i]['file']        = 'block.php';
126 126
 $modversion['blocks'][$i]['name']        = planet_constant('MI_BLOG');
127 127
 $modversion['blocks'][$i]['description'] = planet_constant('MI_BLOG_DESC');
128
-$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'] . '_blog_show';
128
+$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'].'_blog_show';
129 129
 $modversion['blocks'][$i]['options']     = 'feature|10|0|1'; // type|MaxItems|TitleLength|ShowDesc
130
-$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'] . '_blog_edit';
131
-$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'] . '_block_blog.tpl';
130
+$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'].'_blog_edit';
131
+$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'].'_block_blog.tpl';
132 132
 
133 133
 // Search
134 134
 $modversion['hasSearch']      = 1;
135 135
 $modversion['search']['file'] = 'include/search.inc.php';
136
-$modversion['search']['func'] = $GLOBALS['VAR_PREFIX'] . '_search';
136
+$modversion['search']['func'] = $GLOBALS['VAR_PREFIX'].'_search';
137 137
 
138 138
 // Comments
139 139
 $modversion['hasComments'] = 1;
@@ -143,15 +143,15 @@  discard block
 block discarded – undo
143 143
 
144 144
 // Comment callback functions
145 145
 $modversion['comments']['callbackFile']        = 'include/comment.inc.php';
146
-$modversion['comments']['callback']['approve'] = $GLOBALS['VAR_PREFIX'] . '_com_approve';
147
-$modversion['comments']['callback']['update']  = $GLOBALS['VAR_PREFIX'] . '_com_update';
146
+$modversion['comments']['callback']['approve'] = $GLOBALS['VAR_PREFIX'].'_com_approve';
147
+$modversion['comments']['callback']['update']  = $GLOBALS['VAR_PREFIX'].'_com_update';
148 148
 
149 149
 // Configs
150 150
 // Config items
151 151
 $modversion['config'][] = [
152 152
     'name'        => 'do_debug',
153
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG',
154
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG_DESC',
153
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG',
154
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG_DESC',
155 155
     'formtype'    => 'yesno',
156 156
     'valuetype'   => 'int',
157 157
     'default'     => 1
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
 
160 160
 $modversion['config'][] = [
161 161
     'name'        => 'do_urw',
162
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE',
163
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE_DESC',
162
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE',
163
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE_DESC',
164 164
     'formtype'    => 'yesno',
165 165
     'valuetype'   => 'int',
166 166
     'default'     => in_array(php_sapi_name(), ['apache', 'apache2handler'])
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
 
169 169
 $modversion['config'][] = [
170 170
     'name'        => 'theme_set',
171
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET',
172
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET_DESC',
171
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_THEMESET',
172
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_THEMESET_DESC',
173 173
     'formtype'    => 'select',
174 174
     'valuetype'   => 'text',
175 175
     'options'     => [_NONE => '0'],
@@ -178,23 +178,23 @@  discard block
 block discarded – undo
178 178
 
179 179
 $modversion['config'][] = [
180 180
     'name'        => 'timeformat',
181
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT',
182
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_DESC',
181
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT',
182
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_DESC',
183 183
     'formtype'    => 'select',
184 184
     'valuetype'   => 'text',
185 185
     'options'     => [
186 186
         _DATESTRING                                       => 'l',
187 187
         _MEDIUMDATESTRING                                 => 'm',
188 188
         _SHORTDATESTRING                                  => 's',
189
-        $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_CUSTOM' => 'c'
189
+        $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_CUSTOM' => 'c'
190 190
     ],
191 191
     'default'     => 'c'
192 192
 ];
193 193
 
194 194
 $modversion['config'][] = [
195 195
     'name'        => 'articles_perpage',
196
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE',
197
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE_DESC',
196
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE',
197
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE_DESC',
198 198
     'formtype'    => 'textbox',
199 199
     'valuetype'   => 'int',
200 200
     'default'     => 10
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
 
203 203
 $modversion['config'][] = [
204 204
     'name'        => 'list_perpage',
205
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE',
206
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE_DESC',
205
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE',
206
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE_DESC',
207 207
     'formtype'    => 'textbox',
208 208
     'valuetype'   => 'int',
209 209
     'default'     => 20
@@ -211,8 +211,8 @@  discard block
 block discarded – undo
211 211
 
212 212
 $modversion['config'][] = [
213 213
     'name'        => 'blogs_perupdate',
214
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE',
215
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE_DESC',
214
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE',
215
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE_DESC',
216 216
     'formtype'    => 'textbox',
217 217
     'valuetype'   => 'int',
218 218
     'default'     => 10
@@ -220,8 +220,8 @@  discard block
 block discarded – undo
220 220
 
221 221
 $modversion['config'][] = [
222 222
     'name'        => 'article_expire',
223
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE',
224
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE_DESC',
223
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE',
224
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE_DESC',
225 225
     'formtype'    => 'textbox',
226 226
     'valuetype'   => 'int',
227 227
     'default'     => 30
@@ -229,8 +229,8 @@  discard block
 block discarded – undo
229 229
 
230 230
 $modversion['config'][] = [
231 231
     'name'        => 'display_summary',
232
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY',
233
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY_DESC',
232
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY',
233
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY_DESC',
234 234
     'formtype'    => 'textbox',
235 235
     'valuetype'   => 'int',
236 236
     'default'     => 0
@@ -238,8 +238,8 @@  discard block
 block discarded – undo
238 238
 
239 239
 $modversion['config'][] = [
240 240
     'name'        => 'do_sibling',
241
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING',
242
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING_DESC',
241
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING',
242
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING_DESC',
243 243
     'formtype'    => 'yesno',
244 244
     'valuetype'   => 'int',
245 245
     'default'     => 1
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
 
248 248
 $modversion['config'][] = [
249 249
     'name'        => 'pings',
250
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PING',
251
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PING_DESC',
250
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_PING',
251
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_PING_DESC',
252 252
     'formtype'    => 'textarea',
253 253
     'valuetype'   => 'text',
254 254
     'default'     => ''
@@ -256,8 +256,8 @@  discard block
 block discarded – undo
256 256
 
257 257
 $modversion['config'][] = [
258 258
     'name'        => 'trackback_option',
259
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION',
260
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION_DESC',
259
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION',
260
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION_DESC',
261 261
     'formtype'    => 'select',
262 262
     'valuetype'   => 'int',
263 263
     'default'     => 0,
@@ -266,17 +266,17 @@  discard block
 block discarded – undo
266 266
 
267 267
 $modversion['config'][] = [
268 268
     'name'        => 'copyright',
269
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT',
270
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT_DESC',
269
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT',
270
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT_DESC',
271 271
     'formtype'    => 'textbox',
272 272
     'valuetype'   => 'text',
273
-    'default'     => 'Copyright&copy; %s & ' . $xoopsConfig['sitename']
273
+    'default'     => 'Copyright&copy; %s & '.$xoopsConfig['sitename']
274 274
 ];
275 275
 
276 276
 $modversion['config'][] = [
277 277
     'name'        => 'newblog_submit',
278
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT',
279
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT_DESC',
278
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT',
279
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT_DESC',
280 280
     'formtype'    => 'select',
281 281
     'valuetype'   => 'int',
282 282
     'default'     => 2,
@@ -291,8 +291,8 @@  discard block
 block discarded – undo
291 291
 
292 292
 $modversion['config'][] = [
293 293
     'name'        => 'anonymous_rate',
294
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE',
295
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE_DESC',
294
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE',
295
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE_DESC',
296 296
     'formtype'    => 'yesno',
297 297
     'valuetype'   => 'int',
298 298
     'default'     => 0
@@ -300,8 +300,8 @@  discard block
 block discarded – undo
300 300
 
301 301
 $modversion['config'][] = [
302 302
     'name'        => 'do_pseudocron',
303
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON',
304
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON_DESC',
303
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON',
304
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON_DESC',
305 305
     'formtype'    => 'yesno',
306 306
     'valuetype'   => 'int',
307 307
     'default'     => 1
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 
312 312
 $modversion['hasNotification']             = 1;
313 313
 $modversion['notification']['lookup_file'] = 'include/notification.inc.php';
314
-$modversion['notification']['lookup_func'] = $GLOBALS['VAR_PREFIX'] . '_notify_iteminfo';
314
+$modversion['notification']['lookup_func'] = $GLOBALS['VAR_PREFIX'].'_notify_iteminfo';
315 315
 
316 316
 $i = 0;
317 317
 ++$i;
Please login to merge, or discard this patch.
include/config.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
 
25 25
 $moduleDirName = basename(dirname(__DIR__));
26 26
 $uploadFolders = [
27
-    NEWBB_UPLOAD_PATH,
28
-    NEWBB_UPLOAD_PATH . '/thumbs'
27
+	NEWBB_UPLOAD_PATH,
28
+	NEWBB_UPLOAD_PATH . '/thumbs'
29 29
 ];
30 30
 
31 31
 //$copyFiles = array(
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@
 block discarded – undo
20 20
  */
21 21
 
22 22
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
23
-require_once __DIR__ . '/common.php';
23
+require_once __DIR__.'/common.php';
24 24
 
25 25
 $moduleDirName = basename(dirname(__DIR__));
26 26
 $uploadFolders = [
27 27
     NEWBB_UPLOAD_PATH,
28
-    NEWBB_UPLOAD_PATH . '/thumbs'
28
+    NEWBB_UPLOAD_PATH.'/thumbs'
29 29
 ];
30 30
 
31 31
 //$copyFiles = array(
Please login to merge, or discard this patch.
include/functions.ini.php 2 patches
Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -32,88 +32,88 @@
 block discarded – undo
32 32
 
33 33
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
34 34
 if (!defined('PLANET_INI')) {
35
-    exit();
35
+	exit();
36 36
 }
37 37
 
38 38
 if (!defined('PLANET_FUNCTIONS_INI')):
39
-    define('PLANET_FUNCTIONS_INI', 1);
39
+	define('PLANET_FUNCTIONS_INI', 1);
40 40
 
41
-    /**
42
-     * @param $name
43
-     * @return mixed
44
-     */
45
-    function planet_constant($name)
46
-    {
47
-        return mod_constant($name);
48
-    }
41
+	/**
42
+	 * @param $name
43
+	 * @return mixed
44
+	 */
45
+	function planet_constant($name)
46
+	{
47
+		return mod_constant($name);
48
+	}
49 49
 
50
-    /**
51
-     * @param      $name
52
-     * @param bool $isRel
53
-     * @return string
54
-     */
55
-    function planet_DB_prefix($name, $isRel = false)
56
-    {
57
-        return mod_DB_prefix($name, $isRel);
58
-    }
50
+	/**
51
+	 * @param      $name
52
+	 * @param bool $isRel
53
+	 * @return string
54
+	 */
55
+	function planet_DB_prefix($name, $isRel = false)
56
+	{
57
+		return mod_DB_prefix($name, $isRel);
58
+	}
59 59
 
60
-    /**
61
-     * @return bool
62
-     */
63
-    function planet_load_object()
64
-    {
65
-        return load_object();
66
-    }
60
+	/**
61
+	 * @return bool
62
+	 */
63
+	function planet_load_object()
64
+	{
65
+		return load_object();
66
+	}
67 67
 
68
-    /**
69
-     * @return array|mixed
70
-     */
71
-    function planet_load_config()
72
-    {
73
-        static $moduleConfig;
74
-        if (isset($moduleConfig)) {
75
-            return $moduleConfig;
76
-        }
68
+	/**
69
+	 * @return array|mixed
70
+	 */
71
+	function planet_load_config()
72
+	{
73
+		static $moduleConfig;
74
+		if (isset($moduleConfig)) {
75
+			return $moduleConfig;
76
+		}
77 77
 
78
-        if (is_object($GLOBALS['xoopsModule'])
79
-            && $GLOBALS['xoopsModule']->getVar('dirname') == $GLOBALS['moddirname']) {
80
-            if (isset($GLOBALS['xoopsModuleConfig'])) {
81
-                $moduleConfig = $GLOBALS['xoopsModuleConfig'];
82
-            }
83
-        } else {
84
-            /** @var XoopsModuleHandler $moduleHandler */
85
-            $moduleHandler = xoops_getHandler('module');
86
-            $module        = $moduleHandler->getByDirname($GLOBALS['moddirname']);
78
+		if (is_object($GLOBALS['xoopsModule'])
79
+			&& $GLOBALS['xoopsModule']->getVar('dirname') == $GLOBALS['moddirname']) {
80
+			if (isset($GLOBALS['xoopsModuleConfig'])) {
81
+				$moduleConfig = $GLOBALS['xoopsModuleConfig'];
82
+			}
83
+		} else {
84
+			/** @var XoopsModuleHandler $moduleHandler */
85
+			$moduleHandler = xoops_getHandler('module');
86
+			$module        = $moduleHandler->getByDirname($GLOBALS['moddirname']);
87 87
 
88
-            $configHandler = xoops_getHandler('config');
89
-            $criteria      = new CriteriaCompo(new Criteria('conf_modid', $module->getVar('mid')));
90
-            $configs       = $configHandler->getConfigs($criteria);
91
-            foreach (array_keys($configs) as $i) {
92
-                $moduleConfig[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput();
93
-            }
94
-            unset($configs);
95
-        }
96
-        if ($customConfig = @include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/plugin.php') {
97
-            $moduleConfig = array_merge($moduleConfig, $customConfig);
98
-        }
88
+			$configHandler = xoops_getHandler('config');
89
+			$criteria      = new CriteriaCompo(new Criteria('conf_modid', $module->getVar('mid')));
90
+			$configs       = $configHandler->getConfigs($criteria);
91
+			foreach (array_keys($configs) as $i) {
92
+				$moduleConfig[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput();
93
+			}
94
+			unset($configs);
95
+		}
96
+		if ($customConfig = @include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/plugin.php') {
97
+			$moduleConfig = array_merge($moduleConfig, $customConfig);
98
+		}
99 99
 
100
-        return $moduleConfig;
101
-    }
100
+		return $moduleConfig;
101
+	}
102 102
 
103
-    function planet_define_url_delimiter()
104
-    {
105
-        if (defined('URL_DELIMITER')) {
106
-            if (!in_array(URL_DELIMITER, ['?', '/'])) {
107
-                die('Exit on security');
108
-            }
109
-        } else {
110
-            $moduleConfig = planet_load_config();
111
-            if (empty($moduleConfig['do_urw'])) {
112
-                define('URL_DELIMITER', '?');
113
-            } else {
114
-                define('URL_DELIMITER', '/');
115
-            }
116
-        }
117
-    }
103
+	function planet_define_url_delimiter()
104
+	{
105
+		if (defined('URL_DELIMITER')) {
106
+			if (!in_array(URL_DELIMITER, ['?', '/'])) {
107
+				die('Exit on security');
108
+			}
109
+		} else {
110
+			$moduleConfig = planet_load_config();
111
+			if (empty($moduleConfig['do_urw'])) {
112
+				define('URL_DELIMITER', '?');
113
+			} else {
114
+				define('URL_DELIMITER', '/');
115
+			}
116
+		}
117
+	}
118 118
 
119 119
 endif;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             if (isset($GLOBALS['xoopsModuleConfig'])) {
81 81
                 $moduleConfig = $GLOBALS['xoopsModuleConfig'];
82 82
             }
83
-        } else {
83
+        }else {
84 84
             /** @var XoopsModuleHandler $moduleHandler */
85 85
             $moduleHandler = xoops_getHandler('module');
86 86
             $module        = $moduleHandler->getByDirname($GLOBALS['moddirname']);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             }
94 94
             unset($configs);
95 95
         }
96
-        if ($customConfig = @include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/plugin.php') {
96
+        if ($customConfig = @include XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/include/plugin.php') {
97 97
             $moduleConfig = array_merge($moduleConfig, $customConfig);
98 98
         }
99 99
 
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
             if (!in_array(URL_DELIMITER, ['?', '/'])) {
107 107
                 die('Exit on security');
108 108
             }
109
-        } else {
109
+        }else {
110 110
             $moduleConfig = planet_load_config();
111 111
             if (empty($moduleConfig['do_urw'])) {
112 112
                 define('URL_DELIMITER', '?');
113
-            } else {
113
+            }else {
114 114
                 define('URL_DELIMITER', '/');
115 115
             }
116 116
         }
Please login to merge, or discard this patch.
include/common.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,19 +22,19 @@
 block discarded – undo
22 22
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
23 23
 
24 24
 define('NEWBB_DIRNAME', basename(dirname(__DIR__)));
25
-define('NEWBB_URL', XOOPS_URL . '/modules/' . NEWBB_DIRNAME);
26
-define('NEWBB_PATH', XOOPS_ROOT_PATH . '/modules/' . NEWBB_DIRNAME);
27
-define('NEWBB_IMAGES_URL', NEWBB_URL . '/assets/images');
28
-define('NEWBB_ADMIN_URL', NEWBB_URL . '/admin');
29
-define('NEWBB_ADMIN_PATH', NEWBB_PATH . '/admin/index.php');
30
-define('NEWBB_ROOT_PATH', $GLOBALS['xoops']->path('modules/' . NEWBB_DIRNAME));
31
-define('NEWBB_AUTHOR_LOGOIMG', NEWBB_URL . '/assets/images/logo_module.png');
32
-define('NEWBB_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . NEWBB_DIRNAME); // WITHOUT Trailing slash
33
-define('NEWBB_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . NEWBB_DIRNAME); // WITHOUT Trailing slash
25
+define('NEWBB_URL', XOOPS_URL.'/modules/'.NEWBB_DIRNAME);
26
+define('NEWBB_PATH', XOOPS_ROOT_PATH.'/modules/'.NEWBB_DIRNAME);
27
+define('NEWBB_IMAGES_URL', NEWBB_URL.'/assets/images');
28
+define('NEWBB_ADMIN_URL', NEWBB_URL.'/admin');
29
+define('NEWBB_ADMIN_PATH', NEWBB_PATH.'/admin/index.php');
30
+define('NEWBB_ROOT_PATH', $GLOBALS['xoops']->path('modules/'.NEWBB_DIRNAME));
31
+define('NEWBB_AUTHOR_LOGOIMG', NEWBB_URL.'/assets/images/logo_module.png');
32
+define('NEWBB_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.NEWBB_DIRNAME); // WITHOUT Trailing slash
33
+define('NEWBB_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.NEWBB_DIRNAME); // WITHOUT Trailing slash
34 34
 
35 35
 // module information
36 36
 $mod_copyright = "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
37
-                     <img src='" . NEWBB_AUTHOR_LOGOIMG . "' alt='XOOPS Project'></a>";
37
+                     <img src='" . NEWBB_AUTHOR_LOGOIMG."' alt='XOOPS Project'></a>";
38 38
 
39 39
 xoops_loadLanguage('common', NEWBB_DIRNAME);
40 40
 
Please login to merge, or discard this patch.
include/form.blog.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -43,28 +43,28 @@
 block discarded – undo
43 43
 $categories_option = $categoryHandler->getList();
44 44
 natsort($categories_option);
45 45
 if (count($categories_option)) {
46
-    $cat_option_tray = new XoopsFormElementTray(planet_constant('MD_CATEGORY'), '<br>');
47
-    $options         = [0 => _NONE];
48
-    foreach ($categories_option as $id => $title) {
49
-        $options[$id] = $title;
50
-    }
51
-    $cat_select = new XoopsFormSelect('', 'categories', $categories, 3, true);
52
-    $cat_select->addOptionArray($options);
53
-    $cat_option_tray->addElement($cat_select);
54
-    $form->addElement($cat_option_tray);
46
+	$cat_option_tray = new XoopsFormElementTray(planet_constant('MD_CATEGORY'), '<br>');
47
+	$options         = [0 => _NONE];
48
+	foreach ($categories_option as $id => $title) {
49
+		$options[$id] = $title;
50
+	}
51
+	$cat_select = new XoopsFormSelect('', 'categories', $categories, 3, true);
52
+	$cat_select->addOptionArray($options);
53
+	$cat_option_tray->addElement($cat_select);
54
+	$form->addElement($cat_option_tray);
55 55
 }
56 56
 
57 57
 /* For admin only */
58 58
 if (is_object($xoopsUser) && $xoopsUser->isAdmin()) {
59
-    $status_option_tray = new XoopsFormElementTray(planet_constant('MD_STATUS'), '<br>');
60
-    $status_select      = new XoopsFormSelect('', 'blog_status', $blog_obj->getVar('blog_status'));
61
-    $status_select->addOptionArray([
62
-                                       '0' => planet_constant('MD_PENDING'),
63
-                                       '1' => planet_constant('MD_ACTIVE'),
64
-                                       '2' => planet_constant('MD_FEATURED')
65
-                                   ]);
66
-    $status_option_tray->addElement($status_select);
67
-    $form->addElement($status_option_tray);
59
+	$status_option_tray = new XoopsFormElementTray(planet_constant('MD_STATUS'), '<br>');
60
+	$status_select      = new XoopsFormSelect('', 'blog_status', $blog_obj->getVar('blog_status'));
61
+	$status_select->addOptionArray([
62
+									   '0' => planet_constant('MD_PENDING'),
63
+									   '1' => planet_constant('MD_ACTIVE'),
64
+									   '2' => planet_constant('MD_FEATURED')
65
+								   ]);
66
+	$status_option_tray->addElement($status_select);
67
+	$form->addElement($status_option_tray);
68 68
 }
69 69
 
70 70
 $form->addElement(new XoopsFormHidden('blog', $blog_id));
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
28 28
 
29
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
29
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
30 30
 $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
31 31
 
32 32
 $form = new XoopsThemeForm(_EDIT, 'formblog', xoops_getenv('PHP_SELF'), 'POST', true);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 $butt_save = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
77 77
 $button_tray->addElement($butt_save);
78 78
 $butt_cancel = new XoopsFormButton('', 'cancel', _CANCEL, 'button');
79
-$butt_cancel->setExtra("onclick='window.document.location=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . (int)$blog_id . "\"'");
79
+$butt_cancel->setExtra("onclick='window.document.location=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'b'.(int) $blog_id."\"'");
80 80
 $button_tray->addElement($butt_cancel);
81 81
 $form->addElement($button_tray);
82 82
 $form->display();
Please login to merge, or discard this patch.