@@ -62,7 +62,7 @@ |
||
| 62 | 62 | $sql_data = array( |
| 63 | 63 | 'settings' => serialize($settings) |
| 64 | 64 | ); |
| 65 | - $this->db->sql_query('UPDATE ' . $this->table_prefix . 'sm_blocks SET ' . $this->db->sql_build_array('UPDATE', $sql_data) .' WHERE bid = ' . (int) $bid); |
|
| 65 | + $this->db->sql_query('UPDATE ' . $this->table_prefix . 'sm_blocks SET ' . $this->db->sql_build_array('UPDATE', $sql_data) . ' WHERE bid = ' . (int) $bid); |
|
| 66 | 66 | } |
| 67 | 67 | } |
| 68 | 68 | } |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\event; |
| 11 | 11 | |
@@ -16,23 +16,23 @@ discard block |
||
| 16 | 16 | class base extends \Exception |
| 17 | 17 | { |
| 18 | 18 | /** |
| 19 | - * Null if the message is a string, array if the message was submitted as an array |
|
| 20 | - * @var string|array |
|
| 21 | - */ |
|
| 19 | + * Null if the message is a string, array if the message was submitted as an array |
|
| 20 | + * @var string|array |
|
| 21 | + */ |
|
| 22 | 22 | protected $message_full; |
| 23 | 23 | |
| 24 | 24 | protected $previous; |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | - * Constructor |
|
| 28 | - * |
|
| 29 | - * Different from normal exceptions in that we do not enforce $message to be a string. |
|
| 30 | - * |
|
| 31 | - * @param string|array $message |
|
| 32 | - * @param int $code |
|
| 33 | - * @param \Exception $previous |
|
| 34 | - * @access public |
|
| 35 | - */ |
|
| 27 | + * Constructor |
|
| 28 | + * |
|
| 29 | + * Different from normal exceptions in that we do not enforce $message to be a string. |
|
| 30 | + * |
|
| 31 | + * @param string|array $message |
|
| 32 | + * @param int $code |
|
| 33 | + * @param \Exception $previous |
|
| 34 | + * @access public |
|
| 35 | + */ |
|
| 36 | 36 | public function __construct($message = null, $code = 0, \Exception $previous = null) |
| 37 | 37 | { |
| 38 | 38 | // We're slightly changing the way exceptions work |
@@ -53,12 +53,12 @@ discard block |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | - * Basic message translation for our exceptions |
|
| 57 | - * |
|
| 58 | - * @param \phpbb\user $user |
|
| 59 | - * @return string |
|
| 60 | - * @access public |
|
| 61 | - */ |
|
| 56 | + * Basic message translation for our exceptions |
|
| 57 | + * |
|
| 58 | + * @param \phpbb\user $user |
|
| 59 | + * @return string |
|
| 60 | + * @access public |
|
| 61 | + */ |
|
| 62 | 62 | public function get_message(\phpbb\user $user) |
| 63 | 63 | { |
| 64 | 64 | // Make sure our language file has been loaded |
@@ -73,18 +73,18 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
| 76 | - * Translate all portions of the message sent to the exception |
|
| 77 | - * |
|
| 78 | - * Goes through each element of the array and tries to translate them |
|
| 79 | - * |
|
| 80 | - * @param \phpbb\user $user |
|
| 81 | - * @param string|array $message_portions The message portions to translate |
|
| 82 | - * @param string|null $parent_message Send a string to translate all of the |
|
| 83 | - * portions with the parent message (typically used to format a string |
|
| 84 | - * with the given message portions). Null to ignore. Default: Null |
|
| 85 | - * @return array|string Array if $parent_message === null else a string |
|
| 86 | - * @access protected |
|
| 87 | - */ |
|
| 76 | + * Translate all portions of the message sent to the exception |
|
| 77 | + * |
|
| 78 | + * Goes through each element of the array and tries to translate them |
|
| 79 | + * |
|
| 80 | + * @param \phpbb\user $user |
|
| 81 | + * @param string|array $message_portions The message portions to translate |
|
| 82 | + * @param string|null $parent_message Send a string to translate all of the |
|
| 83 | + * portions with the parent message (typically used to format a string |
|
| 84 | + * with the given message portions). Null to ignore. Default: Null |
|
| 85 | + * @return array|string Array if $parent_message === null else a string |
|
| 86 | + * @access protected |
|
| 87 | + */ |
|
| 88 | 88 | protected function translate_portions(\phpbb\user $user, $message_portions, $parent_message = null) |
| 89 | 89 | { |
| 90 | 90 | // Make sure our language file has been loaded |
@@ -126,12 +126,12 @@ discard block |
||
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | /** |
| 129 | - * Add our language file |
|
| 130 | - * |
|
| 131 | - * @param \phpbb\user $user |
|
| 132 | - * @return null |
|
| 133 | - * @access public |
|
| 134 | - */ |
|
| 129 | + * Add our language file |
|
| 130 | + * |
|
| 131 | + * @param \phpbb\user $user |
|
| 132 | + * @return null |
|
| 133 | + * @access public |
|
| 134 | + */ |
|
| 135 | 135 | public function add_lang(\phpbb\user $user) |
| 136 | 136 | { |
| 137 | 137 | static $is_loaded = false; |
@@ -150,15 +150,15 @@ discard block |
||
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | /** |
| 153 | - * Output a string of this error message |
|
| 154 | - * |
|
| 155 | - * This will hopefully be never called, always catch the expected exceptions |
|
| 156 | - * and call get_message to translate them into an error that a user can |
|
| 157 | - * understand |
|
| 158 | - * |
|
| 159 | - * @return string |
|
| 160 | - * @access public |
|
| 161 | - */ |
|
| 153 | + * Output a string of this error message |
|
| 154 | + * |
|
| 155 | + * This will hopefully be never called, always catch the expected exceptions |
|
| 156 | + * and call get_message to translate them into an error that a user can |
|
| 157 | + * understand |
|
| 158 | + * |
|
| 159 | + * @return string |
|
| 160 | + * @access public |
|
| 161 | + */ |
|
| 162 | 162 | public function __toString() |
| 163 | 163 | { |
| 164 | 164 | return (is_array($this->message_full)) ? var_export($this->message_full, true) : (string) $this->message_full; |
@@ -41,8 +41,7 @@ |
||
| 41 | 41 | if (is_array($message)) |
| 42 | 42 | { |
| 43 | 43 | $this->message = (string) $message[0]; |
| 44 | - } |
|
| 45 | - else |
|
| 44 | + } else |
|
| 46 | 45 | { |
| 47 | 46 | $this->message = $message; |
| 48 | 47 | } |
@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2015 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2015 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\exception; |
| 11 | 11 | |
@@ -15,12 +15,12 @@ discard block |
||
| 15 | 15 | class unexpected_value extends base |
| 16 | 16 | { |
| 17 | 17 | /** |
| 18 | - * Translate this exception |
|
| 19 | - * |
|
| 20 | - * @param \phpbb\user $user |
|
| 21 | - * @return array|string |
|
| 22 | - * @access public |
|
| 23 | - */ |
|
| 18 | + * Translate this exception |
|
| 19 | + * |
|
| 20 | + * @param \phpbb\user $user |
|
| 21 | + * @return array|string |
|
| 22 | + * @access public |
|
| 23 | + */ |
|
| 24 | 24 | public function get_message(\phpbb\user $user) |
| 25 | 25 | { |
| 26 | 26 | return $this->translate_portions($user, $this->message_full, 'EXCEPTION_UNEXPECTED_VALUE'); |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\event; |
| 11 | 11 | |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | |
| 222 | 222 | /** |
| 223 | 223 | * @param array $userlist |
| 224 | - * @param $change_user |
|
| 224 | + * @param boolean $change_user |
|
| 225 | 225 | * @return int |
| 226 | 226 | */ |
| 227 | 227 | private function _get_featured_user(array $userlist, $change_user) |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | /** |
| 363 | - * @param $user_id |
|
| 363 | + * @param integer $user_id |
|
| 364 | 364 | * @return array|string |
| 365 | 365 | */ |
| 366 | 366 | private function _get_profile_fields($user_id) |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | } |
| 477 | 477 | |
| 478 | 478 | /** |
| 479 | - * @return array |
|
| 479 | + * @return boolean |
|
| 480 | 480 | */ |
| 481 | 481 | private function _get_cpf_fields() |
| 482 | 482 | { |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\event; |
| 11 | 11 | |
@@ -342,7 +342,7 @@ |
||
| 342 | 342 | $new_list = trim($new_list, ','); |
| 343 | 343 | |
| 344 | 344 | $new_userlist = $this->_get_userlist($new_list); |
| 345 | - $current_user =& $new_userlist[$curr_key - 1]; |
|
| 345 | + $current_user = & $new_userlist[$curr_key - 1]; |
|
| 346 | 346 | |
| 347 | 347 | $this->settings['current_user'] = (int) $current_user; |
| 348 | 348 | $this->settings['userlist'] = $new_list; |
@@ -50,8 +50,7 @@ discard block |
||
| 50 | 50 | if (!empty($collection)) |
| 51 | 51 | { |
| 52 | 52 | return $collection->get_entities(); |
| 53 | - } |
|
| 54 | - else |
|
| 53 | + } else |
|
| 55 | 54 | { |
| 56 | 55 | return array(); |
| 57 | 56 | } |
@@ -88,8 +87,7 @@ discard block |
||
| 88 | 87 | if (!$has_blocks && !$hiding_blocks && !sizeof($ex_positions)) |
| 89 | 88 | { |
| 90 | 89 | $this->route_mapper->delete($route); |
| 91 | - } |
|
| 92 | - else |
|
| 90 | + } else |
|
| 93 | 91 | { |
| 94 | 92 | $route->set_has_blocks($has_blocks); |
| 95 | 93 | $this->route_mapper->save($route); |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\event; |
| 11 | 11 | |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\event; |
| 11 | 11 | |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\event; |
| 11 | 11 | |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * |
|
| 4 | - * @package sitemaker |
|
| 5 | - * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | - * |
|
| 8 | - */ |
|
| 3 | + * |
|
| 4 | + * @package sitemaker |
|
| 5 | + * @copyright (c) 2013 Daniel A. (blitze) |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
|
| 7 | + * |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace blitze\sitemaker\event; |
| 11 | 11 | |
@@ -41,8 +41,7 @@ |
||
| 41 | 41 | if (is_array($message)) |
| 42 | 42 | { |
| 43 | 43 | $this->message = (string) $message[0]; |
| 44 | - } |
|
| 45 | - else |
|
| 44 | + } else |
|
| 46 | 45 | { |
| 47 | 46 | $this->message = $message; |
| 48 | 47 | } |