diff --git a/src/config.h b/src/config.h index deb8ac23..360917ef 100644 --- a/src/config.h +++ b/src/config.h @@ -11,7 +11,7 @@ #define PROGNAME "piler" -#define VERSION "0.1.17" +#define VERSION "0.1.17.1" #define PROGINFO VERSION ", Janos SUTO \n\n" CONFIGURE_PARAMS "\n" diff --git a/src/store.c b/src/store.c index 237ba060..1b6b0c6e 100644 --- a/src/store.c +++ b/src/store.c @@ -130,9 +130,9 @@ int store_file(struct session_data *sdata, char *filename, int startpos, int len p2 = strrchr(s, '/'); if(!p2) goto ENDE; *p2 = '\0'; - rc = mkdir(s, 0750); if(rc == -1) syslog(LOG_PRIORITY, "%s: mkdir %s: error=%s", sdata->ttmpfile, s, strerror(errno)); + rc = mkdir(s, 0750); *p2 = '/'; - rc = mkdir(s, 0750); if(rc == -1) syslog(LOG_PRIORITY, "%s: mkdir %s: error=%s", sdata->ttmpfile, s, strerror(errno)); + rc = mkdir(s, 0750); *p1 = '/'; rc = mkdir(s, 0770); if(rc == -1) syslog(LOG_PRIORITY, "%s: mkdir %s: error=%s", sdata->ttmpfile, s, strerror(errno)); } diff --git a/webui/controller/message/remove.php b/webui/controller/message/remove.php deleted file mode 100644 index 1686869d..00000000 --- a/webui/controller/message/remove.php +++ /dev/null @@ -1,57 +0,0 @@ -id = "content"; - $this->template = "message/remove.tpl"; - $this->layout = "common/layout-empty"; - - $request = Registry::get('request'); - $db = Registry::get('db'); - - $this->load->model('search/search'); - $this->load->model('search/message'); - - $this->load->model('user/user'); - - $this->document->title = $this->data['text_message']; - - $this->data['id'] = @$this->request->get['id']; - - if(HOLD_EMAIL == 1) { - AUDIT(ACTION_UNAUTHORIZED_REMOVE_MESSAGE, '', '', $this->data['id'], ''); - die("not authorized to remove id: " . $this->data['id']); - } - - - if(!verify_piler_id($this->data['id'])) { - AUDIT(ACTION_UNKNOWN, '', '', $this->data['id'], 'unknown piler id: ' . $this->data['id']); - die("invalid id: " . $this->data['id']); - } - - if(Registry::get('admin_user') == 0) { - AUDIT(ACTION_UNAUTHORIZED_REMOVE_MESSAGE, '', '', $this->data['id'], ''); - die("no permission for " . $this->data['id']); - } - - - AUDIT(ACTION_REMOVE_MESSAGE, '', '', $this->data['id'], ''); - - - if($this->model_search_search->remove_message($this->data['id']) == 1) { - $this->data['data'] = $this->data['text_marked_for_removal']; - } else { - $this->data['data'] = $this->data['text_failed_to_mark_for_removal']; - AUDIT(ACTION_REMOVE_MESSAGE, '', '', $this->data['id'], 'failed'); - } - - $this->render(); - } - - -} - -?> diff --git a/webui/model/audit/audit.php b/webui/model/audit/audit.php index 39f78b67..d7e7f0b7 100644 --- a/webui/model/audit/audit.php +++ b/webui/model/audit/audit.php @@ -29,15 +29,15 @@ class ModelAuditAudit extends Model { } if(isset($data['ipaddr'])) { - $where .= " AND ipaddr IN (" . $this->append_search_criteria($data['ipaddr'], &$arr) . ")"; + $where .= " AND ipaddr IN (" . $this->append_search_criteria($data['ipaddr'], $arr) . ")"; } if(isset($data['user'])) { - $where .= " AND email IN (" . $this->append_search_criteria($data['user'], &$arr) . ")"; + $where .= " AND email IN (" . $this->append_search_criteria($data['user'], $arr) . ")"; } if(isset($data['ref'])) { - $where .= " AND ref IN (" . $this->append_search_criteria($data['ref'], &$arr) . ")"; + $where .= " AND ref IN (" . $this->append_search_criteria($data['ref'], $arr) . ")"; } @@ -98,7 +98,7 @@ class ModelAuditAudit extends Model { } - private function append_search_criteria($s = '', $arr = array()) { + private function append_search_criteria($s = '', &$arr = array()) { $q = ""; $a = explode("*", $s); diff --git a/webui/view/theme/default/templates/message/remove.tpl b/webui/view/theme/default/templates/message/remove.tpl deleted file mode 100644 index 06d618ad..00000000 --- a/webui/view/theme/default/templates/message/remove.tpl +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - -
- -

- | - | - | - -

- -

- -
- - -