@@ -14,24 +14,24 @@ |
||
| 14 | 14 | |
| 15 | 15 | # Add params |
| 16 | 16 | |
| 17 | - $this->addInteger ('rank', true, 1, RANK_USER, true, false); |
|
| 18 | - $this->addTextual ('name', true, 16, false, true, true); |
|
| 19 | - $this->addTextual ('email', true, 128, false, true, true); |
|
| 20 | - $this->addTextual ('auth_key', true, 40, true, false, false); |
|
| 21 | - $this->addTextual ('password', true, 40, true, false, false); |
|
| 22 | - $this->addTextual ('first_name', true, 255, false, false, false); |
|
| 23 | - $this->addTextual ('last_name', true, 255, false, false, false); |
|
| 24 | - $this->addInteger ('sex', true, 1, SEX_NOT_SELECTED, false, false); |
|
| 25 | - $this->addTextual ('city', true, 255, false, false, false); |
|
| 26 | - $this->addTextual ('country', true, 2, false, false, false); |
|
| 27 | - $this->addTextual ('timezone', true, 40, false, false, false); |
|
| 28 | - $this->addInteger ('time_registered', false, 10, 0, true, false); |
|
| 29 | - $this->addInteger ('time_logged', false, 10, 0, true, false); |
|
| 17 | + $this->addInteger('rank', true, 1, RANK_USER, true, false); |
|
| 18 | + $this->addTextual('name', true, 16, false, true, true); |
|
| 19 | + $this->addTextual('email', true, 128, false, true, true); |
|
| 20 | + $this->addTextual('auth_key', true, 40, true, false, false); |
|
| 21 | + $this->addTextual('password', true, 40, true, false, false); |
|
| 22 | + $this->addTextual('first_name', true, 255, false, false, false); |
|
| 23 | + $this->addTextual('last_name', true, 255, false, false, false); |
|
| 24 | + $this->addInteger('sex', true, 1, SEX_NOT_SELECTED, false, false); |
|
| 25 | + $this->addTextual('city', true, 255, false, false, false); |
|
| 26 | + $this->addTextual('country', true, 2, false, false, false); |
|
| 27 | + $this->addTextual('timezone', true, 40, false, false, false); |
|
| 28 | + $this->addInteger('time_registered', false, 10, 0, true, false); |
|
| 29 | + $this->addInteger('time_logged', false, 10, 0, true, false); |
|
| 30 | 30 | |
| 31 | 31 | # Add orderers |
| 32 | 32 | |
| 33 | - $this->addOrderer ('rank', true); |
|
| 34 | - $this->addOrderer ('name'); |
|
| 33 | + $this->addOrderer('rank', true); |
|
| 34 | + $this->addOrderer('name'); |
|
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -14,14 +14,14 @@ |
||
| 14 | 14 | |
| 15 | 15 | # Add params |
| 16 | 16 | |
| 17 | - $this->addTextual ('name', true, 255, false, true, true); |
|
| 18 | - $this->addTextual ('title', true, 255, false, true, false); |
|
| 19 | - $this->addBoolean ('display', true, true); |
|
| 20 | - $this->addTextual ('contents', false, 0, false, false, false); |
|
| 17 | + $this->addTextual('name', true, 255, false, true, true); |
|
| 18 | + $this->addTextual('title', true, 255, false, true, false); |
|
| 19 | + $this->addBoolean('display', true, true); |
|
| 20 | + $this->addTextual('contents', false, 0, false, false, false); |
|
| 21 | 21 | |
| 22 | 22 | # Add orderers |
| 23 | 23 | |
| 24 | - $this->addOrderer ('title'); |
|
| 24 | + $this->addOrderer('title'); |
|
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | } |
@@ -36,7 +36,9 @@ |
||
| 36 | 36 | |
| 37 | 37 | $view->rank = Lister\Rank::get($user->rank); |
| 38 | 38 | |
| 39 | - if ($user->id === Auth::user()->id) $view->block('remove')->class = 'disabled'; |
|
| 39 | + if ($user->id === Auth::user()->id) { |
|
| 40 | + $view->block('remove')->class = 'disabled'; |
|
| 41 | + } |
|
| 40 | 42 | } |
| 41 | 43 | } |
| 42 | 44 | } |
@@ -2,7 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Modules\Entitizer\Listview { |
| 4 | 4 | |
| 5 | - use Modules\Auth, Modules\Entitizer, Utils\Lister, Template; |
|
| 5 | + use Modules\Auth; |
|
| 6 | + use Modules\Entitizer; |
|
| 7 | + use Utils\Lister; |
|
| 8 | + use Template; |
|
| 6 | 9 | |
| 7 | 10 | class Users extends Entitizer\Utils\Listview { |
| 8 | 11 | |
@@ -34,7 +34,9 @@ |
||
| 34 | 34 | |
| 35 | 35 | $contents->block('parent')->block('browse')->disable(); |
| 36 | 36 | |
| 37 | - } else $contents->block('parent')->block('browse')->link = $this->parent->link; |
|
| 37 | + } else { |
|
| 38 | + $contents->block('parent')->block('browse')->link = $this->parent->link; |
|
| 39 | + } |
|
| 38 | 40 | } |
| 39 | 41 | |
| 40 | 42 | # Add item additional data |
@@ -2,7 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Modules\Entitizer\Listview { |
| 4 | 4 | |
| 5 | - use Modules\Entitizer, Utils\Lister, Template; |
|
| 5 | + use Modules\Entitizer; |
|
| 6 | + use Utils\Lister; |
|
| 7 | + use Template; |
|
| 6 | 8 | |
| 7 | 9 | class Pages extends Entitizer\Utils\Listview { |
| 8 | 10 | |
@@ -19,7 +19,9 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | private function getLink() { |
| 21 | 21 | |
| 22 | - if (0 === $this->id) return ''; |
|
| 22 | + if (0 === $this->id) { |
|
| 23 | + return ''; |
|
| 24 | + } |
|
| 23 | 25 | |
| 24 | 26 | return (INSTALL_PATH . '/' . $this->data['slug']); |
| 25 | 27 | } |
@@ -28,7 +30,9 @@ discard block |
||
| 28 | 30 | |
| 29 | 31 | private function getCanonical() { |
| 30 | 32 | |
| 31 | - if (0 === $this->id) return ''; |
|
| 33 | + if (0 === $this->id) { |
|
| 34 | + return ''; |
|
| 35 | + } |
|
| 32 | 36 | |
| 33 | 37 | return (Settings::get('system_url') . (($this->id !== 1) ? ('/' . $this->data['slug']) : '')); |
| 34 | 38 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | if (0 === $this->id) return ''; |
| 23 | 23 | |
| 24 | - return (INSTALL_PATH . '/' . $this->data['slug']); |
|
| 24 | + return (INSTALL_PATH.'/'.$this->data['slug']); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | # Get canonical |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | if (0 === $this->id) return ''; |
| 32 | 32 | |
| 33 | - return (Settings::get('system_url') . (($this->id !== 1) ? ('/' . $this->data['slug']) : '')); |
|
| 33 | + return (Settings::get('system_url').(($this->id !== 1) ? ('/'.$this->data['slug']) : '')); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | # Implement entity |
@@ -12,9 +12,13 @@ |
||
| 12 | 12 | |
| 13 | 13 | private function getLink() { |
| 14 | 14 | |
| 15 | - if ('' === $this->data['slug']) return ''; |
|
| 15 | + if ('' === $this->data['slug']) { |
|
| 16 | + return ''; |
|
| 17 | + } |
|
| 16 | 18 | |
| 17 | - if (false !== Validate::url($this->data['slug'])) return $this->data['slug']; |
|
| 19 | + if (false !== Validate::url($this->data['slug'])) { |
|
| 20 | + return $this->data['slug']; |
|
| 21 | + } |
|
| 18 | 22 | |
| 19 | 23 | # ------------------------ |
| 20 | 24 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | |
| 19 | 19 | # ------------------------ |
| 20 | 20 | |
| 21 | - return (INSTALL_PATH . '/' . $this->data['slug']); |
|
| 21 | + return (INSTALL_PATH.'/'.$this->data['slug']); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | # Implement entity |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | return ("`" . $this->name . "` int(10) unsigned NOT NULL") . |
| 25 | 25 | |
| 26 | - ($this->auto_increment ? " AUTO_INCREMENT" : ""); |
|
| 26 | + ($this->auto_increment ? " AUTO_INCREMENT" : ""); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | # Cast value |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | |
| 22 | 22 | public function fieldStatement() { |
| 23 | 23 | |
| 24 | - return ("`" . $this->name . "` int(10) unsigned NOT NULL") . |
|
| 24 | + return ("`".$this->name."` int(10) unsigned NOT NULL"). |
|
| 25 | 25 | |
| 26 | 26 | ($this->auto_increment ? " AUTO_INCREMENT" : ""); |
| 27 | 27 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | |
| 26 | 26 | return ("`" . $this->name . "` " . ($this->short ? ("varchar(" . $this->maxlength . ")") : "text")) . |
| 27 | 27 | |
| 28 | - (($this->binary ? " CHARACTER SET utf8 COLLATE utf8_bin" : "") . " NOT NULL"); |
|
| 28 | + (($this->binary ? " CHARACTER SET utf8 COLLATE utf8_bin" : "") . " NOT NULL"); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | # 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 |
@@ -23,9 +23,9 @@ |
||
| 23 | 23 | |
| 24 | 24 | public function fieldStatement() { |
| 25 | 25 | |
| 26 | - return ("`" . $this->name . "` " . ($this->short ? ("varchar(" . $this->maxlength . ")") : "text")) . |
|
| 26 | + return ("`".$this->name."` ".($this->short ? ("varchar(".$this->maxlength.")") : "text")). |
|
| 27 | 27 | |
| 28 | - (($this->binary ? " CHARACTER SET utf8 COLLATE utf8_bin" : "") . " NOT NULL"); |
|
| 28 | + (($this->binary ? " CHARACTER SET utf8 COLLATE utf8_bin" : "")." NOT NULL"); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | # Cast value |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | |
| 26 | 26 | return ("`" . $this->name . "` " . ($this->short ? "tiny" : "") . "int(" . $this->maxlength . ") ") . |
| 27 | 27 | |
| 28 | - ("unsigned NOT NULL DEFAULT '" . $this->default . "'"); |
|
| 28 | + ("unsigned NOT NULL DEFAULT '" . $this->default . "'"); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | # 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 |
@@ -23,9 +23,9 @@ |
||
| 23 | 23 | |
| 24 | 24 | public function fieldStatement() { |
| 25 | 25 | |
| 26 | - return ("`" . $this->name . "` " . ($this->short ? "tiny" : "") . "int(" . $this->maxlength . ") ") . |
|
| 26 | + return ("`".$this->name."` ".($this->short ? "tiny" : "")."int(".$this->maxlength.") "). |
|
| 27 | 27 | |
| 28 | - ("unsigned NOT NULL DEFAULT '" . $this->default . "'"); |
|
| 28 | + ("unsigned NOT NULL DEFAULT '".$this->default."'"); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | # Cast value |