@@ -111,8 +111,7 @@ |
||
111 | 111 | if($this->limit) |
112 | 112 | { |
113 | 113 | return $this->limit->toString(); |
114 | - } |
|
115 | - else |
|
114 | + } else |
|
116 | 115 | { |
117 | 116 | return ""; |
118 | 117 | } |
@@ -32,14 +32,14 @@ discard block |
||
32 | 32 | function ConditionGroup($conditions, $pipe = "") |
33 | 33 | { |
34 | 34 | $this->conditions = array(); |
35 | - foreach($conditions as $condition) |
|
35 | + foreach ($conditions as $condition) |
|
36 | 36 | { |
37 | - if($condition->show()) |
|
37 | + if ($condition->show()) |
|
38 | 38 | { |
39 | 39 | $this->conditions[] = $condition; |
40 | 40 | } |
41 | 41 | } |
42 | - if(count($this->conditions) === 0) |
|
42 | + if (count($this->conditions) === 0) |
|
43 | 43 | { |
44 | 44 | $this->_show = false; |
45 | 45 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | function setPipe($pipe) |
60 | 60 | { |
61 | - if($this->pipe !== $pipe) |
|
61 | + if ($this->pipe !== $pipe) |
|
62 | 62 | { |
63 | 63 | $this->_group = null; |
64 | 64 | } |
@@ -72,24 +72,24 @@ discard block |
||
72 | 72 | */ |
73 | 73 | function toString($with_value = true) |
74 | 74 | { |
75 | - if(!isset($this->_group)) |
|
75 | + if (!isset($this->_group)) |
|
76 | 76 | { |
77 | 77 | $cond_indx = 0; |
78 | 78 | $group = ''; |
79 | 79 | |
80 | - foreach($this->conditions as $condition) |
|
80 | + foreach ($this->conditions as $condition) |
|
81 | 81 | { |
82 | - if($cond_indx === 0) |
|
82 | + if ($cond_indx === 0) |
|
83 | 83 | { |
84 | 84 | $condition->setPipe(""); |
85 | 85 | } |
86 | - $group .= $condition->toString($with_value) . ' '; |
|
86 | + $group .= $condition->toString($with_value).' '; |
|
87 | 87 | $cond_indx++; |
88 | 88 | } |
89 | 89 | |
90 | - if($this->pipe !== "" && trim($group) !== '') |
|
90 | + if ($this->pipe !== "" && trim($group) !== '') |
|
91 | 91 | { |
92 | - $group = $this->pipe . ' (' . $group . ')'; |
|
92 | + $group = $this->pipe.' ('.$group.')'; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | $this->_group = $group; |
@@ -104,10 +104,10 @@ discard block |
||
104 | 104 | function getArguments() |
105 | 105 | { |
106 | 106 | $args = array(); |
107 | - foreach($this->conditions as $condition) |
|
107 | + foreach ($this->conditions as $condition) |
|
108 | 108 | { |
109 | 109 | $arg = $condition->getArgument(); |
110 | - if($arg) |
|
110 | + if ($arg) |
|
111 | 111 | { |
112 | 112 | $args[] = $arg; |
113 | 113 | } |
@@ -85,8 +85,7 @@ discard block |
||
85 | 85 | if(strpos($name, '.') === FALSE) |
86 | 86 | { |
87 | 87 | $this->column_name = $name; |
88 | - } |
|
89 | - else |
|
88 | + } else |
|
90 | 89 | { |
91 | 90 | list($prefix, $name) = explode('.', $name); |
92 | 91 | $this->column_name = $name; |
@@ -159,8 +158,7 @@ discard block |
||
159 | 158 | , $this->argument_name |
160 | 159 | , $this->argument_name |
161 | 160 | ); |
162 | - } |
|
163 | - else |
|
161 | + } else |
|
164 | 162 | { |
165 | 163 | $arg = sprintf("\n" . '${\'%s_argument\'} = new Argument(\'%s\', %s);' . "\n" |
166 | 164 | , $this->argument_name |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | function Limit($list_count, $page = NULL, $page_count = NULL) |
44 | 44 | { |
45 | 45 | $this->list_count = $list_count; |
46 | - if($page) |
|
46 | + if ($page) |
|
47 | 47 | { |
48 | 48 | $list_count_value = $list_count->getValue(); |
49 | 49 | $page_value = $page->getValue(); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | function isPageHandler() |
61 | 61 | { |
62 | - if($this->page) |
|
62 | + if ($this->page) |
|
63 | 63 | { |
64 | 64 | return true; |
65 | 65 | } |
@@ -81,9 +81,9 @@ discard block |
||
81 | 81 | |
82 | 82 | function toString() |
83 | 83 | { |
84 | - if($this->page) |
|
84 | + if ($this->page) |
|
85 | 85 | { |
86 | - return $this->start . ' , ' . $this->list_count->getValue(); |
|
86 | + return $this->start.' , '.$this->list_count->getValue(); |
|
87 | 87 | } |
88 | 88 | else |
89 | 89 | { |
@@ -103,8 +103,7 @@ discard block |
||
103 | 103 | if($category->parent_srl) |
104 | 104 | { |
105 | 105 | $categoryList[$category->parent_srl]->children[] = & $categoryList[$key]; |
106 | - } |
|
107 | - else |
|
106 | + } else |
|
108 | 107 | { |
109 | 108 | $depth0[] = $key; |
110 | 109 | } |
@@ -324,8 +323,7 @@ discard block |
||
324 | 323 | if(method_exists($oModule, "moduleUninstall")) |
325 | 324 | { |
326 | 325 | return TRUE; |
327 | - } |
|
328 | - else |
|
326 | + } else |
|
329 | 327 | { |
330 | 328 | return FALSE; |
331 | 329 | } |
@@ -17,19 +17,19 @@ discard block |
||
17 | 17 | $request_url = Context::getRequestUri(); |
18 | 18 | $output = new stdClass(); |
19 | 19 | |
20 | - if(substr_compare($request_url, '/', -1) !== 0) |
|
20 | + if (substr_compare($request_url, '/', -1) !== 0) |
|
21 | 21 | { |
22 | 22 | $request_url .= '/'; |
23 | 23 | } |
24 | 24 | |
25 | - if($error === 0) |
|
25 | + if ($error === 0) |
|
26 | 26 | { |
27 | - if($message != 'success') |
|
27 | + if ($message != 'success') |
|
28 | 28 | { |
29 | 29 | $output->message = $message; |
30 | 30 | } |
31 | 31 | |
32 | - if($redirect_url) |
|
32 | + if ($redirect_url) |
|
33 | 33 | { |
34 | 34 | $output->url = $redirect_url; |
35 | 35 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | } |
41 | 41 | else |
42 | 42 | { |
43 | - if($message != 'fail') |
|
43 | + if ($message != 'fail') |
|
44 | 44 | { |
45 | 45 | $output->message = $message; |
46 | 46 | } |
@@ -50,15 +50,15 @@ discard block |
||
50 | 50 | $html[] = '<script type="text/javascript">'; |
51 | 51 | $html[] = '//<![CDATA['; |
52 | 52 | |
53 | - if($output->message) |
|
53 | + if ($output->message) |
|
54 | 54 | { |
55 | - $html[] = 'alert("' . $output->message . '");'; |
|
55 | + $html[] = 'alert("'.$output->message.'");'; |
|
56 | 56 | } |
57 | 57 | |
58 | - if($output->url) |
|
58 | + if ($output->url) |
|
59 | 59 | { |
60 | 60 | $url = preg_replace('/#(.+)$/i', '', $output->url); |
61 | - $html[] = 'self.location.href = "' . $request_url . 'common/tpl/redirect.html?redirect_url=' . urlencode($url) . '";'; |
|
61 | + $html[] = 'self.location.href = "'.$request_url.'common/tpl/redirect.html?redirect_url='.urlencode($url).'";'; |
|
62 | 62 | } |
63 | 63 | $html[] = '//]]>'; |
64 | 64 | $html[] = '</script>'; |
@@ -85,8 +85,7 @@ discard block |
||
85 | 85 | if(strpos($name, '.') === FALSE) |
86 | 86 | { |
87 | 87 | $this->column_name = $name; |
88 | - } |
|
89 | - else |
|
88 | + } else |
|
90 | 89 | { |
91 | 90 | list($prefix, $name) = explode('.', $name); |
92 | 91 | $this->column_name = $name; |
@@ -159,8 +158,7 @@ discard block |
||
159 | 158 | , $this->argument_name |
160 | 159 | , $this->argument_name |
161 | 160 | ); |
162 | - } |
|
163 | - else |
|
161 | + } else |
|
164 | 162 | { |
165 | 163 | $arg = sprintf("\n" . '${\'%s_argument\'} = new Argument(\'%s\', %s);' . "\n" |
166 | 164 | , $this->argument_name |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | function DBParser($escape_char_left, $escape_char_right = "", $table_prefix = "xe_") |
64 | 64 | { |
65 | 65 | $this->escape_char_left = $escape_char_left; |
66 | - if($escape_char_right !== "") |
|
66 | + if ($escape_char_right !== "") |
|
67 | 67 | { |
68 | 68 | $this->escape_char_right = $escape_char_right; |
69 | 69 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | function getEscapeChar($leftOrRight) |
84 | 84 | { |
85 | - if($leftOrRight === 'left') |
|
85 | + if ($leftOrRight === 'left') |
|
86 | 86 | { |
87 | 87 | return $this->escape_char_left; |
88 | 88 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | function escape($name) |
102 | 102 | { |
103 | - return $this->escape_char_left . $name . $this->escape_char_right; |
|
103 | + return $this->escape_char_left.$name.$this->escape_char_right; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | */ |
112 | 112 | function escapeString($name) |
113 | 113 | { |
114 | - return "'" . $this->escapeStringValue($name) . "'"; |
|
114 | + return "'".$this->escapeStringValue($name)."'"; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
@@ -122,11 +122,11 @@ discard block |
||
122 | 122 | */ |
123 | 123 | function escapeStringValue($value) |
124 | 124 | { |
125 | - if($value == "*") |
|
125 | + if ($value == "*") |
|
126 | 126 | { |
127 | 127 | return $value; |
128 | 128 | } |
129 | - if(is_string($value)) |
|
129 | + if (is_string($value)) |
|
130 | 130 | { |
131 | 131 | return $value = str_replace("'", "''", $value); |
132 | 132 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | function parseTableName($name) |
144 | 144 | { |
145 | - return $this->table_prefix . $name; |
|
145 | + return $this->table_prefix.$name; |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | /** |
@@ -165,15 +165,15 @@ discard block |
||
165 | 165 | */ |
166 | 166 | function escapeColumn($column_name) |
167 | 167 | { |
168 | - if($this->isUnqualifiedColumnName($column_name)) |
|
168 | + if ($this->isUnqualifiedColumnName($column_name)) |
|
169 | 169 | { |
170 | 170 | return $this->escape($column_name); |
171 | 171 | } |
172 | - if($this->isQualifiedColumnName($column_name)) |
|
172 | + if ($this->isQualifiedColumnName($column_name)) |
|
173 | 173 | { |
174 | 174 | list($table, $column) = explode('.', $column_name); |
175 | 175 | // $table can also be an alias, so the prefix should not be added |
176 | - return $this->escape($table) . '.' . $this->escape($column); |
|
176 | + return $this->escape($table).'.'.$this->escape($column); |
|
177 | 177 | //return $this->escape($this->parseTableName($table)).'.'.$this->escape($column); |
178 | 178 | } |
179 | 179 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | */ |
190 | 190 | function isUnqualifiedColumnName($column_name) |
191 | 191 | { |
192 | - if(strpos($column_name, '.') === FALSE && strpos($column_name, '(') === FALSE) |
|
192 | + if (strpos($column_name, '.') === FALSE && strpos($column_name, '(') === FALSE) |
|
193 | 193 | { |
194 | 194 | return TRUE; |
195 | 195 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | */ |
208 | 208 | function isQualifiedColumnName($column_name) |
209 | 209 | { |
210 | - if(strpos($column_name, '.') !== FALSE && strpos($column_name, '(') === FALSE) |
|
210 | + if (strpos($column_name, '.') !== FALSE && strpos($column_name, '(') === FALSE) |
|
211 | 211 | { |
212 | 212 | return TRUE; |
213 | 213 | } |
@@ -235,10 +235,10 @@ discard block |
||
235 | 235 | function parseExpression($column_name) |
236 | 236 | { |
237 | 237 | $functions = preg_split('/([\+\-\*\/\ ])/', $column_name, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); |
238 | - foreach($functions as $k => $v) |
|
238 | + foreach ($functions as $k => $v) |
|
239 | 239 | { |
240 | 240 | $function = &$functions[$k]; |
241 | - if(strlen($function) == 1) |
|
241 | + if (strlen($function) == 1) |
|
242 | 242 | { |
243 | 243 | continue; // skip delimiters |
244 | 244 | } |
@@ -246,25 +246,25 @@ discard block |
||
246 | 246 | $matches = preg_split('/([a-zA-Z0-9_*]+)/', $function, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); |
247 | 247 | $total_brackets = substr_count($function, "("); |
248 | 248 | $brackets = 0; |
249 | - foreach($matches as $i => $j) |
|
249 | + foreach ($matches as $i => $j) |
|
250 | 250 | { |
251 | 251 | $match = &$matches[$i]; |
252 | - if($match == '(') |
|
252 | + if ($match == '(') |
|
253 | 253 | { |
254 | 254 | $brackets++; |
255 | 255 | continue; |
256 | 256 | } |
257 | - if(strpos($match, ')') !== FALSE) |
|
257 | + if (strpos($match, ')') !== FALSE) |
|
258 | 258 | { |
259 | 259 | continue; |
260 | 260 | } |
261 | - if(in_array($match, array(',', '.'))) |
|
261 | + if (in_array($match, array(',', '.'))) |
|
262 | 262 | { |
263 | 263 | continue; |
264 | 264 | } |
265 | - if($brackets == $total_brackets) |
|
265 | + if ($brackets == $total_brackets) |
|
266 | 266 | { |
267 | - if(!is_numeric($match) && !in_array(strtoupper($match), array('UNSIGNED', 'INTEGER', 'AS'))) |
|
267 | + if (!is_numeric($match) && !in_array(strtoupper($match), array('UNSIGNED', 'INTEGER', 'AS'))) |
|
268 | 268 | { |
269 | 269 | $match = $this->escapeColumnExpression($match); |
270 | 270 | } |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | */ |
284 | 284 | function isStar($column_name) |
285 | 285 | { |
286 | - if(substr($column_name, -1) == '*') |
|
286 | + if (substr($column_name, -1) == '*') |
|
287 | 287 | { |
288 | 288 | return TRUE; |
289 | 289 | } |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | */ |
300 | 300 | function isStarFunction($column_name) |
301 | 301 | { |
302 | - if(strpos($column_name, "(*)") !== FALSE) |
|
302 | + if (strpos($column_name, "(*)") !== FALSE) |
|
303 | 303 | { |
304 | 304 | return TRUE; |
305 | 305 | } |
@@ -313,15 +313,15 @@ discard block |
||
313 | 313 | */ |
314 | 314 | function escapeColumnExpression($column_name) |
315 | 315 | { |
316 | - if($this->isStar($column_name)) |
|
316 | + if ($this->isStar($column_name)) |
|
317 | 317 | { |
318 | 318 | return $column_name; |
319 | 319 | } |
320 | - if($this->isStarFunction($column_name)) |
|
320 | + if ($this->isStarFunction($column_name)) |
|
321 | 321 | { |
322 | 322 | return $column_name; |
323 | 323 | } |
324 | - if(stripos($column_name, 'distinct') !== FALSE) |
|
324 | + if (stripos($column_name, 'distinct') !== FALSE) |
|
325 | 325 | { |
326 | 326 | return $column_name; |
327 | 327 | } |
@@ -111,8 +111,7 @@ |
||
111 | 111 | if($this->limit) |
112 | 112 | { |
113 | 113 | return $this->limit->toString(); |
114 | - } |
|
115 | - else |
|
114 | + } else |
|
116 | 115 | { |
117 | 116 | return ""; |
118 | 117 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | function SelectColumnTag($column) |
35 | 35 | { |
36 | - if($column == "*" || $column->attrs->name == '*') |
|
36 | + if ($column == "*" || $column->attrs->name == '*') |
|
37 | 37 | { |
38 | 38 | parent::ColumnTag(NULL); |
39 | 39 | $this->name = "*"; |
@@ -63,20 +63,20 @@ discard block |
||
63 | 63 | */ |
64 | 64 | function getExpressionString() |
65 | 65 | { |
66 | - if($this->name == '*') |
|
66 | + if ($this->name == '*') |
|
67 | 67 | { |
68 | 68 | return "new StarExpression()"; |
69 | 69 | } |
70 | - if($this->click_count) |
|
70 | + if ($this->click_count) |
|
71 | 71 | { |
72 | - return sprintf('new ClickCountExpression(\'%s\', %s, $args->%s)', $this->name, $this->alias ? '\'' . $this->alias . '\'' : "''", $this->click_count); |
|
72 | + return sprintf('new ClickCountExpression(\'%s\', %s, $args->%s)', $this->name, $this->alias ? '\''.$this->alias.'\'' : "''", $this->click_count); |
|
73 | 73 | } |
74 | - if(strpos($this->name, '$') === 0) |
|
74 | + if (strpos($this->name, '$') === 0) |
|
75 | 75 | { |
76 | 76 | return sprintf('new SelectExpression($args->%s)', substr($this->name, 1)); |
77 | 77 | } |
78 | 78 | $dbParser = DB::getParser(); |
79 | - return sprintf('new SelectExpression(\'%s\'%s)', $this->name, $this->alias ? ', \'' . $dbParser->escape($this->alias) . '\'' : ''); |
|
79 | + return sprintf('new SelectExpression(\'%s\'%s)', $this->name, $this->alias ? ', \''.$dbParser->escape($this->alias).'\'' : ''); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | } |
@@ -38,8 +38,7 @@ |
||
38 | 38 | if($column->name === 'query') |
39 | 39 | { |
40 | 40 | $this->columns[] = new QueryTag($column, true); |
41 | - } |
|
42 | - else |
|
41 | + } else |
|
43 | 42 | { |
44 | 43 | $this->columns[] = new UpdateColumnTag($column); |
45 | 44 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | function SelectColumnsTag($xml_columns_tag) |
29 | 29 | { |
30 | - if(!$xml_columns_tag) |
|
30 | + if (!$xml_columns_tag) |
|
31 | 31 | { |
32 | 32 | $xml_columns_tag = new Xml_Node_(); |
33 | 33 | } |
@@ -37,34 +37,34 @@ discard block |
||
37 | 37 | |
38 | 38 | $this->columns = array(); |
39 | 39 | |
40 | - if(!$xml_columns) |
|
40 | + if (!$xml_columns) |
|
41 | 41 | { |
42 | 42 | $this->columns[] = new SelectColumnTag("*"); |
43 | 43 | return; |
44 | 44 | } |
45 | 45 | |
46 | - if(!is_array($xml_columns)) |
|
46 | + if (!is_array($xml_columns)) |
|
47 | 47 | { |
48 | 48 | $xml_columns = array($xml_columns); |
49 | 49 | } |
50 | 50 | |
51 | - foreach($xml_columns as $column) |
|
51 | + foreach ($xml_columns as $column) |
|
52 | 52 | { |
53 | 53 | $this->columns[] = new SelectColumnTag($column); |
54 | 54 | } |
55 | 55 | |
56 | 56 | |
57 | - if(!$xml_queries) |
|
57 | + if (!$xml_queries) |
|
58 | 58 | { |
59 | 59 | return; |
60 | 60 | } |
61 | 61 | |
62 | - if(!is_array($xml_queries)) |
|
62 | + if (!is_array($xml_queries)) |
|
63 | 63 | { |
64 | 64 | $xml_queries = array($xml_queries); |
65 | 65 | } |
66 | 66 | |
67 | - foreach($xml_queries as $column) |
|
67 | + foreach ($xml_queries as $column) |
|
68 | 68 | { |
69 | 69 | $this->columns[] = new QueryTag($column, TRUE); |
70 | 70 | } |
@@ -77,16 +77,16 @@ discard block |
||
77 | 77 | */ |
78 | 78 | function toString() |
79 | 79 | { |
80 | - $output_columns = 'array(' . PHP_EOL; |
|
81 | - foreach($this->columns as $column) |
|
80 | + $output_columns = 'array('.PHP_EOL; |
|
81 | + foreach ($this->columns as $column) |
|
82 | 82 | { |
83 | - if(is_a($column, 'QueryTag')) |
|
83 | + if (is_a($column, 'QueryTag')) |
|
84 | 84 | { |
85 | - $output_columns .= $column->toString() . PHP_EOL . ','; |
|
85 | + $output_columns .= $column->toString().PHP_EOL.','; |
|
86 | 86 | } |
87 | 87 | else |
88 | 88 | { |
89 | - $output_columns .= $column->getExpressionString() . PHP_EOL . ','; |
|
89 | + $output_columns .= $column->getExpressionString().PHP_EOL.','; |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | $output_columns = substr($output_columns, 0, -1); |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | function getArguments() |
103 | 103 | { |
104 | 104 | $arguments = array(); |
105 | - foreach($this->columns as $column) |
|
105 | + foreach ($this->columns as $column) |
|
106 | 106 | { |
107 | - if(is_a($column, 'QueryTag')) |
|
107 | + if (is_a($column, 'QueryTag')) |
|
108 | 108 | { |
109 | 109 | $arguments = array_merge($arguments, $column->getArguments()); |
110 | 110 | } |
@@ -111,8 +111,7 @@ |
||
111 | 111 | if($this->limit) |
112 | 112 | { |
113 | 113 | return $this->limit->toString(); |
114 | - } |
|
115 | - else |
|
114 | + } else |
|
116 | 115 | { |
117 | 116 | return ""; |
118 | 117 | } |
@@ -59,18 +59,18 @@ discard block |
||
59 | 59 | // Sort order - asc / desc |
60 | 60 | $this->sort_order = $index->attrs->order; |
61 | 61 | $sortList = array('asc' => 1, 'desc' => 1); |
62 | - if(!isset($sortList[$this->sort_order])) |
|
62 | + if (!isset($sortList[$this->sort_order])) |
|
63 | 63 | { |
64 | 64 | $arg = new Xml_Node_(); |
65 | 65 | $arg->attrs = new Xml_Node_(); |
66 | 66 | $arg->attrs->var = $this->sort_order; |
67 | 67 | $arg->attrs->default = 'asc'; |
68 | 68 | $this->sort_order_argument = new SortQueryArgument($arg); |
69 | - $this->sort_order = '$' . $this->sort_order_argument->getArgumentName() . '_argument'; |
|
69 | + $this->sort_order = '$'.$this->sort_order_argument->getArgumentName().'_argument'; |
|
70 | 70 | } |
71 | 71 | else |
72 | 72 | { |
73 | - $this->sort_order = '"' . $this->sort_order . '"'; |
|
73 | + $this->sort_order = '"'.$this->sort_order.'"'; |
|
74 | 74 | } |
75 | 75 | } |
76 | 76 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | { |
84 | 84 | $arguments = array(); |
85 | 85 | $arguments[] = $this->argument; |
86 | - if($this->sort_order_argument) |
|
86 | + if ($this->sort_order_argument) |
|
87 | 87 | { |
88 | 88 | $arguments[] = $this->sort_order_argument; |
89 | 89 | } |
@@ -18,28 +18,28 @@ |
||
18 | 18 | } |
19 | 19 | |
20 | 20 | public function getResponseCode() { |
21 | - if($this->response) |
|
21 | + if ($this->response) |
|
22 | 22 | { |
23 | 23 | return $this->response->getStatus(); |
24 | 24 | } |
25 | 25 | } |
26 | 26 | |
27 | 27 | public function getResponseHeader() { |
28 | - if($this->response) |
|
28 | + if ($this->response) |
|
29 | 29 | { |
30 | 30 | return $this->response->getHeader(); |
31 | 31 | } |
32 | 32 | } |
33 | 33 | |
34 | 34 | public function getResponseBody() { |
35 | - if($this->response) |
|
35 | + if ($this->response) |
|
36 | 36 | { |
37 | 37 | return $this->response->getBody(); |
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
41 | 41 | public function getResponseCookies() { |
42 | - if($this->response) |
|
42 | + if ($this->response) |
|
43 | 43 | { |
44 | 44 | return $this->response->getCookies(); |
45 | 45 | } |
@@ -21,8 +21,7 @@ |
||
21 | 21 | if($absolute_url) |
22 | 22 | { |
23 | 23 | return getFullUrl('','vid',$vid, 'mid',$mid, 'act',$format); |
24 | - } |
|
25 | - else |
|
24 | + } else |
|
26 | 25 | { |
27 | 26 | return getUrl('','vid',$vid, 'mid',$mid, 'act',$format); |
28 | 27 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | function init() |
17 | 17 | { |
18 | - $this->setTemplatePath($this->module_path . 'tpl'); |
|
18 | + $this->setTemplatePath($this->module_path.'tpl'); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | /** |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $security = new Security($addon_list); |
35 | 35 | $addon_list = $security->encodeHTML('..', '..author..'); |
36 | 36 | |
37 | - foreach($addon_list as $no => $addon_info) |
|
37 | + foreach ($addon_list as $no => $addon_info) |
|
38 | 38 | { |
39 | 39 | $addon_list[$no]->description = nl2br(trim($addon_info->description)); |
40 | 40 | } |
@@ -64,21 +64,21 @@ discard block |
||
64 | 64 | $oModuleAdminModel = getAdminModel('module'); |
65 | 65 | |
66 | 66 | $args = new stdClass(); |
67 | - if($site_module_info->site_srl) |
|
67 | + if ($site_module_info->site_srl) |
|
68 | 68 | { |
69 | 69 | $args->site_srl = $site_module_info->site_srl; |
70 | 70 | } |
71 | 71 | $columnList = array('module_srl', 'module_category_srl', 'mid', 'browser_title'); |
72 | 72 | $mid_list = $oModuleModel->getMidList($args, $columnList); |
73 | 73 | // module_category and module combination |
74 | - if(!$site_module_info->site_srl) |
|
74 | + if (!$site_module_info->site_srl) |
|
75 | 75 | { |
76 | 76 | // Get a list of module categories |
77 | 77 | $module_categories = $oModuleModel->getModuleCategories(); |
78 | 78 | |
79 | - if(is_array($mid_list)) |
|
79 | + if (is_array($mid_list)) |
|
80 | 80 | { |
81 | - foreach($mid_list as $module_srl => $module) |
|
81 | + foreach ($mid_list as $module_srl => $module) |
|
82 | 82 | { |
83 | 83 | $module_categories[$module->module_category_srl]->list[$module_srl] = $module; |
84 | 84 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | // Template specifies the path and file |
97 | 97 | $this->setTemplateFile('setup_addon'); |
98 | 98 | |
99 | - if(Context::get('module') != 'admin') |
|
99 | + if (Context::get('module') != 'admin') |
|
100 | 100 | { |
101 | 101 | $this->setLayoutPath('./common/tpl'); |
102 | 102 | $this->setLayoutFile('popup_layout'); |