source: extensions/SmartAlbums/admin/config.php @ 26442

Last change on this file since 26442 was 26442, checked in by mistic100, 10 years ago

update for Piwigo 2.6

File size: 1021 bytes
Line 
1<?php
2defined('SMART_PATH') or die('Hacking attempt!');
3
4if (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.