From 2e17e448deed073f8614bb555a8ef20c57291c2a Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 4 Oct 2009 18:14:59 +0000 Subject: Copy 3.0.x branch to trunk git-svn-id: file:///svn/phpbb/trunk@10211 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/questionnaire/questionnaire.php | 471 +++++++++++++++++++++++++ 1 file changed, 471 insertions(+) create mode 100644 phpBB/includes/questionnaire/questionnaire.php (limited to 'phpBB/includes/questionnaire') diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php new file mode 100644 index 0000000000..1d015576a7 --- /dev/null +++ b/phpBB/includes/questionnaire/questionnaire.php @@ -0,0 +1,471 @@ + +* @copyright (c) 2007-2008 Johannes Schlueter +*/ +class phpbb_questionnaire_data_collector +{ + var $providers; + var $data = null; + var $install_id = ''; + + /** + * Constructor. + * + * @param string + */ + function phpbb_questionnaire_data_collector($install_id) + { + $this->install_id = $install_id; + $this->providers = array(); + } + + function add_data_provider(&$provider) + { + $this->providers[] = &$provider; + } + + /** + * Get data as an array. + * + * @return array All Data + */ + function get_data_raw() + { + if (!$this->data) + { + $this->collect(); + } + + return $this->data; + } + + function get_data_for_form() + { + return base64_encode(serialize($this->get_data_raw())); + } + + /** + * Collect info into the data property. + * + * @return void + */ + function collect() + { + foreach (array_keys($this->providers) as $key) + { + $provider = &$this->providers[$key]; + $this->data[$provider->get_identifier()] = $provider->get_data(); + } + $this->data['install_id'] = $this->install_id; + } +} + +/** interface: get_indentifier(), get_data() */ + +/** +* Questionnaire PHP data provider +* @package phpBB3 +*/ +class phpbb_questionnaire_php_data_provider +{ + function get_identifier() + { + return 'PHP'; + } + + /** + * Get data about the PHP runtime setup. + * + * @return array + */ + function get_data() + { + return array( + 'version' => PHP_VERSION, + 'sapi' => PHP_SAPI, + 'int_size' => defined('PHP_INT_SIZE') ? PHP_INT_SIZE : '', + 'safe_mode' => (int) @ini_get('safe_mode'), + 'open_basedir' => (int) @ini_get('open_basedir'), + 'memory_limit' => @ini_get('memory_limit'), + 'allow_url_fopen' => (int) @ini_get('allow_url_fopen'), + 'allow_url_include' => (int) @ini_get('allow_url_include'), + 'file_uploads' => (int) @ini_get('file_uploads'), + 'upload_max_filesize' => @ini_get('upload_max_filesize'), + 'post_max_size' => @ini_get('post_max_size'), + 'disable_functions' => @ini_get('disable_functions'), + 'disable_classes' => @ini_get('disable_classes'), + 'enable_dl' => (int) @ini_get('enable_dl'), + 'magic_quotes_gpc' => (int) @ini_get('magic_quotes_gpc'), + 'register_globals' => (int) @ini_get('register_globals'), + 'filter.default' => @ini_get('filter.default'), + 'zend.ze1_compatibility_mode' => (int) @ini_get('zend.ze1_compatibility_mode'), + 'unicode.semantics' => (int) @ini_get('unicode.semantics'), + 'zend_thread_safty' => (int) function_exists('zend_thread_id'), + 'extensions' => get_loaded_extensions(), + ); + } +} + +/** +* Questionnaire System data provider +* @package phpBB3 +*/ +class phpbb_questionnaire_system_data_provider +{ + function get_identifier() + { + return 'System'; + } + + /** + * Get data about the general system information, like OS or IP (shortened). + * + * @return array + */ + function get_data() + { + // Start discovering the IPV4 server address, if available + $server_address = '0.0.0.0'; + + if (!empty($_SERVER['SERVER_ADDR'])) + { + $server_address = $_SERVER['SERVER_ADDR']; + } + + // Running on IIS? + if (!empty($_SERVER['LOCAL_ADDR'])) + { + $server_address = $_SERVER['LOCAL_ADDR']; + } + + $ip_address_ary = explode('.', $server_address); + + // build ip + if (!isset($ip_address_ary[0]) || !isset($ip_address_ary[1])) + { + $ip_address_ary = explode('.', '0.0.0.0'); + } + + return array( + 'os' => PHP_OS, + 'httpd' => $_SERVER['SERVER_SOFTWARE'], + // we don't want the real IP address (for privacy policy reasons) but only + // a network address to see whether your installation is running on a private or public network. + // IANA reserved addresses for private networks (RFC 1918) are: + // - 10.0.0.0/8 + // - 172.16.0.0/12 + // - 192.168.0.0/16 + 'ip' => $ip_address_ary[0] . '.' . $ip_address_ary[1] . '.XXX.YYY', + ); + } +} + +/** +* Questionnaire phpBB data provider +* @package phpBB3 +*/ +class phpbb_questionnaire_phpbb_data_provider +{ + var $config; + var $unique_id; + + /** + * Constructor. + * + * @param array $config + */ + function phpbb_questionnaire_phpbb_data_provider($config) + { + // generate a unique id if necessary + if (empty($config['questionnaire_unique_id'])) + { + $this->unique_id = unique_id(); + set_config('questionnaire_unique_id', $this->unique_id); + } + else + { + $this->unique_id = $config['questionnaire_unique_id']; + } + + $this->config = $config; + } + + /** + * Returns a string identifier for this data provider + * + * @return string "phpBB" + */ + function get_identifier() + { + return 'phpBB'; + } + + /** + * Get data about this phpBB installation. + * + * @return array Relevant anonymous config options + */ + function get_data() + { + global $phpbb_root_path, $phpEx; + include("{$phpbb_root_path}config.$phpEx"); + + // Only send certain config vars + $config_vars = array( + 'active_sessions' => true, + 'allow_attachments' => true, + 'allow_autologin' => true, + 'allow_avatar' => true, + 'allow_avatar_local' => true, + 'allow_avatar_remote' => true, + 'allow_avatar_upload' => true, + 'allow_bbcode' => true, + 'allow_birthdays' => true, + 'allow_bookmarks' => true, + 'allow_emailreuse' => true, + 'allow_forum_notify' => true, + 'allow_mass_pm' => true, + 'allow_name_chars' => true, + 'allow_namechange' => true, + 'allow_nocensors' => true, + 'allow_pm_attach' => true, + 'allow_pm_report' => true, + 'allow_post_flash' => true, + 'allow_post_links' => true, + 'allow_privmsg' => true, + 'allow_quick_reply' => true, + 'allow_sig' => true, + 'allow_sig_bbcode' => true, + 'allow_sig_flash' => true, + 'allow_sig_img' => true, + 'allow_sig_links' => true, + 'allow_sig_pm' => true, + 'allow_sig_smilies' => true, + 'allow_smilies' => true, + 'allow_topic_notify' => true, + 'attachment_quota' => true, + 'auth_bbcode_pm' => true, + 'auth_flash_pm' => true, + 'auth_img_pm' => true, + 'auth_method' => true, + 'auth_smilies_pm' => true, + 'avatar_filesize' => true, + 'avatar_max_height' => true, + 'avatar_max_width' => true, + 'avatar_min_height' => true, + 'avatar_min_width' => true, + 'board_dst' => true, + 'board_email_form' => true, + 'board_hide_emails' => true, + 'board_timezone' => true, + 'browser_check' => true, + 'bump_interval' => true, + 'bump_type' => true, + 'cache_gc' => true, + 'captcha_plugin' => true, + 'captcha_gd' => true, + 'captcha_gd_foreground_noise' => true, + 'captcha_gd_x_grid' => true, + 'captcha_gd_y_grid' => true, + 'captcha_gd_wave' => true, + 'captcha_gd_3d_noise' => true, + 'captcha_gd_fonts' => true, + 'confirm_refresh' => true, + 'check_attachment_content' => true, + 'check_dnsbl' => true, + 'chg_passforce' => true, + 'cookie_secure' => true, + 'coppa_enable' => true, + 'database_gc' => true, + 'dbms_version' => true, + 'default_dateformat' => true, + 'display_last_edited' => true, + 'display_order' => true, + 'edit_time' => true, + 'email_check_mx' => true, + 'email_enable' => true, + 'email_function_name' => true, + 'email_package_size' => true, + 'enable_confirm' => true, + 'enable_pm_icons' => true, + 'enable_post_confirm' => true, + 'feed_enable' => true, + 'feed_limit' => true, + 'feed_overall_forums' => true, + 'feed_overall_forums_limit' => true, + 'feed_overall_topics' => true, + 'feed_overall_topics_limit' => true, + 'feed_forum' => true, + 'feed_topic' => true, + 'feed_item_statistics' => true, + 'flood_interval' => true, + 'force_server_vars' => true, + 'form_token_lifetime' => true, + 'form_token_mintime' => true, + 'form_token_sid_guests' => true, + 'forward_pm' => true, + 'forwarded_for_check' => true, + 'full_folder_action' => true, + 'fulltext_native_common_thres' => true, + 'fulltext_native_load_upd' => true, + 'fulltext_native_max_chars' => true, + 'fulltext_native_min_chars' => true, + 'gzip_compress' => true, + 'hot_threshold' => true, + 'img_create_thumbnail' => true, + 'img_display_inlined' => true, + 'img_imagick' => true, + 'img_link_height' => true, + 'img_link_width' => true, + 'img_max_height' => true, + 'img_max_thumb_width' => true, + 'img_max_width' => true, + 'img_min_thumb_filesize' => true, + 'ip_check' => true, + 'jab_enable' => true, + 'jab_package_size' => true, + 'jab_use_ssl' => true, + 'limit_load' => true, + 'limit_search_load' => true, + 'load_anon_lastread' => true, + 'load_birthdays' => true, + 'load_cpf_memberlist' => true, + 'load_cpf_viewprofile' => true, + 'load_cpf_viewtopic' => true, + 'load_db_lastread' => true, + 'load_db_track' => true, + 'load_jumpbox' => true, + 'load_moderators' => true, + 'load_online' => true, + 'load_online_guests' => true, + 'load_online_time' => true, + 'load_onlinetrack' => true, + 'load_search' => true, + 'load_tplcompile' => true, + 'load_user_activity' => true, + 'max_attachments' => true, + 'max_attachments_pm' => true, + 'max_autologin_time' => true, + 'max_filesize' => true, + 'max_filesize_pm' => true, + 'max_login_attempts' => true, + 'max_name_chars' => true, + 'max_num_search_keywords' => true, + 'max_pass_chars' => true, + 'max_poll_options' => true, + 'max_post_chars' => true, + 'max_post_font_size' => true, + 'max_post_img_height' => true, + 'max_post_img_width' => true, + 'max_post_smilies' => true, + 'max_post_urls' => true, + 'max_quote_depth' => true, + 'max_reg_attempts' => true, + 'max_sig_chars' => true, + 'max_sig_font_size' => true, + 'max_sig_img_height' => true, + 'max_sig_img_width' => true, + 'max_sig_smilies' => true, + 'max_sig_urls' => true, + 'min_name_chars' => true, + 'min_pass_chars' => true, + 'min_post_chars' => true, + 'min_search_author_chars' => true, + 'mime_triggers' => true, + 'new_member_post_limit' => true, + 'new_member_group_default' => true, + 'override_user_style' => true, + 'pass_complex' => true, + 'pm_edit_time' => true, + 'pm_max_boxes' => true, + 'pm_max_msgs' => true, + 'pm_max_recipients' => true, + 'posts_per_page' => true, + 'print_pm' => true, + 'queue_interval' => true, + 'require_activation' => true, + 'referer_validation' => true, + 'search_block_size' => true, + 'search_gc' => true, + 'search_interval' => true, + 'search_anonymous_interval' => true, + 'search_type' => true, + 'search_store_results' => true, + 'secure_allow_deny' => true, + 'secure_allow_empty_referer' => true, + 'secure_downloads' => true, + 'session_gc' => true, + 'session_length' => true, + 'smtp_auth_method' => true, + 'smtp_delivery' => true, + 'topics_per_page' => true, + 'tpl_allow_php' => true, + 'version' => true, + 'warnings_expire_days' => true, + 'warnings_gc' => true, + + 'num_files' => true, + 'num_posts' => true, + 'num_topics' => true, + 'num_users' => true, + 'record_online_users' => true, + ); + + $result = array(); + foreach ($config_vars as $name => $void) + { + if (isset($this->config[$name])) + { + $result['config_' . $name] = $this->config[$name]; + } + } + + $result['dbms'] = $dbms; + $result['acm_type'] = $acm_type; + $result['load_extensions'] = $load_extensions; + $result['user_agent'] = 'Unknown'; + + // Try to get user agent vendor and version + $match = array(); + $user_agent = (!empty($_SERVER['HTTP_USER_AGENT'])) ? (string) $_SERVER['HTTP_USER_AGENT'] : ''; + $agents = array('firefox', 'msie', 'opera', 'chrome', 'safari', 'mozilla', 'seamonkey', 'konqueror', 'netscape', 'gecko', 'navigator', 'mosaic', 'lynx', 'amaya', 'omniweb', 'avant', 'camino', 'flock', 'aol'); + + // We check here 1 by 1 because some strings occur after others (for example Mozilla [...] Firefox/) + foreach ($agents as $agent) + { + if (preg_match('#(' . $agent . ')[/ ]?([0-9.]*)#i', $user_agent, $match)) + { + $result['user_agent'] = $match[1] . ' ' . $match[2]; + break; + } + } + + return $result; + } +} + +?> \ No newline at end of file -- cgit v1.2.1 From b68de2323d6444b4b3685a98bbcb9500a38e45cb Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 16 Dec 2009 15:48:23 +0000 Subject: merge changes from 3.0.x branch git-svn-id: file:///svn/phpbb/trunk@10342 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/questionnaire/questionnaire.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/includes/questionnaire') diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php index 1d015576a7..659c088763 100644 --- a/phpBB/includes/questionnaire/questionnaire.php +++ b/phpBB/includes/questionnaire/questionnaire.php @@ -303,6 +303,7 @@ class phpbb_questionnaire_phpbb_data_provider 'database_gc' => true, 'dbms_version' => true, 'default_dateformat' => true, + 'default_lang' => true, 'display_last_edited' => true, 'display_order' => true, 'edit_time' => true, -- cgit v1.2.1 From af5b9a96409d788733fcb1ff367e0c7fb0583702 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Tue, 9 Nov 2010 08:59:25 +0100 Subject: [ticket/9556] Drop php closing tags, add trailing newline Closing tags converted using Oleg's script. remove-php-end-tags.py -a . Trailing newlines added using the following where $ext is file extension. find . -type f -name "*.$ext" -print | xargs printf "e %s\nw\n" | ed -s; Extensions: php, css, html, js, xml. PHPBB3-9556 --- phpBB/includes/questionnaire/questionnaire.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'phpBB/includes/questionnaire') diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php index cbd7638809..b9231547cd 100644 --- a/phpBB/includes/questionnaire/questionnaire.php +++ b/phpBB/includes/questionnaire/questionnaire.php @@ -508,5 +508,3 @@ class phpbb_questionnaire_phpbb_data_provider return $result; } } - -?> \ No newline at end of file -- cgit v1.2.1 From 0bf6966c5228d446c4f0d3862619db0f619c7369 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Wed, 13 Jul 2011 19:20:16 +0200 Subject: [feature/request-class] Add server(), header() and is_ajax() to request Extend the request class with helpers for reading server vars (server()) and HTTP request headers (header()). Refactor the existing code base to make use of these helpers, make $_SERVER a deactivated super global. Also introduce an is_ajax() method, which checks the X-Requested-With header for the value 'XMLHttpRequest', which is sent by JavaScript libraries, such as jQuery. PHPBB3-9716 --- phpBB/includes/questionnaire/questionnaire.php | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'phpBB/includes/questionnaire') diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php index b9231547cd..ed61cf82d0 100644 --- a/phpBB/includes/questionnaire/questionnaire.php +++ b/phpBB/includes/questionnaire/questionnaire.php @@ -148,23 +148,15 @@ class phpbb_questionnaire_system_data_provider */ function get_data() { - // Start discovering the IPV4 server address, if available - $server_address = '0.0.0.0'; - - if (!empty($_SERVER['SERVER_ADDR'])) - { - $server_address = $_SERVER['SERVER_ADDR']; - } + global $request; - // Running on IIS? - if (!empty($_SERVER['LOCAL_ADDR'])) - { - $server_address = $_SERVER['LOCAL_ADDR']; - } + // Start discovering the IPV4 server address, if available + // Try apache, IIS, fall back to 0.0.0.0 + $server_address = $request->server('SERVER_ADDR', $request->server('LOCAL_ADDR', '0.0.0.0')); return array( 'os' => PHP_OS, - 'httpd' => $_SERVER['SERVER_SOFTWARE'], + 'httpd' => $request->server('SERVER_SOFTWARE'), // we don't want the real IP address (for privacy policy reasons) but only // a network address to see whether your installation is running on a private or public network. 'private_ip' => $this->is_private_ip($server_address), @@ -482,7 +474,7 @@ class phpbb_questionnaire_phpbb_data_provider } } - global $db; + global $db, $request; $result['dbms'] = $dbms; $result['acm_type'] = $acm_type; @@ -492,7 +484,7 @@ class phpbb_questionnaire_phpbb_data_provider // Try to get user agent vendor and version $match = array(); - $user_agent = (!empty($_SERVER['HTTP_USER_AGENT'])) ? (string) $_SERVER['HTTP_USER_AGENT'] : ''; + $user_agent = $request->header('User-Agent'); $agents = array('firefox', 'msie', 'opera', 'chrome', 'safari', 'mozilla', 'seamonkey', 'konqueror', 'netscape', 'gecko', 'navigator', 'mosaic', 'lynx', 'amaya', 'omniweb', 'avant', 'camino', 'flock', 'aol'); // We check here 1 by 1 because some strings occur after others (for example Mozilla [...] Firefox/) -- cgit v1.2.1 From c5cef773c4811d2041c56a9c34da94a30f8190e1 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Thu, 18 Aug 2011 23:38:39 +0200 Subject: [feature/request-class] Adjust code base to do html decoding manually PHPBB3-9716 --- phpBB/includes/questionnaire/questionnaire.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/questionnaire') diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php index ed61cf82d0..fa12d570df 100644 --- a/phpBB/includes/questionnaire/questionnaire.php +++ b/phpBB/includes/questionnaire/questionnaire.php @@ -152,11 +152,11 @@ class phpbb_questionnaire_system_data_provider // Start discovering the IPV4 server address, if available // Try apache, IIS, fall back to 0.0.0.0 - $server_address = $request->server('SERVER_ADDR', $request->server('LOCAL_ADDR', '0.0.0.0')); + $server_address = htmlspecialchars_decode($request->server('SERVER_ADDR', $request->server('LOCAL_ADDR', '0.0.0.0'))); return array( 'os' => PHP_OS, - 'httpd' => $request->server('SERVER_SOFTWARE'), + 'httpd' => htmlspecialchars_decode($request->server('SERVER_SOFTWARE')), // we don't want the real IP address (for privacy policy reasons) but only // a network address to see whether your installation is running on a private or public network. 'private_ip' => $this->is_private_ip($server_address), -- cgit v1.2.1 From 7a04c9048c110f0bd21ea3e9e869e17b408d640e Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 31 Dec 2011 13:32:52 +0000 Subject: [ticket/9916] Updating header license and removing Version $Id$ PHPBB3-9916 --- phpBB/includes/questionnaire/questionnaire.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'phpBB/includes/questionnaire') diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php index fa12d570df..46a743d7e9 100644 --- a/phpBB/includes/questionnaire/questionnaire.php +++ b/phpBB/includes/questionnaire/questionnaire.php @@ -2,9 +2,8 @@ /** * * @package phpBB3 -* @version $Id$ * @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ -- cgit v1.2.1 From 3c6272ff0475dc19cc67553f370ce227214d0613 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 4 Jun 2012 23:28:48 +0200 Subject: [feature/new-tz-handling] Remove appearances of board_dst and user_dst PHPBB3-9558 --- phpBB/includes/questionnaire/questionnaire.php | 1 - 1 file changed, 1 deletion(-) (limited to 'phpBB/includes/questionnaire') diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php index 46a743d7e9..5cb441d536 100644 --- a/phpBB/includes/questionnaire/questionnaire.php +++ b/phpBB/includes/questionnaire/questionnaire.php @@ -304,7 +304,6 @@ class phpbb_questionnaire_phpbb_data_provider 'avatar_max_width' => true, 'avatar_min_height' => true, 'avatar_min_width' => true, - 'board_dst' => true, 'board_email_form' => true, 'board_hide_emails' => true, 'board_timezone' => true, -- cgit v1.2.1 From 195014867ae84fe04ec01c913e38bf1d435590f7 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sat, 10 Nov 2012 11:25:22 +0100 Subject: [ticket/11183] Remove $load_extensions and weird dl() calls PHPBB3-11183 --- phpBB/includes/questionnaire/questionnaire.php | 1 - 1 file changed, 1 deletion(-) (limited to 'phpBB/includes/questionnaire') diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php index 5cb441d536..f0fb8c3c06 100644 --- a/phpBB/includes/questionnaire/questionnaire.php +++ b/phpBB/includes/questionnaire/questionnaire.php @@ -476,7 +476,6 @@ class phpbb_questionnaire_phpbb_data_provider $result['dbms'] = $dbms; $result['acm_type'] = $acm_type; - $result['load_extensions'] = $load_extensions; $result['user_agent'] = 'Unknown'; $result['dbms_version'] = $db->sql_server_info(true); -- cgit v1.2.1 From 5bc0f4b3d49ed1bea45464beece42906646eb026 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sat, 17 Nov 2012 00:24:32 +0100 Subject: [ticket/11015] Move db driver class name fixing to function PHPBB3-11015 --- phpBB/includes/questionnaire/questionnaire.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'phpBB/includes/questionnaire') diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php index f0fb8c3c06..6bbedacbe2 100644 --- a/phpBB/includes/questionnaire/questionnaire.php +++ b/phpBB/includes/questionnaire/questionnaire.php @@ -260,6 +260,8 @@ class phpbb_questionnaire_phpbb_data_provider include("{$phpbb_root_path}config.$phpEx"); unset($dbhost, $dbport, $dbname, $dbuser, $dbpasswd); // Just a precaution + $dbms = phpbb_convert_30_dbms_to_31($dbms); + // Only send certain config vars $config_vars = array( 'active_sessions' => true, -- cgit v1.2.1 From a759704b39fc1c1353f865a633759b1369589b67 Mon Sep 17 00:00:00 2001 From: Yuriy Rusko Date: Tue, 27 May 2014 20:18:06 +0200 Subject: [ticket/12594] Remove @package tags and update file headers PHPBB3-12594 --- phpBB/includes/questionnaire/questionnaire.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'phpBB/includes/questionnaire') diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php index 6f2727a38c..b4b01a74bf 100644 --- a/phpBB/includes/questionnaire/questionnaire.php +++ b/phpBB/includes/questionnaire/questionnaire.php @@ -1,9 +1,13 @@ +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -87,7 +91,6 @@ class phpbb_questionnaire_data_collector /** * Questionnaire PHP data provider -* @package phpBB3 */ class phpbb_questionnaire_php_data_provider { @@ -131,7 +134,6 @@ class phpbb_questionnaire_php_data_provider /** * Questionnaire System data provider -* @package phpBB3 */ class phpbb_questionnaire_system_data_provider { @@ -211,7 +213,6 @@ class phpbb_questionnaire_system_data_provider /** * Questionnaire phpBB data provider -* @package phpBB3 */ class phpbb_questionnaire_phpbb_data_provider { -- cgit v1.2.1 From ed812a9dfb59b1eb83263adbaa52723ff826a791 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sun, 29 Jun 2014 21:58:17 +0200 Subject: [ticket/12775] Move phpbb_convert_30_dbms_to_31 into the config file class PHPBB3-12775 --- phpBB/includes/questionnaire/questionnaire.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/questionnaire') diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php index b4b01a74bf..302419618e 100644 --- a/phpBB/includes/questionnaire/questionnaire.php +++ b/phpBB/includes/questionnaire/questionnaire.php @@ -258,10 +258,13 @@ class phpbb_questionnaire_phpbb_data_provider function get_data() { global $phpbb_root_path, $phpEx; - include("{$phpbb_root_path}config.$phpEx"); + + $phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx); + $phpbb_config_php_file->set_config_file($phpbb_root_path . 'config.' . $phpEx); + extract($phpbb_config_php_file->get_all()); unset($dbhost, $dbport, $dbname, $dbuser, $dbpasswd); // Just a precaution - $dbms = phpbb_convert_30_dbms_to_31($dbms); + $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms); // Only send certain config vars $config_vars = array( -- cgit v1.2.1 From d226a73111063194bac700c4236cb43dacd3ffc7 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Mon, 30 Jun 2014 00:51:01 +0200 Subject: [ticket/12775] Remove useless includes of config.php PHPBB3-12775 --- phpBB/includes/questionnaire/questionnaire.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'phpBB/includes/questionnaire') diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php index 302419618e..63ea432863 100644 --- a/phpBB/includes/questionnaire/questionnaire.php +++ b/phpBB/includes/questionnaire/questionnaire.php @@ -257,10 +257,8 @@ class phpbb_questionnaire_phpbb_data_provider */ function get_data() { - global $phpbb_root_path, $phpEx; + global $phpbb_root_path, $phpEx, $phpbb_config_php_file; - $phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx); - $phpbb_config_php_file->set_config_file($phpbb_root_path . 'config.' . $phpEx); extract($phpbb_config_php_file->get_all()); unset($dbhost, $dbport, $dbname, $dbuser, $dbpasswd); // Just a precaution -- cgit v1.2.1