diff --git a/util/db-upgrade-0.1.23-vs-0.1.24.sql b/util/db-upgrade-0.1.23-vs-0.1.24.sql index dcd0d05..62bd33d 100644 --- a/util/db-upgrade-0.1.23-vs-0.1.24.sql +++ b/util/db-upgrade-0.1.23-vs-0.1.24.sql @@ -13,6 +13,8 @@ drop view if exists `v_messages`; create view `v_messages` AS select `metadata`.`id` AS `id`,`metadata`.`piler_id` AS `piler_id`,`metadata`.`from` AS `from`,`metadata`.`fromdomain` AS `fromdomain`,`rcpt`.`to` AS `to`,`rcpt`.`todomain` AS `todomain`,`metadata`.`subject` AS `subject`, `metadata`.`size` AS `size`, `metadata`.`direction` AS `direction`, `metadata`.`sent` AS `sent`, `metadata`.`retained` AS `retained`, `metadata`.`arrived` AS `arrived`, `metadata`.`digest` AS `digest`, `metadata`.`bodydigest` AS `bodydigest` from (`metadata` join `rcpt`) where (`metadata`.`id` = `rcpt`.`id`); +update user_settings set theme='mobile' where theme='orig'; + create table if not exists `ldap` ( `id` int not null auto_increment primary key, `description` varchar(255) not null, diff --git a/util/postinstall.sh b/util/postinstall.sh index 441174e..06042d9 100755 --- a/util/postinstall.sh +++ b/util/postinstall.sh @@ -105,7 +105,7 @@ echo "30 2 * * * $LIBEXECDIR/piler/indexer.main.sh" >> $CRON_TMP echo "*/15 * * * * $INDEXER --quiet tag1 --rotate" >> $CRON_TMP echo "*/15 * * * * $INDEXER --quiet note1 --rotate" >> $CRON_TMP - echo "30 6 * * * /usr/bin/php $LIBEXECDIR/piler/generate_stats.php $$DOCROOT" >> $CRON_TMP + echo "30 6 * * * /usr/bin/php $LIBEXECDIR/piler/generate_stats.php $DOCROOT" >> $CRON_TMP echo "### PILEREND" >> $CRON_TMP } diff --git a/webui/config.php b/webui/config.php index 7fbf14b..59fafee 100644 --- a/webui/config.php +++ b/webui/config.php @@ -17,6 +17,7 @@ $config['BRANDING_TEXT'] = ''; $config['BRANDING_URL'] = ''; $config['BRANDING_LOGO'] = ''; +$config['BRANDING_FAVICON'] = ''; $config['SUPPORT_LINK'] = ''; $config['BOOTSTRAP_THEME'] = '-cosmo'; @@ -236,6 +237,10 @@ if(isset($_SESSION['theme']) && preg_match("/^([a-zA-Z0-9\-\_]+)$/", $_SESSION['theme'])) { $config['THEME'] = $_SESSION['theme']; } +include("system/helper/detectmobilebrowser.php"); + +if(MOBILE_DEVICE == 1) { $config['THEME'] = 'mobile'; } + // make sure auditors are restricted in a saas environment if($config['ENABLE_SAAS'] == 1) { $config['RESTRICTED_AUDITOR'] = 1; } if(isset($_SESSION['username']) && $_SESSION['username'] == 'auditor@local') { $config['RESTRICTED_AUDITOR'] = 0; } diff --git a/webui/controller/group/email.php b/webui/controller/group/email.php index 6551395..636617c 100644 --- a/webui/controller/group/email.php +++ b/webui/controller/group/email.php @@ -17,7 +17,7 @@ $this->load->model('group/group'); - //$this->document->title = $language->get('text_group_management'); + $this->document->title = ''; $this->data['page'] = 0; $this->data['page_len'] = get_page_length(); diff --git a/webui/controller/login/login.php b/webui/controller/login/login.php index 547a1a4..4037520 100644 --- a/webui/controller/login/login.php +++ b/webui/controller/login/login.php @@ -32,7 +32,7 @@ $this->load->model('saas/customer'); } - $this->document->title = $this->data['text_login']; + $this->data['title'] = $this->data['text_login']; if($this->request->server['REQUEST_METHOD'] == 'POST' && $this->validate() == true) { diff --git a/webui/model/audit/audit.php b/webui/model/audit/audit.php index 9a913f1..32ce707 100644 --- a/webui/model/audit/audit.php +++ b/webui/model/audit/audit.php @@ -39,7 +39,7 @@ $where .= " AND ( " . $this->append_search_criteria("meta_id", $data['ref'], $arr) . " )"; } - if(Registry::get('admin_user') == 0) { + if(Registry::get('admin_user') == 0 && RESTRICTED_AUDITOR == 1) { while(list($k, $v) = each($_SESSION['auditdomains'])) { if($q) { $q .= ","; } $q .= "?"; diff --git a/webui/model/policy/retention.php b/webui/model/policy/retention.php index 330e062..903eaa7 100644 --- a/webui/model/policy/retention.php +++ b/webui/model/policy/retention.php @@ -47,7 +47,7 @@ $default_retention = DEFAULT_RETENTION * 86400; $delta = NOW + 86400 * $data['days'] - $default_retention; - $start_ts = NOW - $default_retention; + $start_ts = NOW - 2*$default_retention; $query = $this->db->query("UPDATE " . VIEW_MESSAGES . " SET retained=? WHERE arrived > ? AND (todomain=? OR fromdomain=?)", array($delta, $start_ts, $data['domain'], $data['domain'])); diff --git a/webui/system/controller.php b/webui/system/controller.php index 6bb88a1..6a5b017 100644 --- a/webui/system/controller.php +++ b/webui/system/controller.php @@ -93,7 +93,8 @@ $file = DIR_THEME . THEME . '/templates/' . $this->template; } - + if(MOBILE_DEVICE == 1) { $file = DIR_THEME . 'mobile' . '/templates/' . $this->template; } + if(file_exists($file)){ extract($this->data); diff --git a/webui/system/helper/detectmobilebrowser.php b/webui/system/helper/detectmobilebrowser.php new file mode 100644 index 0000000..a5e8ae8 --- /dev/null +++ b/webui/system/helper/detectmobilebrowser.php @@ -0,0 +1,7 @@ + diff --git a/webui/view/javascript/piler-in.js b/webui/view/javascript/piler-in.js index c65cb89..2207360 100644 --- a/webui/view/javascript/piler-in.js +++ b/webui/view/javascript/piler-in.js @@ -633,7 +633,11 @@ $('input#xbody').val(''); $('input#xtag').val(''); $('input#xnote').val(''); - $('input#xhas_attachment')[0].checked = 0; + $('input#xhas_attachment_doc')[0].checked = 0; + $('input#xhas_attachment_xls')[0].checked = 0; + $('input#xhas_attachment_pdf')[0].checked = 0; + $('input#xhas_attachment_image')[0].checked = 0; + $('input#xhas_attachment_any')[0].checked = 0; $('input#date1').val(''); $('input#date2').val(''); @@ -642,6 +646,29 @@ /* + * when clicked on the "any" attachment type, clear the other types + */ + + clear_attachment_others: function() + { + $('input#xhas_attachment_doc')[0].checked = 0; + $('input#xhas_attachment_xls')[0].checked = 0; + $('input#xhas_attachment_pdf')[0].checked = 0; + $('input#xhas_attachment_image')[0].checked = 0; + }, + + + /* + * when clicked on any of the named attachment types, clear the "any" type + */ + + clear_attachment_any: function() + { + $('input#xhas_attachment_any')[0].checked = 0; + }, + + + /* * show a temporary message to the user */ diff --git a/webui/view/theme/default/templates/common/layout-audit.tpl b/webui/view/theme/default/templates/common/layout-audit.tpl index 58c45b7..01bd076 100644 --- a/webui/view/theme/default/templates/common/layout-audit.tpl +++ b/webui/view/theme/default/templates/common/layout-audit.tpl @@ -2,7 +2,7 @@
-