diff options
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/config/db_text.php | 4 | ||||
-rw-r--r-- | phpBB/phpbb/db/driver/driver.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/db/migration/data/v310/style_update_p1.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/profilefields/manager.php | 20 | ||||
-rw-r--r-- | phpBB/phpbb/search/fulltext_native.php | 4 | ||||
-rw-r--r-- | phpBB/phpbb/user.php | 8 |
6 files changed, 36 insertions, 4 deletions
diff --git a/phpBB/phpbb/config/db_text.php b/phpBB/phpbb/config/db_text.php index ddc7c9aef0..818f6bdcc9 100644 --- a/phpBB/phpbb/config/db_text.php +++ b/phpBB/phpbb/config/db_text.php @@ -100,9 +100,9 @@ class db_text $sql = 'UPDATE ' . $this->table . " SET config_value = '" . $this->db->sql_escape($value) . "' WHERE config_name = '" . $this->db->sql_escape($key) . "'"; - $result = $this->db->sql_query($sql); + $this->db->sql_query($sql); - if (!$this->db->sql_affectedrows($result)) + if (!$this->db->sql_affectedrows()) { $sql = 'INSERT INTO ' . $this->table . ' ' . $this->db->sql_build_array('INSERT', array( 'config_name' => (string) $key, diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php index 9fc04d47a1..1b49775b32 100644 --- a/phpBB/phpbb/db/driver/driver.php +++ b/phpBB/phpbb/db/driver/driver.php @@ -962,7 +962,7 @@ abstract class driver implements driver_interface { if (preg_match('/^(UPDATE|DELETE|REPLACE)/', $query)) { - $this->sql_report .= 'Affected rows: <b>' . $this->sql_affectedrows($this->query_result) . '</b> | '; + $this->sql_report .= 'Affected rows: <b>' . $this->sql_affectedrows() . '</b> | '; } $this->sql_report .= 'Before: ' . sprintf('%.5f', $this->curtime - $starttime) . 's | After: ' . sprintf('%.5f', $endtime - $starttime) . 's | Elapsed: <b>' . sprintf('%.5f', $endtime - $this->curtime) . 's</b>'; } diff --git a/phpBB/phpbb/db/migration/data/v310/style_update_p1.php b/phpBB/phpbb/db/migration/data/v310/style_update_p1.php index 3b0d53d803..2c7b7edf2e 100644 --- a/phpBB/phpbb/db/migration/data/v310/style_update_p1.php +++ b/phpBB/phpbb/db/migration/data/v310/style_update_p1.php @@ -160,7 +160,7 @@ class style_update_p1 extends \phpbb\db\migration\migration FROM ' . STYLES_TABLE . " WHERE style_name = 'prosilver'"; $result = $this->sql_query($sql); - $default_style = $this->db->sql_fetchfield($result); + $default_style = $this->db->sql_fetchfield('style_id'); $this->db->sql_freeresult($result); $this->config->set('default_style', $default_style); diff --git a/phpBB/phpbb/profilefields/manager.php b/phpBB/phpbb/profilefields/manager.php index 4ad3214ae4..ea4b24af56 100644 --- a/phpBB/phpbb/profilefields/manager.php +++ b/phpBB/phpbb/profilefields/manager.php @@ -276,12 +276,32 @@ class manager $profile_field = $this->type_collection[$field_data['field_type']]; $tpl_fields[] = array( + 'PROFILE_FIELD_IDENT' => $field_ident, 'PROFILE_FIELD_TYPE' => $field_data['field_type'], 'PROFILE_FIELD_NAME' => $profile_field->get_field_name($field_data['lang_name']), 'PROFILE_FIELD_EXPLAIN' => $this->user->lang($field_data['lang_explain']), ); } + $profile_cache = $this->profile_cache; + + /** + * Event to modify template headlines of the generated profile fields + * + * @event core.generate_profile_fields_template_headlines + * @var string restrict_option Restrict the published fields to a certain profile field option + * @var array tpl_fields Array with template data fields + * @var array profile_cache A copy of the profile cache to make additional checks + * @since 3.1.6-RC1 + */ + $vars = array( + 'restrict_option', + 'tpl_fields', + 'profile_cache', + ); + extract($this->dispatcher->trigger_event('core.generate_profile_fields_template_headlines', compact($vars))); + unset($profile_cache); + return $tpl_fields; } diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php index 7c825029fb..02337cbf98 100644 --- a/phpBB/phpbb/search/fulltext_native.php +++ b/phpBB/phpbb/search/fulltext_native.php @@ -1050,6 +1050,7 @@ class fulltext_native extends \phpbb\search\base * @event core.search_native_author_count_query_before * @var int total_results The previous result count for the format of the query. * Set to 0 to force a re-count + * @var string type The type of search being made * @var string select SQL SELECT clause for what to get * @var string sql_sort_table CROSS JOIN'ed table to allow doing the sort chosen * @var string sql_sort_join Condition to define how to join the CROSS JOIN'ed table specifyed in sql_sort_table @@ -1062,6 +1063,7 @@ class fulltext_native extends \phpbb\search\base * @var string sort_days Time, in days, that the oldest post showing can have * @var string sql_time The SQL to search on the time specifyed by sort_days * @var bool firstpost_only Wether or not to search only on the first post of the topics + * @var string sql_firstpost The SQL used in the WHERE claused to filter by firstpost. * @var array ex_fid_ary Forum ids that must not be searched on * @var array sql_fora SQL query for ex_fid_ary * @var int start How many posts to skip in the search results (used for pagination) @@ -1069,6 +1071,7 @@ class fulltext_native extends \phpbb\search\base */ $vars = array( 'total_results', + 'type', 'select', 'sql_sort_table', 'sql_sort_join', @@ -1081,6 +1084,7 @@ class fulltext_native extends \phpbb\search\base 'sort_days', 'sql_time', 'firstpost_only', + 'sql_firstpost', 'ex_fid_ary', 'sql_fora', 'start', diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php index 3bc1af2899..f5ad5096bb 100644 --- a/phpBB/phpbb/user.php +++ b/phpBB/phpbb/user.php @@ -301,6 +301,14 @@ class user extends \phpbb\session // After calling it we continue script execution... phpbb_user_session_handler(); + /** + * Execute code at the end of user setup + * + * @event core.user_setup_after + * @since 3.1.6-RC1 + */ + $phpbb_dispatcher->dispatch('core.user_setup_after'); + // If this function got called from the error handler we are finished here. if (defined('IN_ERROR_HANDLER')) { |