Line | |
---|
1 | <?php |
---|
2 | defined('SMART_PATH') or die('Hacking attempt!'); |
---|
3 | |
---|
4 | if (isset($_POST['submit'])) |
---|
5 | { |
---|
6 | if ($_POST['update_timeout'] == 0 or !preg_match('#^[0-9.]+$#', $_POST['update_timeout'])) |
---|
7 | { |
---|
8 | $page['errors'][] = l10n('Invalid number of days'); |
---|
9 | $_POST['update_timeout'] = $conf['SmartAlbums']['update_timeout']; |
---|
10 | } |
---|
11 | |
---|
12 | $conf['SmartAlbums'] = array( |
---|
13 | 'show_list_messages' => $conf['SmartAlbums']['show_list_messages'], |
---|
14 | 'last_update' => $conf['SmartAlbums']['last_update'], |
---|
15 | 'update_on_upload' => isset($_POST['update_on_upload']), |
---|
16 | 'update_on_date' => isset($_POST['update_on_date']), |
---|
17 | 'update_timeout' => $_POST['update_timeout'], |
---|
18 | 'smart_is_forbidden' => isset($_POST['smart_is_forbidden']), |
---|
19 | ); |
---|
20 | |
---|
21 | conf_update_param('SmartAlbums', serialize($conf['SmartAlbums'])); |
---|
22 | $page['infos'][] = l10n('Information data registered in database'); |
---|
23 | } |
---|
24 | |
---|
25 | $template->assign($conf['SmartAlbums']); |
---|
26 | |
---|
27 | $template->set_filename('SmartAlbums_content', realpath(SMART_PATH . 'admin/template/config.tpl')); |
---|
Note: See
TracBrowser
for help on using the repository browser.