mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-13 06:27:03 +02:00
improved the private feature
This commit is contained in:
@ -879,6 +879,15 @@ class ModelSearchMessage extends Model {
|
||||
}
|
||||
|
||||
|
||||
public function unmark_as_private($id = 0) {
|
||||
if($id > 0) {
|
||||
$query = $this->db->query("DELETE FROM " . TABLE_PRIVATE . " WHERE id=?", array($id));
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
public function get_message_tag($id = '', $uid = 0) {
|
||||
if($id == '' || $uid <= 0) { return ''; }
|
||||
|
||||
@ -946,6 +955,15 @@ class ModelSearchMessage extends Model {
|
||||
}
|
||||
|
||||
|
||||
public function get_message_private($id = 0) {
|
||||
if($id == 0) { return 0; }
|
||||
|
||||
$query = $this->db->query("SELECT `id` FROM " . TABLE_PRIVATE . " WHERE id=?", array($id));
|
||||
|
||||
if(isset($query->row['id'])) { return 1; }
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user