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:
Andreas Fischer 2013-10-11 14:15:46 +02:00
commit cab660f909
31 changed files with 337 additions and 215 deletions

View file

@ -13,7 +13,7 @@
</div>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
</body>
</html>

View file

@ -35,7 +35,7 @@
</div>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS ajax.js -->
{$SCRIPTS}

View file

@ -17,7 +17,7 @@
</div>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<!-- EVENT acp_simple_footer_after -->
</body>

View file

@ -0,0 +1,42 @@
<?php
/**
*
* @package phpBB3
* @copyright (c) 2013 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
// This is to help with creating migration files for new versions
// Use this to find what migrations are not depended on by any other migration
// (the current migration tree tips)
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
$phpbb_extension_manager = $phpbb_container->get('ext.manager');
$finder = $phpbb_extension_manager->get_finder();
$migrations = $finder
->core_path('phpbb/db/migration/data/')
->get_classes();
$tips = $migrations;
foreach ($migrations as $migration_class)
{
foreach ($migration_class::depends_on() as $dependency)
{
if (($tips_key = array_search($dependency, $tips)) !== false)
{
unset($tips[$tips_key]);
}
}
}
foreach ($tips as $migration)
{
echo "\t\t\t'{$migration}',\n";
}

View file

@ -344,7 +344,7 @@ class acp_board
'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'load_jquery_cdn' => array('lang' => 'LOAD_JQUERY_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'allow_cdn' => array('lang' => 'ALLOW_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend3' => 'CUSTOM_PROFILE_FIELDS',
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),

View file

@ -2866,7 +2866,7 @@ function build_url($strip_vars = false)
$url_parts = parse_url($page);
// URL
if ($url_parts !== false && !empty($url_parts['scheme']) && !empty($url_parts['host']))
if ($url_parts === false || empty($url_parts['scheme']) || empty($url_parts['host']))
{
$page = $phpbb_root_path . $page;
}
@ -5451,8 +5451,8 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/",
'T_STYLESHEET_LINK' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/stylesheet.css?assets_version=' . $config['assets_version'],
'T_STYLESHEET_LANG_LINK' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css?assets_version=' . $config['assets_version'],
'T_JQUERY_LINK' => ($config['load_jquery_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js?assets_version=" . $config['assets_version'],
'S_JQUERY_FALLBACK' => ($config['load_jquery_cdn']) ? true : false,
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js?assets_version=" . $config['assets_version'],
'S_ALLOW_CDN' => !empty($config['allow_cdn']),
'T_THEME_NAME' => rawurlencode($user->style['style_path']),
'T_THEME_LANG_NAME' => $user->data['user_lang'],

View file

@ -175,8 +175,8 @@ function adm_page_footer($copyright_html = true)
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
'S_COPYRIGHT_HTML' => $copyright_html,
'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group'),
'T_JQUERY_LINK' => ($config['load_jquery_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery.js",
'S_JQUERY_FALLBACK' => ($config['load_jquery_cdn']) ? true : false,
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery.js",
'S_ALLOW_CDN' => !empty($config['allow_cdn']),
'VERSION' => $config['version'])
);

View file

@ -128,27 +128,6 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users(user_id);;
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users(auth_option_id);;
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users(auth_role_id);;
# Table: 'phpbb_oauth_tokens'
CREATE TABLE phpbb_oauth_tokens (
user_id INTEGER DEFAULT 0 NOT NULL,
session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
oauth_token BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL
);;
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens(user_id);;
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens(provider);;
# Table: 'phpbb_oauth_accounts'
CREATE TABLE phpbb_oauth_accounts (
user_id INTEGER DEFAULT 0 NOT NULL,
provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
oauth_provider_id BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_oauth_accounts ADD PRIMARY KEY (user_id, provider);;
# Table: 'phpbb_banlist'
CREATE TABLE phpbb_banlist (
ban_id INTEGER NOT NULL,
@ -714,6 +693,27 @@ BEGIN
END;;
# Table: 'phpbb_oauth_accounts'
CREATE TABLE phpbb_oauth_accounts (
user_id INTEGER DEFAULT 0 NOT NULL,
provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
oauth_provider_id BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL
);;
ALTER TABLE phpbb_oauth_accounts ADD PRIMARY KEY (user_id, provider);;
# Table: 'phpbb_oauth_tokens'
CREATE TABLE phpbb_oauth_tokens (
user_id INTEGER DEFAULT 0 NOT NULL,
session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL,
provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
oauth_token BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL
);;
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens(user_id);;
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens(provider);;
# Table: 'phpbb_poll_options'
CREATE TABLE phpbb_poll_options (
poll_option_id INTEGER DEFAULT 0 NOT NULL,

View file

@ -166,43 +166,6 @@ CREATE INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id]) ON [PRIMARY]
GO
/*
Table: 'phpbb_oauth_tokens'
*/
CREATE TABLE [phpbb_oauth_tokens] (
[user_id] [int] DEFAULT (0) NOT NULL ,
[session_id] [char] (32) DEFAULT ('') NOT NULL ,
[provider] [varchar] (255) DEFAULT ('') NOT NULL ,
[oauth_token] [text] DEFAULT ('') NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE INDEX [user_id] ON [phpbb_oauth_tokens]([user_id]) ON [PRIMARY]
GO
CREATE INDEX [provider] ON [phpbb_oauth_tokens]([provider]) ON [PRIMARY]
GO
/*
Table: 'phpbb_oauth_accounts'
*/
CREATE TABLE [phpbb_oauth_accounts] (
[user_id] [int] DEFAULT (0) NOT NULL ,
[provider] [varchar] (255) DEFAULT ('') NOT NULL ,
[oauth_provider_id] [varchar] (4000) DEFAULT ('') NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_oauth_accounts] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_oauth_accounts] PRIMARY KEY CLUSTERED
(
[user_id],
[provider]
) ON [PRIMARY]
GO
/*
Table: 'phpbb_banlist'
*/
@ -879,6 +842,43 @@ CREATE INDEX [user] ON [phpbb_notifications]([user_id], [notification_read]) ON
GO
/*
Table: 'phpbb_oauth_accounts'
*/
CREATE TABLE [phpbb_oauth_accounts] (
[user_id] [int] DEFAULT (0) NOT NULL ,
[provider] [varchar] (255) DEFAULT ('') NOT NULL ,
[oauth_provider_id] [varchar] (4000) DEFAULT ('') NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [phpbb_oauth_accounts] WITH NOCHECK ADD
CONSTRAINT [PK_phpbb_oauth_accounts] PRIMARY KEY CLUSTERED
(
[user_id],
[provider]
) ON [PRIMARY]
GO
/*
Table: 'phpbb_oauth_tokens'
*/
CREATE TABLE [phpbb_oauth_tokens] (
[user_id] [int] DEFAULT (0) NOT NULL ,
[session_id] [char] (32) DEFAULT ('') NOT NULL ,
[provider] [varchar] (255) DEFAULT ('') NOT NULL ,
[oauth_token] [text] DEFAULT ('') NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE INDEX [user_id] ON [phpbb_oauth_tokens]([user_id]) ON [PRIMARY]
GO
CREATE INDEX [provider] ON [phpbb_oauth_tokens]([provider]) ON [PRIMARY]
GO
/*
Table: 'phpbb_poll_options'
*/

View file

@ -90,26 +90,6 @@ CREATE TABLE phpbb_acl_users (
);
# Table: 'phpbb_oauth_tokens'
CREATE TABLE phpbb_oauth_tokens (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
session_id binary(32) DEFAULT '' NOT NULL,
provider varbinary(255) DEFAULT '' NOT NULL,
oauth_token mediumblob NOT NULL,
KEY user_id (user_id),
KEY provider (provider)
);
# Table: 'phpbb_oauth_accounts'
CREATE TABLE phpbb_oauth_accounts (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
provider varbinary(255) DEFAULT '' NOT NULL,
oauth_provider_id blob NOT NULL,
PRIMARY KEY (user_id, provider)
);
# Table: 'phpbb_banlist'
CREATE TABLE phpbb_banlist (
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
@ -499,6 +479,26 @@ CREATE TABLE phpbb_notifications (
);
# Table: 'phpbb_oauth_accounts'
CREATE TABLE phpbb_oauth_accounts (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
provider varbinary(255) DEFAULT '' NOT NULL,
oauth_provider_id blob NOT NULL,
PRIMARY KEY (user_id, provider)
);
# Table: 'phpbb_oauth_tokens'
CREATE TABLE phpbb_oauth_tokens (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
session_id binary(32) DEFAULT '' NOT NULL,
provider varbinary(255) DEFAULT '' NOT NULL,
oauth_token mediumblob NOT NULL,
KEY user_id (user_id),
KEY provider (provider)
);
# Table: 'phpbb_poll_options'
CREATE TABLE phpbb_poll_options (
poll_option_id tinyint(4) DEFAULT '0' NOT NULL,

View file

@ -90,26 +90,6 @@ CREATE TABLE phpbb_acl_users (
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_oauth_tokens'
CREATE TABLE phpbb_oauth_tokens (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
session_id char(32) DEFAULT '' NOT NULL,
provider varchar(255) DEFAULT '' NOT NULL,
oauth_token mediumtext NOT NULL,
KEY user_id (user_id),
KEY provider (provider)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_oauth_accounts'
CREATE TABLE phpbb_oauth_accounts (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
provider varchar(255) DEFAULT '' NOT NULL,
oauth_provider_id text NOT NULL,
PRIMARY KEY (user_id, provider)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_banlist'
CREATE TABLE phpbb_banlist (
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
@ -499,6 +479,26 @@ CREATE TABLE phpbb_notifications (
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_oauth_accounts'
CREATE TABLE phpbb_oauth_accounts (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
provider varchar(255) DEFAULT '' NOT NULL,
oauth_provider_id text NOT NULL,
PRIMARY KEY (user_id, provider)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_oauth_tokens'
CREATE TABLE phpbb_oauth_tokens (
user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
session_id char(32) DEFAULT '' NOT NULL,
provider varchar(255) DEFAULT '' NOT NULL,
oauth_token mediumtext NOT NULL,
KEY user_id (user_id),
KEY provider (provider)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
# Table: 'phpbb_poll_options'
CREATE TABLE phpbb_poll_options (
poll_option_id tinyint(4) DEFAULT '0' NOT NULL,

View file

@ -210,34 +210,6 @@ CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id)
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id)
/
/*
Table: 'phpbb_oauth_tokens'
*/
CREATE TABLE phpbb_oauth_tokens (
user_id number(8) DEFAULT '0' NOT NULL,
session_id char(32) DEFAULT '' ,
provider varchar2(255) DEFAULT '' ,
oauth_token clob DEFAULT ''
)
/
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id)
/
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider)
/
/*
Table: 'phpbb_oauth_accounts'
*/
CREATE TABLE phpbb_oauth_accounts (
user_id number(8) DEFAULT '0' NOT NULL,
provider varchar2(255) DEFAULT '' ,
oauth_provider_id clob DEFAULT '' ,
CONSTRAINT pk_phpbb_oauth_accounts PRIMARY KEY (user_id, provider)
)
/
/*
Table: 'phpbb_banlist'
*/
@ -963,6 +935,34 @@ END;
/
/*
Table: 'phpbb_oauth_accounts'
*/
CREATE TABLE phpbb_oauth_accounts (
user_id number(8) DEFAULT '0' NOT NULL,
provider varchar2(255) DEFAULT '' ,
oauth_provider_id clob DEFAULT '' ,
CONSTRAINT pk_phpbb_oauth_accounts PRIMARY KEY (user_id, provider)
)
/
/*
Table: 'phpbb_oauth_tokens'
*/
CREATE TABLE phpbb_oauth_tokens (
user_id number(8) DEFAULT '0' NOT NULL,
session_id char(32) DEFAULT '' ,
provider varchar2(255) DEFAULT '' ,
oauth_token clob DEFAULT ''
)
/
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id)
/
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider)
/
/*
Table: 'phpbb_poll_options'
*/

View file

@ -188,30 +188,6 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
/*
Table: 'phpbb_oauth_tokens'
*/
CREATE TABLE phpbb_oauth_tokens (
user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
session_id char(32) DEFAULT '' NOT NULL,
provider varchar(255) DEFAULT '' NOT NULL,
oauth_token TEXT DEFAULT '' NOT NULL
);
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider);
/*
Table: 'phpbb_oauth_accounts'
*/
CREATE TABLE phpbb_oauth_accounts (
user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
provider varchar(255) DEFAULT '' NOT NULL,
oauth_provider_id varchar(4000) DEFAULT '' NOT NULL,
PRIMARY KEY (user_id, provider)
);
/*
Table: 'phpbb_banlist'
*/
@ -681,6 +657,30 @@ CREATE TABLE phpbb_notifications (
CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (notification_type_id, item_id);
CREATE INDEX phpbb_notifications_user ON phpbb_notifications (user_id, notification_read);
/*
Table: 'phpbb_oauth_accounts'
*/
CREATE TABLE phpbb_oauth_accounts (
user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
provider varchar(255) DEFAULT '' NOT NULL,
oauth_provider_id varchar(4000) DEFAULT '' NOT NULL,
PRIMARY KEY (user_id, provider)
);
/*
Table: 'phpbb_oauth_tokens'
*/
CREATE TABLE phpbb_oauth_tokens (
user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0),
session_id char(32) DEFAULT '' NOT NULL,
provider varchar(255) DEFAULT '' NOT NULL,
oauth_token TEXT DEFAULT '' NOT NULL
);
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider);
/*
Table: 'phpbb_poll_options'
*/

View file

@ -17,6 +17,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remot
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_birthdays', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bookmarks', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_cdn', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_password_reset', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_forum_notify', '1');
@ -176,7 +177,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofi
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_cdn', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1');

View file

@ -89,26 +89,6 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id);
CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id);
CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id);
# Table: 'phpbb_oauth_tokens'
CREATE TABLE phpbb_oauth_tokens (
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
session_id char(32) NOT NULL DEFAULT '',
provider varchar(255) NOT NULL DEFAULT '',
oauth_token mediumtext(16777215) NOT NULL DEFAULT ''
);
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider);
# Table: 'phpbb_oauth_accounts'
CREATE TABLE phpbb_oauth_accounts (
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
provider varchar(255) NOT NULL DEFAULT '',
oauth_provider_id text(65535) NOT NULL DEFAULT '',
PRIMARY KEY (user_id, provider)
);
# Table: 'phpbb_banlist'
CREATE TABLE phpbb_banlist (
ban_id INTEGER PRIMARY KEY NOT NULL ,
@ -484,6 +464,26 @@ CREATE TABLE phpbb_notifications (
CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (notification_type_id, item_id);
CREATE INDEX phpbb_notifications_user ON phpbb_notifications (user_id, notification_read);
# Table: 'phpbb_oauth_accounts'
CREATE TABLE phpbb_oauth_accounts (
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
provider varchar(255) NOT NULL DEFAULT '',
oauth_provider_id text(65535) NOT NULL DEFAULT '',
PRIMARY KEY (user_id, provider)
);
# Table: 'phpbb_oauth_tokens'
CREATE TABLE phpbb_oauth_tokens (
user_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
session_id char(32) NOT NULL DEFAULT '',
provider varchar(255) NOT NULL DEFAULT '',
oauth_token mediumtext(16777215) NOT NULL DEFAULT ''
);
CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id);
CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider);
# Table: 'phpbb_poll_options'
CREATE TABLE phpbb_poll_options (
poll_option_id tinyint(4) NOT NULL DEFAULT '0',

View file

@ -354,6 +354,8 @@ $lang = array_merge($lang, array(
$lang = array_merge($lang, array(
'ACP_LOAD_SETTINGS_EXPLAIN' => 'Here you can enable and disable certain board functions to reduce the amount of processing required. On most servers there is no need to disable any functions. However on certain systems or in shared hosting environments it may be beneficial to disable capabilities you do not really need. You can also specify limits for system load and active sessions beyond which the board will go offline.',
'ALLOW_CDN' => 'Allow usage of third party content delivery networks',
'ALLOW_CDN_EXPLAIN' => 'If this setting is enabled, some files will be served from external third party servers instead of your server. This reduces the network bandwidth required by your server, but may present a privacy issue for some board administrators.',
'CUSTOM_PROFILE_FIELDS' => 'Custom profile fields',
'LIMIT_LOAD' => 'Limit system load',
'LIMIT_LOAD_EXPLAIN' => 'If the systems 1-minute load average exceeds this value the board will automatically go offline. A value of 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers and where this information is accessible. The value here resets itself to 0 if phpBB was unable to get the load limit.',
@ -363,8 +365,6 @@ $lang = array_merge($lang, array(
'LOAD_CPF_PM' => 'Display custom profile fields in private messages',
'LOAD_CPF_VIEWPROFILE' => 'Display custom profile fields in user profiles',
'LOAD_CPF_VIEWTOPIC' => 'Display custom profile fields on topic pages',
'LOAD_JQUERY_CDN' => 'Serve jQuery using Googles CDN',
'LOAD_JQUERY_CDN_EXPLAIN' => 'If this setting is enabled, jQuery will be served from Googles AJAX API CDN instead of the copy included with phpBB on your server. If the CDN fails, phpBB will attempt to fall back to the copy included with phpBB.',
'LOAD_USER_ACTIVITY' => 'Show users activity',
'LOAD_USER_ACTIVITY_EXPLAIN' => 'Displays active topic/forum in user profiles and user control panel. It is recommended to disable this on boards with more than one million posts.',
'READ_NOTIFICATION_EXPIRE_DAYS' => 'Read Notification Expiration',

View 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')),
);
}
}

View 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')),
);
}
}

View file

@ -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;
}
/**

View file

@ -57,7 +57,7 @@
</div>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- INCLUDEJS forum_fn.js -->
<!-- INCLUDEJS ajax.js -->

View file

@ -25,6 +25,7 @@
-->
<link href="{T_THEME_PATH}/print.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="print" title="printonly" />
<!-- IF S_ALLOW_CDN --><link href="//fonts.googleapis.com/css?family=Open+Sans:600&amp;subset=latin,cyrillic-ext,latin-ext,cyrillic,greek-ext,greek,vietnamese" rel="stylesheet" type="text/css" media="screen, projection" /><!-- ENDIF -->
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="{T_STYLESHEET_LANG_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />

View file

@ -7,7 +7,7 @@
</div>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<!-- INCLUDEJS forum_fn.js -->
<!-- EVENT simple_footer_after -->

View file

@ -8,6 +8,7 @@
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
<link href="{T_THEME_PATH}/print.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="print" title="printonly" />
<!-- IF S_ALLOW_CDN --><link href="//fonts.googleapis.com/css?family=Open+Sans:600&amp;subset=latin,cyrillic-ext,latin-ext,cyrillic,greek-ext,greek,vietnamese" rel="stylesheet" type="text/css" media="screen, projection" /><!-- ENDIF -->
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="{T_STYLESHEET_LANG_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />

View file

@ -27,7 +27,8 @@
border-radius: 4px;
background: transparent none 0 0 repeat-x;
padding: 2px 22px 2px 8px;
font-family: Verdana, Arial, Helvetica;
font-family: "Open Sans", "Droid Sans", Verdana, Arial, Helvetica;
font-weight: 600;
position: relative;
text-decoration: none !important;
outline-style: none !important;

View file

@ -1124,4 +1124,3 @@ input.disabled {
.notification_list .pointer_inner {
border-bottom-color: #F1F8FF;
}

View file

@ -12,7 +12,7 @@
</div>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
<!-- EVENT overall_footer_after -->

View file

@ -6,7 +6,7 @@
</div>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
<!-- EVENT simple_footer_after -->

View file

@ -18,22 +18,22 @@ class phpbb_functional_paging_test extends phpbb_functional_test_case
$this->login();
$post = $this->create_topic(2, 'Test Topic 1', 'This is a test topic posted by the testing framework.');
for ($post_id = 1; $post_id < 20; $post_id++)
for ($post_id = 1; $post_id <= 11; $post_id++)
{
$this->create_post(2, $post['topic_id'], 'Re: Test Topic 1', 'This is a test post no' . $post_id . ' posted by the testing framework.');
}
$crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}");
$this->assertContains('post no9', $crawler->text());
$this->assertNotContains('post no19', $crawler->text());
$this->assertNotContains('post no11', $crawler->text());
$next_link = $crawler->filter('#viewtopic > fieldset > a.arrow-right')->attr('href');
$crawler = self::request('GET', $next_link);
$this->assertContains('post no19', $crawler->text());
$this->assertContains('post no11', $crawler->text());
$this->assertNotContains('post no9', $crawler->text());
$prev_link = $crawler->filter('#viewtopic > fieldset > a.arrow-left')->attr('href');
$crawler = self::request('GET', $prev_link);
$this->assertContains('post no9', $crawler->text());
$this->assertNotContains('post no19', $crawler->text());
$this->assertNotContains('post no11', $crawler->text());
}
}

View file

@ -52,13 +52,18 @@ class phpbb_path_helper_web_root_path_test extends phpbb_test_case
$this->set_phpbb_root_path();
return array(
array(
'http://www.test.com/test.php',
'http://www.test.com/test.php',
'/',
),
array(
$this->phpbb_root_path . 'test.php',
$this->phpbb_root_path . 'test.php',
),
array(
'test.php',
$this->phpbb_root_path . 'test.php',
'test.php',
),
array(
$this->phpbb_root_path . $this->phpbb_root_path . 'test.php',

View file

@ -18,8 +18,8 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te
// Prepare correct result
$scripts = array(
'<link href="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/templates/child_only.css?assets_version=1" rel="stylesheet" type="text/css" media="screen, projection" />',
'<link href="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/parent_templates/parent_only.css?assets_version=1" rel="stylesheet" type="text/css" media="screen, projection" />',
'<link href="tests/template/templates/child_only.css?assets_version=1" rel="stylesheet" type="text/css" media="screen, projection" />',
'<link href="tests/template/parent_templates/parent_only.css?assets_version=1" rel="stylesheet" type="text/css" media="screen, projection" />',
);
// Run test

View file

@ -24,51 +24,51 @@ class phpbb_template_template_includejs_test extends phpbb_template_template_tes
*/
array(
array('TEST' => 1),
'<script type="text/javascript" src="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/templates/parent_and_child.js?assets_version=1"></script>',
'<script type="text/javascript" src="tests/template/templates/parent_and_child.js?assets_version=1"></script>',
),
array(
array('TEST' => 2),
'<script type="text/javascript" src="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/templates/parent_and_child.js?assets_version=0"></script>',
'<script type="text/javascript" src="tests/template/templates/parent_and_child.js?assets_version=0"></script>',
),
array(
array('TEST' => 3),
'<script type="text/javascript" src="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/templates/parent_and_child.js?test=1&assets_version=0"></script>',
'<script type="text/javascript" src="tests/template/templates/parent_and_child.js?test=1&assets_version=0"></script>',
),
array(
array('TEST' => 4),
'<script type="text/javascript" src="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/templates/parent_and_child.js?test=1&amp;assets_version=0"></script>',
'<script type="text/javascript" src="tests/template/templates/parent_and_child.js?test=1&amp;assets_version=0"></script>',
),
array(
array('TEST' => 6),
'<script type="text/javascript" src="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/parent_templates/parent_only.js?assets_version=1"></script>',
'<script type="text/javascript" src="tests/template/parent_templates/parent_only.js?assets_version=1"></script>',
),
array(
array('TEST' => 7),
'<script type="text/javascript" src="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/templates/child_only.js?assets_version=1"></script>',
'<script type="text/javascript" src="tests/template/templates/child_only.js?assets_version=1"></script>',
),
array(
array('TEST' => 8),
'<script type="text/javascript" src="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/templates/subdir/parent_only.js?assets_version=1"></script>',
'<script type="text/javascript" src="tests/template/templates/subdir/parent_only.js?assets_version=1"></script>',
),
array(
array('TEST' => 9),
'<script type="text/javascript" src="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/templates/subdir/subsubdir/parent_only.js?assets_version=1"></script>',
'<script type="text/javascript" src="tests/template/templates/subdir/subsubdir/parent_only.js?assets_version=1"></script>',
),
array(
array('TEST' => 10),
'<script type="text/javascript" src="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/templates/subdir/parent_only.js?assets_version=1"></script>',
'<script type="text/javascript" src="tests/template/templates/subdir/parent_only.js?assets_version=1"></script>',
),
array(
array('TEST' => 11),
'<script type="text/javascript" src="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/templates/child_only.js?test1=1&amp;test2=2&amp;assets_version=1#test3"></script>',
'<script type="text/javascript" src="tests/template/templates/child_only.js?test1=1&amp;test2=2&amp;assets_version=1#test3"></script>',
),
array(
array('TEST' => 12),
'<script type="text/javascript" src="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/parent_templates/parent_only.js?test1=1&amp;test2=2&amp;assets_version=1#test3"></script>',
'<script type="text/javascript" src="tests/template/parent_templates/parent_only.js?test1=1&amp;test2=2&amp;assets_version=1#test3"></script>',
),
array(
array('TEST' => 14),
'<script type="text/javascript" src="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/parent_templates/parent_only.js?test1=&quot;&amp;assets_version=1#test3"></script>',
'<script type="text/javascript" src="tests/template/parent_templates/parent_only.js?test1=&quot;&amp;assets_version=1#test3"></script>',
),
array(
array('TEST' => 15),
@ -84,7 +84,7 @@ class phpbb_template_template_includejs_test extends phpbb_template_template_tes
),
array(
array('TEST' => 18),
'<script type="text/javascript" src="' . $this->phpbb_path_helper->get_web_root_path() . 'tests/template/templates/parent_and_child.js?test=1&test2=0&amp;assets_version=1"></script>',
'<script type="text/javascript" src="tests/template/templates/parent_and_child.js?test=1&test2=0&amp;assets_version=1"></script>',
),
);
}