@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | return ("`" . $this->name . "` " . ($this->short ? ("varchar(" . $this->length . ")") : "text")) . |
25 | 25 | |
26 | - (($this->binary ? " BINARY" : "") . " NOT NULL DEFAULT '" . $this->default . "'"); |
|
26 | + (($this->binary ? " BINARY" : "") . " NOT NULL DEFAULT '" . $this->default . "'"); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | # Cast value |
@@ -21,9 +21,9 @@ |
||
21 | 21 | |
22 | 22 | public function statement() { |
23 | 23 | |
24 | - return ("`" . $this->name . "` " . ($this->short ? ("varchar(" . $this->length . ")") : "text")) . |
|
24 | + return ("`".$this->name."` ".($this->short ? ("varchar(".$this->length.")") : "text")). |
|
25 | 25 | |
26 | - (($this->binary ? " BINARY" : "") . " NOT NULL DEFAULT '" . $this->default . "'"); |
|
26 | + (($this->binary ? " BINARY" : "")." NOT NULL DEFAULT '".$this->default."'"); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | # Cast value |
@@ -16,7 +16,9 @@ |
||
16 | 16 | |
17 | 17 | # Set field configuration |
18 | 18 | |
19 | - foreach (get_defined_vars() as $name => $value) $this->$name = $value; |
|
19 | + foreach (get_defined_vars() as $name => $value) { |
|
20 | + $this->$name = $value; |
|
21 | + } |
|
20 | 22 | } |
21 | 23 | |
22 | 24 | # Get field statement |
@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | public function statement() { |
23 | 23 | |
24 | - return ("`" . $this->name . "` tinyint(1) UNSIGNED NOT NULL DEFAULT '" . intval($this->default) . "'"); |
|
24 | + return ("`".$this->name."` tinyint(1) UNSIGNED NOT NULL DEFAULT '".intval($this->default)."'"); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | # Cast value |
@@ -16,7 +16,9 @@ |
||
16 | 16 | |
17 | 17 | # Set field configuration |
18 | 18 | |
19 | - foreach (get_defined_vars() as $name => $value) $this->$name = $value; |
|
19 | + foreach (get_defined_vars() as $name => $value) { |
|
20 | + $this->$name = $value; |
|
21 | + } |
|
20 | 22 | } |
21 | 23 | |
22 | 24 | # Get field statement |
@@ -30,9 +30,9 @@ |
||
30 | 30 | |
31 | 31 | $query = ("CREATE TABLE IF NOT EXISTS `" . static::$table . "` (") . |
32 | 32 | |
33 | - implode(", ", $this->getStatements()) . |
|
33 | + implode(", ", $this->getStatements()) . |
|
34 | 34 | |
35 | - (") ENGINE=InnoDB DEFAULT CHARSET=utf8"); |
|
35 | + (") ENGINE=InnoDB DEFAULT CHARSET=utf8"); |
|
36 | 36 | |
37 | 37 | # ------------------------ |
38 | 38 |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | |
29 | 29 | private function createMainTable() { |
30 | 30 | |
31 | - $query = ("CREATE TABLE IF NOT EXISTS `" . static::$table . "` (") . |
|
31 | + $query = ("CREATE TABLE IF NOT EXISTS `".static::$table."` ("). |
|
32 | 32 | |
33 | - implode(", ", $this->getStatements()) . |
|
33 | + implode(", ", $this->getStatements()). |
|
34 | 34 | |
35 | 35 | (") ENGINE=InnoDB DEFAULT CHARSET=utf8"); |
36 | 36 | |
@@ -43,17 +43,17 @@ discard block |
||
43 | 43 | |
44 | 44 | private function createRelationsTable() { |
45 | 45 | |
46 | - $query = ("CREATE TABLE IF NOT EXISTS `" . static::$table_relations . "` (") . |
|
46 | + $query = ("CREATE TABLE IF NOT EXISTS `".static::$table_relations."` ("). |
|
47 | 47 | |
48 | - ("`ancestor` int(10) UNSIGNED NOT NULL, `descendant` int(10) UNSIGNED NOT NULL, ") . |
|
48 | + ("`ancestor` int(10) UNSIGNED NOT NULL, `descendant` int(10) UNSIGNED NOT NULL, "). |
|
49 | 49 | |
50 | - ("`depth` int(10) UNSIGNED NOT NULL, ") . |
|
50 | + ("`depth` int(10) UNSIGNED NOT NULL, "). |
|
51 | 51 | |
52 | - ("PRIMARY KEY (`ancestor`, `descendant`), KEY (`ancestor`), KEY (`descendant`), KEY (`depth`), ") . |
|
52 | + ("PRIMARY KEY (`ancestor`, `descendant`), KEY (`ancestor`), KEY (`descendant`), KEY (`depth`), "). |
|
53 | 53 | |
54 | - ("FOREIGN KEY (`ancestor`) REFERENCES `" . static::$table . "` (`id`) ON DELETE CASCADE, ") . |
|
54 | + ("FOREIGN KEY (`ancestor`) REFERENCES `".static::$table."` (`id`) ON DELETE CASCADE, "). |
|
55 | 55 | |
56 | - ("FOREIGN KEY (`descendant`) REFERENCES `" . static::$table . "` (`id`) ON DELETE CASCADE ") . |
|
56 | + ("FOREIGN KEY (`descendant`) REFERENCES `".static::$table."` (`id`) ON DELETE CASCADE "). |
|
57 | 57 | |
58 | 58 | (") ENGINE=InnoDB DEFAULT CHARSET=utf8"); |
59 | 59 |
@@ -16,7 +16,9 @@ |
||
16 | 16 | |
17 | 17 | foreach ([$this->params, $this->indexes, $this->foreigns] as $group) { |
18 | 18 | |
19 | - foreach ($group->list() as $item) $statements[] = $item->statement(); |
|
19 | + foreach ($group->list() as $item) { |
|
20 | + $statements[] = $item->statement(); |
|
21 | + } |
|
20 | 22 | } |
21 | 23 | |
22 | 24 | # ------------------------ |
@@ -12,13 +12,13 @@ discard block |
||
12 | 12 | |
13 | 13 | return ("SELECT SQL_CALC_FOUND_ROWS " . $this->getSelection() . " ") . |
14 | 14 | |
15 | - ("FROM " . static::$table . " ent ") . |
|
15 | + ("FROM " . static::$table . " ent ") . |
|
16 | 16 | |
17 | 17 | (('' !== ($condition = $this->getCondition($config))) ? ("WHERE " . $condition . " ") : "") . |
18 | 18 | |
19 | 19 | ("ORDER BY " . $this->getOrderBy($order_by) . " ") . |
20 | 20 | |
21 | - (($index > 0) ? ("LIMIT " . ((($index - 1) * $display) . ", " . $display)) : ""); |
|
21 | + (($index > 0) ? ("LIMIT " . ((($index - 1) * $display) . ", " . $display)) : ""); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | # Get nesting select query |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | |
28 | 28 | return ("SELECT SQL_CALC_FOUND_ROWS " . $this->getSelection() . ", COUNT(chd.descendant) as children ") . |
29 | 29 | |
30 | - ("FROM " . static::$table . " ent ") . |
|
30 | + ("FROM " . static::$table . " ent ") . |
|
31 | 31 | |
32 | - ("LEFT JOIN " . static::$table_relations . " chd ON chd.ancestor = ent.id AND chd.depth = 1 ") . |
|
32 | + ("LEFT JOIN " . static::$table_relations . " chd ON chd.ancestor = ent.id AND chd.depth = 1 ") . |
|
33 | 33 | |
34 | 34 | ("LEFT JOIN " . static::$table_relations . " rel ON rel.descendant = ent.id AND rel.depth = 1 ") . |
35 | 35 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | ("GROUP BY ent.id ORDER BY " . $this->getOrderBy($order_by) . " ") . |
41 | 41 | |
42 | - (($index > 0) ? ("LIMIT " . ((($index - 1) * $display) . ", " . $display)) : ""); |
|
42 | + (($index > 0) ? ("LIMIT " . ((($index - 1) * $display) . ", " . $display)) : ""); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | # Get default count query |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | return ("SELECT COUNT(ent.id) as count FROM " . static::$table . " ent ") . |
50 | 50 | |
51 | - (('' !== ($condition = $this->getCondition($config))) ? ("WHERE " . $condition) : ""); |
|
51 | + (('' !== ($condition = $this->getCondition($config))) ? ("WHERE " . $condition) : ""); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | # Get nesting count query |
@@ -57,11 +57,11 @@ discard block |
||
57 | 57 | |
58 | 58 | return ("SELECT COUNT(ent.id) as count FROM " . static::$table . " ent ") . |
59 | 59 | |
60 | - ("LEFT JOIN " . static::$table_relations . " rel ON rel.descendant = ent.id AND rel.depth = 1 ") . |
|
60 | + ("LEFT JOIN " . static::$table_relations . " rel ON rel.descendant = ent.id AND rel.depth = 1 ") . |
|
61 | 61 | |
62 | - ("WHERE COALESCE(rel.ancestor, 0) = " . $parent_id . " ") . |
|
62 | + ("WHERE COALESCE(rel.ancestor, 0) = " . $parent_id . " ") . |
|
63 | 63 | |
64 | - (('' !== ($condition = $this->getCondition($config))) ? ("AND " . $condition) : ""); |
|
64 | + (('' !== ($condition = $this->getCondition($config))) ? ("AND " . $condition) : ""); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | # Select entries from DB |
@@ -10,58 +10,58 @@ discard block |
||
10 | 10 | |
11 | 11 | private function getDefaultSelectQuery(array $config, array $order_by, int $index, int $display) { |
12 | 12 | |
13 | - return ("SELECT SQL_CALC_FOUND_ROWS " . $this->getSelection() . " ") . |
|
13 | + return ("SELECT SQL_CALC_FOUND_ROWS ".$this->getSelection()." "). |
|
14 | 14 | |
15 | - ("FROM " . static::$table . " ent ") . |
|
15 | + ("FROM ".static::$table." ent "). |
|
16 | 16 | |
17 | - (('' !== ($condition = $this->getCondition($config))) ? ("WHERE " . $condition . " ") : "") . |
|
17 | + (('' !== ($condition = $this->getCondition($config))) ? ("WHERE ".$condition." ") : ""). |
|
18 | 18 | |
19 | - ("ORDER BY " . $this->getOrderBy($order_by) . " ") . |
|
19 | + ("ORDER BY ".$this->getOrderBy($order_by)." "). |
|
20 | 20 | |
21 | - (($index > 0) ? ("LIMIT " . ((($index - 1) * $display) . ", " . $display)) : ""); |
|
21 | + (($index > 0) ? ("LIMIT ".((($index - 1) * $display).", ".$display)) : ""); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | # Get nesting select query |
25 | 25 | |
26 | 26 | private function getNestingSelectQuery(int $parent_id, array $config, array $order_by, int $index, int $display) { |
27 | 27 | |
28 | - return ("SELECT SQL_CALC_FOUND_ROWS " . $this->getSelection() . ", COUNT(chd.descendant) as children ") . |
|
28 | + return ("SELECT SQL_CALC_FOUND_ROWS ".$this->getSelection().", COUNT(chd.descendant) as children "). |
|
29 | 29 | |
30 | - ("FROM " . static::$table . " ent ") . |
|
30 | + ("FROM ".static::$table." ent "). |
|
31 | 31 | |
32 | - ("LEFT JOIN " . static::$table_relations . " chd ON chd.ancestor = ent.id AND chd.depth = 1 ") . |
|
32 | + ("LEFT JOIN ".static::$table_relations." chd ON chd.ancestor = ent.id AND chd.depth = 1 "). |
|
33 | 33 | |
34 | - ("LEFT JOIN " . static::$table_relations . " rel ON rel.descendant = ent.id AND rel.depth = 1 ") . |
|
34 | + ("LEFT JOIN ".static::$table_relations." rel ON rel.descendant = ent.id AND rel.depth = 1 "). |
|
35 | 35 | |
36 | - ("WHERE COALESCE(rel.ancestor, 0) = " . $parent_id . " ") . |
|
36 | + ("WHERE COALESCE(rel.ancestor, 0) = ".$parent_id." "). |
|
37 | 37 | |
38 | - (('' !== ($condition = $this->getCondition($config))) ? ("AND " . $condition . " ") : "") . |
|
38 | + (('' !== ($condition = $this->getCondition($config))) ? ("AND ".$condition." ") : ""). |
|
39 | 39 | |
40 | - ("GROUP BY ent.id ORDER BY " . $this->getOrderBy($order_by) . " ") . |
|
40 | + ("GROUP BY ent.id ORDER BY ".$this->getOrderBy($order_by)." "). |
|
41 | 41 | |
42 | - (($index > 0) ? ("LIMIT " . ((($index - 1) * $display) . ", " . $display)) : ""); |
|
42 | + (($index > 0) ? ("LIMIT ".((($index - 1) * $display).", ".$display)) : ""); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | # Get default count query |
46 | 46 | |
47 | 47 | private function getDefaultCountQuery(array $config) { |
48 | 48 | |
49 | - return ("SELECT COUNT(ent.id) as count FROM " . static::$table . " ent ") . |
|
49 | + return ("SELECT COUNT(ent.id) as count FROM ".static::$table." ent "). |
|
50 | 50 | |
51 | - (('' !== ($condition = $this->getCondition($config))) ? ("WHERE " . $condition) : ""); |
|
51 | + (('' !== ($condition = $this->getCondition($config))) ? ("WHERE ".$condition) : ""); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | # Get nesting count query |
55 | 55 | |
56 | 56 | private function getNestingCountQuery(int $parent_id, array $config) { |
57 | 57 | |
58 | - return ("SELECT COUNT(ent.id) as count FROM " . static::$table . " ent ") . |
|
58 | + return ("SELECT COUNT(ent.id) as count FROM ".static::$table." ent "). |
|
59 | 59 | |
60 | - ("LEFT JOIN " . static::$table_relations . " rel ON rel.descendant = ent.id AND rel.depth = 1 ") . |
|
60 | + ("LEFT JOIN ".static::$table_relations." rel ON rel.descendant = ent.id AND rel.depth = 1 "). |
|
61 | 61 | |
62 | - ("WHERE COALESCE(rel.ancestor, 0) = " . $parent_id . " ") . |
|
62 | + ("WHERE COALESCE(rel.ancestor, 0) = ".$parent_id." "). |
|
63 | 63 | |
64 | - (('' !== ($condition = $this->getCondition($config))) ? ("AND " . $condition) : ""); |
|
64 | + (('' !== ($condition = $this->getCondition($config))) ? ("AND ".$condition) : ""); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | # Select entries from DB |
@@ -74,9 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | # Select entities |
76 | 76 | |
77 | - $query = ((null === $parent_id) ? $this->getDefaultSelectQuery($config, $order_by, $index, $display) : |
|
78 | - |
|
79 | - $this->getNestingSelectQuery($parent_id, $config, $order_by, $index, $display)); |
|
77 | + $query = ((null === $parent_id) ? $this->getDefaultSelectQuery($config, $order_by, $index, $display) : $this->getNestingSelectQuery($parent_id, $config, $order_by, $index, $display)); |
|
80 | 78 | |
81 | 79 | if (!(DB::send($query) && DB::last()->status)) return false; |
82 | 80 | |
@@ -113,9 +111,7 @@ discard block |
||
113 | 111 | |
114 | 112 | # Count entities |
115 | 113 | |
116 | - $query = ((null === $parent_id) ? $this->getDefaultCountQuery($config) : |
|
117 | - |
|
118 | - $this->getNestingCountQuery($parent_id, $config)); |
|
114 | + $query = ((null === $parent_id) ? $this->getDefaultCountQuery($config) : $this->getNestingCountQuery($parent_id, $config)); |
|
119 | 115 | |
120 | 116 | if (!(DB::send($query) && DB::last()->status)) return false; |
121 | 117 |
@@ -68,9 +68,13 @@ discard block |
||
68 | 68 | |
69 | 69 | private function select(int $parent_id = null, array $config = [], array $order_by = [], int $index = 0, int $display = 0) { |
70 | 70 | |
71 | - if (!((null === $parent_id) || ($parent_id >= 0))) return false; |
|
71 | + if (!((null === $parent_id) || ($parent_id >= 0))) { |
|
72 | + return false; |
|
73 | + } |
|
72 | 74 | |
73 | - if (!(($index >= 0) && ($display >= 0))) return false; |
|
75 | + if (!(($index >= 0) && ($display >= 0))) { |
|
76 | + return false; |
|
77 | + } |
|
74 | 78 | |
75 | 79 | # Select entities |
76 | 80 | |
@@ -78,7 +82,9 @@ discard block |
||
78 | 82 | |
79 | 83 | $this->getNestingSelectQuery($parent_id, $config, $order_by, $index, $display)); |
80 | 84 | |
81 | - if (!(DB::send($query) && DB::last()->status)) return false; |
|
85 | + if (!(DB::send($query) && DB::last()->status)) { |
|
86 | + return false; |
|
87 | + } |
|
82 | 88 | |
83 | 89 | # Process results |
84 | 90 | |
@@ -90,7 +96,9 @@ discard block |
||
90 | 96 | |
91 | 97 | $items['list'][$dataset->id]['dataset'] = $dataset; |
92 | 98 | |
93 | - if (null !== $parent_id) $items['list'][$dataset->id]['children'] = intval($data['children']); |
|
99 | + if (null !== $parent_id) { |
|
100 | + $items['list'][$dataset->id]['children'] = intval($data['children']); |
|
101 | + } |
|
94 | 102 | } |
95 | 103 | |
96 | 104 | # Count total |
@@ -109,7 +117,9 @@ discard block |
||
109 | 117 | |
110 | 118 | private function count(int $parent_id = null, array $config = []) { |
111 | 119 | |
112 | - if (!((null === $parent_id) || ($parent_id >= 0))) return false; |
|
120 | + if (!((null === $parent_id) || ($parent_id >= 0))) { |
|
121 | + return false; |
|
122 | + } |
|
113 | 123 | |
114 | 124 | # Count entities |
115 | 125 | |
@@ -117,7 +127,9 @@ discard block |
||
117 | 127 | |
118 | 128 | $this->getNestingCountQuery($parent_id, $config)); |
119 | 129 | |
120 | - if (!(DB::send($query) && DB::last()->status)) return false; |
|
130 | + if (!(DB::send($query) && DB::last()->status)) { |
|
131 | + return false; |
|
132 | + } |
|
121 | 133 | |
122 | 134 | # ------------------------ |
123 | 135 | |
@@ -142,7 +154,9 @@ discard block |
||
142 | 154 | |
143 | 155 | public function children(int $parent_id = 0, array $config = [], array $order_by = [], int $index = 0, int $display = 0) { |
144 | 156 | |
145 | - if (!static::$nesting) return false; |
|
157 | + if (!static::$nesting) { |
|
158 | + return false; |
|
159 | + } |
|
146 | 160 | |
147 | 161 | return $this->select($parent_id, $config, $order_by, $index, $display); |
148 | 162 | } |
@@ -151,7 +165,9 @@ discard block |
||
151 | 165 | |
152 | 166 | public function childrenCount(int $parent_id = 0, array $config = []) { |
153 | 167 | |
154 | - if (!static::$nesting) return false; |
|
168 | + if (!static::$nesting) { |
|
169 | + return false; |
|
170 | + } |
|
155 | 171 | |
156 | 172 | return $this->count($parent_id, $config); |
157 | 173 | } |
@@ -14,19 +14,19 @@ |
||
14 | 14 | |
15 | 15 | # Add params |
16 | 16 | |
17 | - $this->params->textual ('code', true, 40, true, ''); |
|
18 | - $this->params->textual ('ip', true, 255, false, ''); |
|
19 | - $this->params->integer ('time', false, 10, true, 0); |
|
17 | + $this->params->textual('code', true, 40, true, ''); |
|
18 | + $this->params->textual('ip', true, 255, false, ''); |
|
19 | + $this->params->integer('time', false, 10, true, 0); |
|
20 | 20 | |
21 | 21 | # Add indexes |
22 | 22 | |
23 | - $this->indexes->add ('code', 'UNIQUE'); |
|
24 | - $this->indexes->add ('ip'); |
|
25 | - $this->indexes->add ('time'); |
|
23 | + $this->indexes->add('code', 'UNIQUE'); |
|
24 | + $this->indexes->add('ip'); |
|
25 | + $this->indexes->add('time'); |
|
26 | 26 | |
27 | 27 | # Add foreign keys |
28 | 28 | |
29 | - $this->foreigns->add ('id', TABLE_USERS, 'id', 'CASCADE', 'RESTRICT'); |
|
29 | + $this->foreigns->add('id', TABLE_USERS, 'id', 'CASCADE', 'RESTRICT'); |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | } |
@@ -14,29 +14,29 @@ |
||
14 | 14 | |
15 | 15 | # Add params |
16 | 16 | |
17 | - $this->params->integer ('visibility', true, 1, true, VISIBILITY_DRAFT); |
|
18 | - $this->params->integer ('access', true, 1, true, ACCESS_PUBLIC); |
|
19 | - $this->params->boolean ('locked', true); |
|
20 | - $this->params->textual ('slug', true, 255, false, ''); |
|
21 | - $this->params->textual ('name', true, 255, false, ''); |
|
22 | - $this->params->textual ('title', true, 255, false, ''); |
|
23 | - $this->params->textual ('contents', false, 0, false, ''); |
|
24 | - $this->params->textual ('description', false, 0, false, ''); |
|
25 | - $this->params->textual ('keywords', false, 0, false, ''); |
|
26 | - $this->params->boolean ('robots_index', false); |
|
27 | - $this->params->boolean ('robots_follow', false); |
|
28 | - $this->params->integer ('time_created', false, 10, true, 0); |
|
29 | - $this->params->integer ('time_modified', false, 10, true, 0); |
|
17 | + $this->params->integer('visibility', true, 1, true, VISIBILITY_DRAFT); |
|
18 | + $this->params->integer('access', true, 1, true, ACCESS_PUBLIC); |
|
19 | + $this->params->boolean('locked', true); |
|
20 | + $this->params->textual('slug', true, 255, false, ''); |
|
21 | + $this->params->textual('name', true, 255, false, ''); |
|
22 | + $this->params->textual('title', true, 255, false, ''); |
|
23 | + $this->params->textual('contents', false, 0, false, ''); |
|
24 | + $this->params->textual('description', false, 0, false, ''); |
|
25 | + $this->params->textual('keywords', false, 0, false, ''); |
|
26 | + $this->params->boolean('robots_index', false); |
|
27 | + $this->params->boolean('robots_follow', false); |
|
28 | + $this->params->integer('time_created', false, 10, true, 0); |
|
29 | + $this->params->integer('time_modified', false, 10, true, 0); |
|
30 | 30 | |
31 | 31 | # Add indexes |
32 | 32 | |
33 | - $this->indexes->add ('visibility'); |
|
34 | - $this->indexes->add ('access'); |
|
35 | - $this->indexes->add ('slug'); |
|
36 | - $this->indexes->add ('name'); |
|
37 | - $this->indexes->add ('title'); |
|
38 | - $this->indexes->add ('time_created'); |
|
39 | - $this->indexes->add ('time_modified'); |
|
33 | + $this->indexes->add('visibility'); |
|
34 | + $this->indexes->add('access'); |
|
35 | + $this->indexes->add('slug'); |
|
36 | + $this->indexes->add('name'); |
|
37 | + $this->indexes->add('title'); |
|
38 | + $this->indexes->add('time_created'); |
|
39 | + $this->indexes->add('time_modified'); |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | } |
@@ -14,16 +14,16 @@ |
||
14 | 14 | |
15 | 15 | # Add params |
16 | 16 | |
17 | - $this->params->boolean ('active', false); |
|
18 | - $this->params->textual ('name', true, 255, false, ''); |
|
19 | - $this->params->textual ('title', true, 255, false, ''); |
|
20 | - $this->params->textual ('contents', false, 0, false, ''); |
|
17 | + $this->params->boolean('active', false); |
|
18 | + $this->params->textual('name', true, 255, false, ''); |
|
19 | + $this->params->textual('title', true, 255, false, ''); |
|
20 | + $this->params->textual('contents', false, 0, false, ''); |
|
21 | 21 | |
22 | 22 | # Add indexes |
23 | 23 | |
24 | - $this->indexes->add ('active'); |
|
25 | - $this->indexes->add ('name', 'UNIQUE'); |
|
26 | - $this->indexes->add ('title'); |
|
24 | + $this->indexes->add('active'); |
|
25 | + $this->indexes->add('name', 'UNIQUE'); |
|
26 | + $this->indexes->add('title'); |
|
27 | 27 | } |
28 | 28 | } |
29 | 29 | } |
@@ -14,16 +14,16 @@ |
||
14 | 14 | |
15 | 15 | # Add params |
16 | 16 | |
17 | - $this->params->boolean ('active', false); |
|
18 | - $this->params->integer ('position', true, 2, true, 0); |
|
19 | - $this->params->textual ('slug', true, 255, false, ''); |
|
20 | - $this->params->textual ('text', true, 255, false, ''); |
|
21 | - $this->params->integer ('target', true, 1, true, TARGET_SELF); |
|
17 | + $this->params->boolean('active', false); |
|
18 | + $this->params->integer('position', true, 2, true, 0); |
|
19 | + $this->params->textual('slug', true, 255, false, ''); |
|
20 | + $this->params->textual('text', true, 255, false, ''); |
|
21 | + $this->params->integer('target', true, 1, true, TARGET_SELF); |
|
22 | 22 | |
23 | 23 | # Add indexes |
24 | 24 | |
25 | - $this->indexes->add ('active'); |
|
26 | - $this->indexes->add ('position'); |
|
25 | + $this->indexes->add('active'); |
|
26 | + $this->indexes->add('position'); |
|
27 | 27 | } |
28 | 28 | } |
29 | 29 | } |
@@ -14,14 +14,14 @@ |
||
14 | 14 | |
15 | 15 | # Add params |
16 | 16 | |
17 | - $this->params->textual ('name', true, 255, false, ''); |
|
18 | - $this->params->textual ('title', true, 255, false, ''); |
|
19 | - $this->params->textual ('value', true, 255, false, ''); |
|
17 | + $this->params->textual('name', true, 255, false, ''); |
|
18 | + $this->params->textual('title', true, 255, false, ''); |
|
19 | + $this->params->textual('value', true, 255, false, ''); |
|
20 | 20 | |
21 | 21 | # Add indexes |
22 | 22 | |
23 | - $this->indexes->add ('name', 'UNIQUE'); |
|
24 | - $this->indexes->add ('title'); |
|
23 | + $this->indexes->add('name', 'UNIQUE'); |
|
24 | + $this->indexes->add('title'); |
|
25 | 25 | } |
26 | 26 | } |
27 | 27 | } |