mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
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
This commit is contained in:
33
phpBB/phpbb/db/migration/data/v310/allow_cdn.php
Normal file
33
phpBB/phpbb/db/migration/data/v310/allow_cdn.php
Normal file
@@ -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')),
|
||||
);
|
||||
}
|
||||
}
|
42
phpBB/phpbb/db/migration/data/v310/alpha1.php
Normal file
42
phpBB/phpbb/db/migration/data/v310/alpha1.php
Normal file
@@ -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')),
|
||||
);
|
||||
}
|
||||
}
|
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user