source: extensions/SmartAlbums/admin.php @ 11376

Last change on this file since 11376 was 11376, checked in by mistic100, 13 years ago

Add event_handler on 'login_success' and 'invalidate_user_cache' to regenerate SmartAlbums content

File size: 950 bytes
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4global $conf, $template;
5load_language('plugin.lang', SMART_PATH);
6if (!is_array($conf['SmartAlbums'])) $conf['SmartAlbums'] = unserialize($conf['SmartAlbums']);
7
8
9// Enregistrement de la configuration
10if (isset($_POST['submit']))
11{
12        $conf['SmartAlbums'] = array(
13    'update_on_upload' => $_POST['update_on_upload'], 
14    'update_on_login' => $_POST['update_on_login'], 
15    );   
16       
17  conf_update_param('SmartAlbums', serialize($conf['SmartAlbums']));
18        array_push($page['infos'], l10n('Information data registered in database'));
19}
20
21$template->assign(array(
22  'SMART_PATH' => SMART_PATH,
23        'update_on_upload' => $conf['SmartAlbums']['update_on_upload'],
24        'update_on_login' => $conf['SmartAlbums']['update_on_login'],
25));
26       
27$template->set_filename('SmartAlbums_conf', dirname(__FILE__).'/template/admin.tpl');
28$template->assign_var_from_handle('ADMIN_CONTENT', 'SmartAlbums_conf');
29
30?>
Note: See TracBrowser for help on using the repository browser.