aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin <robin@Amaya.(none)>2010-05-22 23:26:40 +0200
committerRobin <robin@Amaya.(none)>2010-05-22 23:26:40 +0200
commitf83b38738564c18fdeec1dd5ab4a905240de6f26 (patch)
treec337e220f323429d2a303c8a24caef903db2fbaa
parent7b08854f705ff56ac041ad8baaeec85e0e7189d0 (diff)
downloadnextcloud-server-f83b38738564c18fdeec1dd5ab4a905240de6f26.tar.gz
nextcloud-server-f83b38738564c18fdeec1dd5ab4a905240de6f26.zip
when not admin, only show logs of the current user
-rwxr-xr-xadmin/index.php~1
-rwxr-xr-xinc/lib_log.php9
2 files changed, 7 insertions, 3 deletions
diff --git a/admin/index.php~ b/admin/index.php~
deleted file mode 100755
index 8d1c8b69c3f..00000000000
--- a/admin/index.php~
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/inc/lib_log.php b/inc/lib_log.php
index 5e47c4ee162..3e0d3d16092 100755
--- a/inc/lib_log.php
+++ b/inc/lib_log.php
@@ -60,8 +60,13 @@ class OC_LOG {
public static function show(){
global $CONFIG_DATEFORMAT;
echo('<div class="center"><table cellpadding="6" cellspacing="0" border="0" class="log">');
-
- $result = OC_DB::select('select timestamp,user,type,message from log order by timestamp desc limit 20');
+
+ if(OC_USER::ingroup($_SESSION['username_clean'],'admin')){
+ $result = OC_DB::select('select timestamp,user,type,message from log order by timestamp desc limit 20');
+ }else{
+ $user=$_SESSION['username_clean'];
+ $result = OC_DB::select('select timestamp,user,type,message from log where user=\''.$user.'\' order by timestamp desc limit 20');
+ }
foreach($result as $entry){
echo('<tr class="browserline">');
echo('<td class="sizetext">'.date($CONFIG_DATEFORMAT,$entry['timestamp']).'</td>');