Skip to content

Commit

Permalink
Merge branch 'master' into feature/fix-topic-url
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Dec 1, 2017
2 parents 5bc1983 + 1a5fab7 commit c6aa2ba
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 1 deletion.
1 change: 1 addition & 0 deletions language/english.php
Expand Up @@ -2078,6 +2078,7 @@
'path_themes' => "Themes Path",
'cache_templates' => "Cache Templates?",
'cache_mobile' => "Cache Mobile Devices Separately?",
'cache_resource' => "Combine, Minify and Cache CSS and JavaScript Files?",
'disable_new_user_registration' => "Disable New Registrations",
'allow_user_themes' => "Allow User Themes",
'allow_user_language' => "Allow User Language",
Expand Down
1 change: 1 addition & 0 deletions language/english_utf-8.php
Expand Up @@ -2079,6 +2079,7 @@
'path_themes' => "Themes Path",
'cache_templates' => "Cache Templates?",
'cache_mobile' => "Cache Mobile Devices Separately?",
'cache_resource' => "Combine, Minify and Cache CSS and JavaScript Files?",
'disable_new_user_registration' => "Disable New Registrations",
'allow_user_themes' => "Allow User Themes",
'allow_user_language' => "Allow User Language",
Expand Down
1 change: 1 addition & 0 deletions language/japanese_utf-8.php
Expand Up @@ -2079,6 +2079,7 @@
'path_themes' => 'テーマのパス',
'cache_templates' => 'テンプレートをキャッシュする',
'cache_mobile' => 'モバイル用のコンテンツを別にキャッシュする',
'cache_resource' => "Combine, Minify and Cache CSS and JavaScript Files?",
'disable_new_user_registration' => '新規ユーザー登録を停止する',
'allow_user_themes' => 'テーマ選択を許可する',
'allow_user_language' => '言語選択を許可する',
Expand Down
2 changes: 2 additions & 0 deletions public_html/admin/configuration_validation.php
Expand Up @@ -265,6 +265,7 @@
);
$_CONF_VALIDATE['Core']['cache_templates'] = array('rule' => 'boolean');
$_CONF_VALIDATE['Core']['cache_mobile'] = array('rule' => 'boolean');
$_CONF_VALIDATE['Core']['cache_resource'] = array('rule' => 'boolean');

/* Subgroup Theme, Tab Advanced Settings */
$_CONF_VALIDATE['Core']['show_right_blocks'] = array('rule' => 'boolean');
Expand Down Expand Up @@ -458,6 +459,7 @@
$LANG_VALIDATION['language'] : $LANG_VALIDATION['default']
);
$_CONF_VALIDATE['Core']['allow_user_language'] = array('rule' => 'boolean');
$_CONF_VALIDATE['Core']['switchlang_homepage'] = array('rule' => 'boolean');

/* Subgroup Language, Tab Locale */
$_CONF_VALIDATE['Core']['locale'] = array('rule' => 'stringOrEmpty');
Expand Down
1 change: 1 addition & 0 deletions public_html/admin/install/config-install.php
Expand Up @@ -172,6 +172,7 @@ function install_config()
$c->add('path_themes','','text',2,10,NULL,210,TRUE, $me, 10);
$c->add('cache_templates',TRUE,'select',2,10,1,220,TRUE, $me, 10);
$c->add('cache_mobile',TRUE,'select',2,10,1,230,TRUE, $me, 10);
$c->add('cache_resource',TRUE,'select',2,10,1,240,TRUE, $me, 10);

$c->add('tab_theme_advanced', NULL, 'tab', 2, 11, NULL, 0, TRUE, $me, 11);
$c->add('fs_theme_advanced', NULL, 'fieldset', 2, 11, NULL, 0, TRUE, $me, 11);
Expand Down
10 changes: 10 additions & 0 deletions public_html/admin/install/devel-db-update.php
Expand Up @@ -79,6 +79,16 @@ function update_DatabaseFor220()
// Add `css_id` and `css_classes` columns to the `blocks` table
$_SQL[] = "ALTER TABLE {$_TABLES['blocks']} ADD `css_id` VARCHAR(255) NOT NULL DEFAULT '' AFTER `help`";
$_SQL[] = "ALTER TABLE {$_TABLES['blocks']} ADD `css_classes` VARCHAR(255) NOT NULL DEFAULT '' AFTER `css_id`";

// Drop small, read-only tables
$_SQL[] = "DROP TABLE {$_TABLES['commentcodes']}";
$_SQL[] = "DROP TABLE {$_TABLES['commentmodes']}";
$_SQL[] = "DROP TABLE {$_TABLES['featurecodes']}";
$_SQL[] = "DROP TABLE {$_TABLES['frontpagecodes']}";
$_SQL[] = "DROP TABLE {$_TABLES['postmodes']}";
$_SQL[] = "DROP TABLE {$_TABLES['sortcodes']}";
$_SQL[] = "DROP TABLE {$_TABLES['statuscodes']}";
$_SQL[] = "DROP TABLE {$_TABLES['trackbackcodes']}";

// Add theme admin
$result = DB_query("SELECT * FROM {$_TABLES['groups']} WHERE grp_name='Theme Admin'");
Expand Down
6 changes: 5 additions & 1 deletion public_html/docs/english/config.html
Expand Up @@ -605,7 +605,11 @@ <h3><a name="theme_theme">Theme: Theme</a></h3>
separately from computers. This includes the template files, blocks, articles and other plugins which may use
Geeklog's template cache system. You should only set this to false if you do not plan to display different information
depending on if a mobile device is detected being used by the user. Performance will be improved slightly if set to false since
less cached files will be created.</td></tr>
less cached files will be created.</td></tr>
<tr>
<td valign="top"><a name="desc_cache_resource">cache_resource</a></td>
<td valign="top">true</td>
<td valign="top">If set to <span class="tt">true</span>, JavaScript files and CSS files will be combined, minified and cached.</td></tr>
</table>

<h3><a name="theme_advanced">Theme: Advanced Settings</a></h3>
Expand Down
4 changes: 4 additions & 0 deletions public_html/docs/japanese/config.html
Expand Up @@ -552,6 +552,10 @@ <h3><a name="theme_theme">テーマ: テーマ</a></h3>
Geeklogのテンプレートキャッシュシステムを利用するプラグインです。ユーザーがモバイルデバイスを使用しているかどうかを
検出して異なる情報を表示する予定がない場合に限り、「いいえ」に設定した方がよいでしょう。「いいえ」にすると、
作成するキャッシュファイルの数が減るので、パフォーマンスが少し向上します。</td></tr>
<tr>
<td valign="top"><a name="desc_cache_resource">cache_resource</a></td>
<td valign="top">true</td>
<td valign="top">If set to <span class="tt">true</span>, JavaScript files and CSS files will be combined, minified and cached.</td></tr>
</table>

<h3><a name="theme_advanced">テーマ: テーマの拡張設定</a></h3>
Expand Down
5 changes: 5 additions & 0 deletions public_html/lib-common.php
Expand Up @@ -503,6 +503,11 @@
}
unset($theme_config, $func);

// Disable Resource cache (combined and minified CSS and JavaScript files)
if (isset($_CONF['cache_resource']) && !$_CONF['cache_resource']) {
Geeklog\Cache::disable();
};

// Clear out any expired sessions
DB_lockTable($_TABLES['sessions']);
DB_query("UPDATE {$_TABLES['sessions']} SET whos_online = 0 WHERE start_time < " . (time() - $_CONF['whosonline_threshold']));
Expand Down
3 changes: 3 additions & 0 deletions sql/updates/mysql_2.1.3_to_2.2.0.php
Expand Up @@ -58,6 +58,9 @@ function update_ConfValuesFor220()

// Add the cache_mobile config option again since the config option may be missing for sites who upgraded from 2.1.2 (upgrade script had a bug in it)
$c->add('cache_mobile',TRUE,'select',2,10,1,230,TRUE, $me, 10);

// Enable or disable Resource cache
$c->add('cache_resource',TRUE,'select',2,10,1,240,TRUE, $me, 10);

return true;
}
Expand Down
3 changes: 3 additions & 0 deletions sql/updates/pgsql_2.1.3_to_2.2.0.php
Expand Up @@ -58,6 +58,9 @@ function update_ConfValuesFor220()

// Add the cache_mobile config option again since the config option may be missing for sites who upgraded from 2.1.2 (upgrade script had a bug in it)
$c->add('cache_mobile',TRUE,'select',2,10,1,230,TRUE, $me, 10);

// Enable or disable Resource cache
$c->add('cache_resource',TRUE,'select',2,10,1,240,TRUE, $me, 10);

return true;
}
Expand Down
2 changes: 2 additions & 0 deletions system/lib-template.php
Expand Up @@ -402,6 +402,8 @@ function plugin_configchange_template($group, $changes = array())
global $_CONF;

if (($group === 'Core') && (in_array('cache_templates', $changes)
|| in_array('cache_mobile', $changes)
|| in_array('cache_resource', $changes)
|| in_array('template_comments', $changes)
|| in_array('language', $changes)
|| in_array('language_files', $changes)
Expand Down

0 comments on commit c6aa2ba

Please sign in to comment.