diff options
author | Andreas Fischer <bantu@phpbb.com> | 2013-10-11 14:15:46 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2013-10-11 14:15:46 +0200 |
commit | cab660f9097e7753bf9bc80c1cd1a0004adc421c (patch) | |
tree | eab8767acec379d7d69ab9623ecc8f7c4e6a8d30 /phpBB/phpbb | |
parent | a30f1729d8cb36d9d52167c08a139c99c63c4fdf (diff) | |
parent | 2198c29c205ba3a98e66746b9527c50c50f7c1e2 (diff) | |
download | forums-cab660f9097e7753bf9bc80c1cd1a0004adc421c.tar forums-cab660f9097e7753bf9bc80c1cd1a0004adc421c.tar.gz forums-cab660f9097e7753bf9bc80c1cd1a0004adc421c.tar.bz2 forums-cab660f9097e7753bf9bc80c1cd1a0004adc421c.tar.xz forums-cab660f9097e7753bf9bc80c1cd1a0004adc421c.zip |
Merge remote-tracking branch 'phpbb/develop' into ticket/11621
* phpbb/develop:
[ticket/11867] Schema files are not created by create_schema_files.php
[ticket/11905] 3.1.0-a1 Migration
[ticket/11903] Speed up paging test
[ticket/11703] Extend the correct migration class.
[ticket/11874] Correct when $phpbb_root_path is appended to build_url()
[ticket/11703] Also use empty() for T_JQUERY_LINK.
[ticket/11703] Add effectively_installed().
[ticket/11703] Make jQuery CDN switch more generic.
[ticket/11874] Fix tests
[ticket/11874] Do not always prepend the web path; only replace phpbb_root_path
[ticket/11345] Don't include scheme, so HTTPS is used where necessary.
[ticket/11345] Wrap remote webfonts in S_ALLOW_CDN.
[ticket/11345] Move css import to template
[ticket/11345] Add Droid Sans as fallback font
[ticket/11345] Change font for buttons
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/db/migration/data/v310/allow_cdn.php | 33 | ||||
-rw-r--r-- | phpBB/phpbb/db/migration/data/v310/alpha1.php | 42 | ||||
-rw-r--r-- | phpBB/phpbb/path_helper.php | 12 |
3 files changed, 80 insertions, 7 deletions
diff --git a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php new file mode 100644 index 0000000000..aa471df6e7 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php @@ -0,0 +1,33 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2013 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class allow_cdn extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return isset($this->config['allow_cdn']); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\jquery_update', + ); + } + + public function update_data() + { + return array( + array('config.add', array('allow_cdn', (int) $this->config['load_jquery_cdn'])), + array('config.remove', array('load_jquery_cdn')), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v310/alpha1.php b/phpBB/phpbb/db/migration/data/v310/alpha1.php new file mode 100644 index 0000000000..04f195daeb --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/alpha1.php @@ -0,0 +1,42 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2013 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2 +* +*/ + +namespace phpbb\db\migration\data\v310; + +class alpha1 extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v30x\local_url_bbcode', + '\phpbb\db\migration\data\v30x\release_3_0_12', + '\phpbb\db\migration\data\v310\acp_style_components_module', + '\phpbb\db\migration\data\v310\allow_cdn', + '\phpbb\db\migration\data\v310\auth_provider_oauth', + '\phpbb\db\migration\data\v310\avatars', + '\phpbb\db\migration\data\v310\boardindex', + '\phpbb\db\migration\data\v310\config_db_text', + '\phpbb\db\migration\data\v310\forgot_password', + '\phpbb\db\migration\data\v310\mod_rewrite', + '\phpbb\db\migration\data\v310\namespaces', + '\phpbb\db\migration\data\v310\notifications_cron', + '\phpbb\db\migration\data\v310\notification_options_reconvert', + '\phpbb\db\migration\data\v310\signature_module_auth', + '\phpbb\db\migration\data\v310\softdelete_mcp_modules', + '\phpbb\db\migration\data\v310\teampage', + ); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.1.0-a1')), + ); + } +} diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php index b2ed11a927..e9fd092b62 100644 --- a/phpBB/phpbb/path_helper.php +++ b/phpBB/phpbb/path_helper.php @@ -89,26 +89,24 @@ class path_helper } /** - * Update a path to the correct relative root path + * Update a web path to the correct relative root path * * This replaces $phpbb_root_path . some_url with - * get_web_root_path() . some_url OR if $phpbb_root_path - * is not at the beginning of $path, just prepends the - * web root path + * get_web_root_path() . some_url * * @param string $path The path to be updated * @return string */ public function update_web_root_path($path) { - $web_root_path = $this->get_web_root_path($this->symfony_request); - if (strpos($path, $this->phpbb_root_path) === 0) { $path = substr($path, strlen($this->phpbb_root_path)); + + return $this->get_web_root_path() . $path; } - return $web_root_path . $path; + return $path; } /** |