Fixing stylesheet update bug

skala
Julio Montoya 13 years ago
parent 10209ebb37
commit ec6be91494
  1. 3
      main/admin/settings.lib.php
  2. 3
      main/admin/settings.php
  3. 8
      main/inc/lib/main_api.lib.php
  4. 6
      resources/config/prod.php

@ -447,6 +447,7 @@ function store_regions() {
} }
} }
} }
api_set_setting_last_update();
} }
/** /**
@ -478,6 +479,7 @@ function store_plugins() {
foreach ($remove_plugins as $plugin) { foreach ($remove_plugins as $plugin) {
$plugin_obj->uninstall($plugin); $plugin_obj->uninstall($plugin);
} }
api_set_setting_last_update();
} }
/** /**
@ -492,6 +494,7 @@ function store_stylesheets() {
if (is_style($style)) { if (is_style($style)) {
api_set_setting('stylesheets', $style, null, 'stylesheets', $_configuration['access_url']); api_set_setting('stylesheets', $style, null, 'stylesheets', $_configuration['access_url']);
api_set_setting_last_update();
} }
return true; return true;

@ -313,8 +313,7 @@ if (!empty($_GET['category']) && !in_array($_GET['category'], array('Plugins', '
$category = $_GET['category']; $category = $_GET['category'];
event_system(LOG_CONFIGURATION_SETTINGS_CHANGE, LOG_CONFIGURATION_SETTINGS_CATEGORY, $category, api_get_utc_datetime(), $user_id); event_system(LOG_CONFIGURATION_SETTINGS_CHANGE, LOG_CONFIGURATION_SETTINGS_CATEGORY, $category, api_get_utc_datetime(), $user_id);
//Saving latest refresh api_set_setting_last_update();
api_set_setting('settings_latest_update', api_get_utc_datetime());
// Add event configuration settings variable to the system log. // Add event configuration settings variable to the system log.
if (is_array($keys) && count($keys) > 0) { if (is_array($keys) && count($keys) > 0) {

@ -3602,9 +3602,10 @@ function api_get_language_info($language_id) {
*/ */
function api_get_visual_theme() { function api_get_visual_theme() {
static $visual_theme; static $visual_theme;
if (!isset($visual_theme)) {
if (!isset($visual_theme)) {
$platform_theme = api_get_setting('stylesheets'); // Plataform's theme. $platform_theme = api_get_setting('stylesheets'); // Plataform's theme.
$visual_theme = $platform_theme; $visual_theme = $platform_theme;
if (api_get_setting('user_selected_theme') == 'true') { if (api_get_setting('user_selected_theme') == 'true') {
@ -6528,3 +6529,8 @@ function api_set_settings_and_plugins() {
$_SESSION['_setting'] = $_setting; $_SESSION['_setting'] = $_setting;
$_SESSION['_plugins'] = $_plugins; $_SESSION['_plugins'] = $_plugins;
} }
function api_set_setting_last_update() {
//Saving latest refresh
api_set_setting('settings_latest_update', api_get_utc_datetime());
}

@ -1,7 +1,7 @@
<?php <?php
$app['debug'] = false; $app['debug'] = false;
$app['app.theme'] = api_get_visual_theme();
$app['app.title'] = ''; $app['app.title'] = '';
$app['jquery_ui_theme'] = 'smoothness'; $app['jquery_ui_theme'] = 'smoothness';
@ -15,6 +15,7 @@ $app['http_cache.cache_dir'] = $app['cache.path'].'http';
$app['db.orm.proxies_dir'] = $app['cache.path'].'proxies_dir'; $app['db.orm.proxies_dir'] = $app['cache.path'].'proxies_dir';
// Assetic // Assetic
/*
$app['assetic.path_to_cache'] = $app['cache.path'] . DIRECTORY_SEPARATOR . 'assetic' ; $app['assetic.path_to_cache'] = $app['cache.path'] . DIRECTORY_SEPARATOR . 'assetic' ;
$app['assetic.path_to_web'] = api_get_path(SYS_PATH) . 'web'; //Location where to dump all generated files $app['assetic.path_to_web'] = api_get_path(SYS_PATH) . 'web'; //Location where to dump all generated files
$app['assetic.input.path_to_assets'] = $app['assetic.path_to_web'].$app['app.theme']; $app['assetic.input.path_to_assets'] = $app['assetic.path_to_web'].$app['app.theme'];
@ -53,6 +54,7 @@ $app['assetic.input.path_to_js'] = array(
$app['assetic.output.path_to_js'] = 'js/script.js'; $app['assetic.output.path_to_js'] = 'js/script.js';
$app['assetic.filter.yui_compressor.path'] = '/usr/share/yui-compressor/yui-compressor.jar'; $app['assetic.filter.yui_compressor.path'] = '/usr/share/yui-compressor/yui-compressor.jar';
//Create directories? //Create directories?
if (!is_dir($app['assetic.path_to_web'])) { if (!is_dir($app['assetic.path_to_web'])) {
//mkdir($app['assetic.path_to_web'], api_get_permissions_for_new_directories()); //mkdir($app['assetic.path_to_web'], api_get_permissions_for_new_directories());
@ -65,6 +67,8 @@ if (!is_dir($app['assetic.path_to_web'].'/css')) {
if (!is_dir($app['assetic.path_to_web'].'/js')) { if (!is_dir($app['assetic.path_to_web'].'/js')) {
//mkdir($app['assetic.path_to_web'].'/js', api_get_permissions_for_new_directories()); //mkdir($app['assetic.path_to_web'].'/js', api_get_permissions_for_new_directories());
} }
*
*/
if (!is_dir($app['db.orm.proxies_dir'])) { if (!is_dir($app['db.orm.proxies_dir'])) {
mkdir($app['db.orm.proxies_dir'], api_get_permissions_for_new_directories()); mkdir($app['db.orm.proxies_dir'], api_get_permissions_for_new_directories());
} }
Loading…
Cancel
Save