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

Last change on this file since 21901 was 19446, checked in by mistic100, 12 years ago
  • add regex for phot name, author
  • add dimensions filter
  • rewrite javascript algorithms
  • add auto update on timeout (default 3 days)
  • display photos count on plugin albums list
File size: 1.1 KB
RevLine 
[11392]1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4// Enregistrement de la configuration
5if (isset($_POST['submit']))
6{
[19446]7  if ( $_POST['update_timeout'] == 0 or !preg_match('#^[0-9.]+$#', $_POST['update_timeout']) )
8  {
9    array_push($page['errors'], l10n('Invalid number of days'));
10    $_POST['update_timeout'] = $conf['SmartAlbums']['update_timeout'];
11  }
12   
13  $conf['SmartAlbums'] = array(
14    'show_list_messages' => $conf['SmartAlbums']['show_list_messages'],
15    'last_update' =>        $conf['SmartAlbums']['last_update'],
16    'update_on_upload' =>   isset($_POST['update_on_upload']),
17    'update_on_date' =>     isset($_POST['update_on_date']),
18    'update_timeout' =>     $_POST['update_timeout'],
19    'smart_is_forbidden' => isset($_POST['smart_is_forbidden']),
20    );
[11438]21 
[11392]22  conf_update_param('SmartAlbums', serialize($conf['SmartAlbums']));
[11438]23  array_push($page['infos'], l10n('Information data registered in database'));
[11392]24}
25
[16939]26$template->assign($conf['SmartAlbums']);
[11392]27
[16104]28$template->set_filename('SmartAlbums_content', dirname(__FILE__).'/template/config.tpl');
29
[11392]30?>
Note: See TracBrowser for help on using the repository browser.