mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 07:30:12 +01:00
minor bugfixes
This commit is contained in:
parent
987d27856a
commit
ee7a51f1dd
@ -11,7 +11,7 @@
|
||||
|
||||
#define PROGNAME "piler"
|
||||
|
||||
#define VERSION "0.1.17"
|
||||
#define VERSION "0.1.17.1"
|
||||
|
||||
#define PROGINFO VERSION ", Janos SUTO <sj@acts.hu>\n\n" CONFIGURE_PARAMS "\n"
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -1,57 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ControllerMessageRemove extends Controller {
|
||||
|
||||
public function index(){
|
||||
|
||||
$this->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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -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);
|
||||
|
@ -1,22 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="/view/theme/default/stylesheet/style-<?php print THEME; ?>.css" />
|
||||
</head>
|
||||
|
||||
<body style="background: white;">
|
||||
|
||||
<div id="messagepopup">
|
||||
|
||||
<p>
|
||||
<a class="messagelink" href="/index.php?route=message/download&id=<?php print $id; ?>"><?php print $text_download_message; ?></a> |
|
||||
<a class="messagelink" href="/index.php?route=message/restore&id=<?php print $id; ?>"><?php print $text_restore_to_mailbox; ?></a> |
|
||||
<a class="messagelink" href="/message.php/<?php print $id; ?>"><?php print $text_view_message; ?></a> |
|
||||
<a class="messagelink" href="/index.php?route=message/headers&id=<?php print $id; ?>"><?php print $text_view_headers; ?></a>
|
||||
</p>
|
||||
|
||||
<p><?php print $data; ?></p>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user