mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-07-28 03:45:01 +02:00
gui improvements
This commit is contained in:
@@ -90,9 +90,9 @@ class ModelHealthHealth extends Model {
|
||||
if(isset($p[5]) && in_array($p[5], $partitions)) {
|
||||
$shortinfo[] = array(
|
||||
'partition' => $p[5],
|
||||
'freespace' => nice_size(1000*$p[3]),
|
||||
'total' => nice_size(1000*$p[1]),
|
||||
'used' => nice_size(1000*$p[2]),
|
||||
'freespace' => $p[3],
|
||||
'total' => $p[1],
|
||||
'used' => $p[2],
|
||||
'utilization' => preg_replace("/\%/", "", $p[4])
|
||||
);
|
||||
}
|
||||
|
@@ -142,6 +142,8 @@ class ModelSaasCustomer extends Model
|
||||
|
||||
|
||||
public function get_online_users() {
|
||||
$query = $this->db->query("DELETE FROM " . TABLE_ONLINE . " WHERE last_activity < ?", array(NOW - 3600));
|
||||
|
||||
$query = $this->db->query("SELECT * FROM " . TABLE_ONLINE . " ORDER BY username ASC");
|
||||
|
||||
return $query->rows;
|
||||
|
@@ -269,7 +269,7 @@ class ModelSearchSearch extends Model {
|
||||
$data['any'] = $this->fixup_sphinx_operators($data['any']);
|
||||
$data['any'] = $this->fix_email_address_for_sphinx($data['any']);
|
||||
$fields = '';
|
||||
if($match) { $match = "($match) & "; $fields = '@subject,@body '; } $match .= "($fields " . $data['any'] . ") ";
|
||||
if($match) { $match = "($match) & "; } $match .= "(@subject " . $data['any'] . " | @body " . $data['any'] . ") ";
|
||||
}
|
||||
|
||||
|
||||
@@ -759,7 +759,7 @@ class ModelSearchSearch extends Model {
|
||||
|
||||
public function get_search_terms() {
|
||||
|
||||
$query = $this->db->query("SELECT term FROM " . TABLE_SEARCH . " WHERE email=? ORDER BY ts DESC", array($_SESSION['email']));
|
||||
$query = $this->db->query("SELECT term, ts FROM " . TABLE_SEARCH . " WHERE email=? ORDER BY ts DESC", array($_SESSION['email']));
|
||||
if(isset($query->rows)) { return $query->rows; }
|
||||
|
||||
return array();
|
||||
@@ -792,8 +792,8 @@ class ModelSearchSearch extends Model {
|
||||
}
|
||||
|
||||
|
||||
public function remove_search_terms() {
|
||||
$query = $this->db->query("DELETE FROM " . TABLE_SEARCH . " WHERE email=?", array($_SESSION['email']));
|
||||
public function remove_search_term($ts = 0) {
|
||||
$query = $this->db->query("DELETE FROM " . TABLE_SEARCH . " WHERE email=? AND ts=?", array($_SESSION['email'], $ts));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user