From 4c6da2f1aacde08c00dc6f1b2243070a3634fca4 Mon Sep 17 00:00:00 2001 From: IMRAN HASSAN Date: Thu, 27 Mar 2014 05:45:41 +0000 Subject: [PATCH] Update function for user --- upload/includes/functions_actions.php | 15 +++++++++++++++ upload/includes/functions_user.php | 7 +++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/upload/includes/functions_actions.php b/upload/includes/functions_actions.php index b3d24030..88937858 100644 --- a/upload/includes/functions_actions.php +++ b/upload/includes/functions_actions.php @@ -99,4 +99,19 @@ function cb_get_actions($place,$scope=array('global')) } } +/** + * Function used to count total notifications + */ + function count_total_notification($item=false) + { + global $db; + $type = $this->type; + $results = $db->count(tbl('notifications'),"*"); + echo $db->query; + if($db->num_rows>0) + return $results; + else + return false; + } + ?> \ No newline at end of file diff --git a/upload/includes/functions_user.php b/upload/includes/functions_user.php index 4ab34ed1..7eeb72d8 100644 --- a/upload/includes/functions_user.php +++ b/upload/includes/functions_user.php @@ -7,9 +7,11 @@ * To change this template use File | Settings | File Templates. */ -function get_user_fields() { +function get_user_fields($array=NULL) { + global $cb_columns; return $cb_columns->object( 'users' )->get_columns(); + } @@ -36,4 +38,5 @@ function name($user_array) if(!$name) $name = $user['username']; return $name; -} \ No newline at end of file +} +