mirror of
https://bitbucket.org/jsuto/piler.git
synced 2026-10-01 12:50:20 +02:00
added indexer stat to health page
This commit is contained in:
1 parent
8d201ed50a
commit
2a8c13d774
16 files changed
+221
-2
No files matched your search
@@ -198,6 +198,23 @@ class ModelHealthHealth extends Model {
|
||||
return $dirSize;
|
||||
}
|
||||
|
||||
|
||||
public function indexer_stat() {
|
||||
$data = array('', '');
|
||||
|
||||
if(file_exists(INDEXER_BEACON)) {
|
||||
|
||||
$st = stat(INDEXER_BEACON);
|
||||
$t1 = date(DATE_TEMPLATE . " H:i", $st['mtime']);
|
||||
$t2 = date(DATE_TEMPLATE . " H:i", $st['mtime']+30*60);
|
||||
|
||||
$data = array($t1, $t2);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ class ModelSaasCustomer extends Model
|
||||
$query = $this->db->query("INSERT INTO " . TABLE_ONLINE . " (username, ts, last_activity, ipaddr) VALUES(?,?,?,?)", array($username, NOW, NOW, $_SERVER['REMOTE_ADDR']));
|
||||
|
||||
if($this->db->countAffected() == 0) {
|
||||
$query = $this->db->query("UPDATE " . TABLE_ONLINE . " SET ts=?, last_activity=? WHERE username=? AND ipaddr=?", array(NOW, $username, $_SERVER['REMOTE_ADDR']));
|
||||
$query = $this->db->query("UPDATE " . TABLE_ONLINE . " SET ts=?, last_activity=? WHERE username=? AND ipaddr=?", array(NOW, NOW, $username, $_SERVER['REMOTE_ADDR']));
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
@@ -130,7 +130,7 @@ class ModelUserAuth extends Model {
|
||||
if($ldap_auditor_member_dn == '') { return 0; }
|
||||
|
||||
foreach($e as $a) {
|
||||
foreach (array("memberof") as $memberattr) {
|
||||
foreach (array("memberof", "dn") as $memberattr) {
|
||||
if(isset($a[$memberattr])) {
|
||||
|
||||
if(isset($a[$memberattr]['count'])) {
|
||||
|
||||
Reference in new issue
Block a user