From 889b1240cd81511850ea8ad900cb941e35308b52 Mon Sep 17 00:00:00 2001 From: volcom Date: Mon, 17 Oct 2005 07:21:30 +0000 Subject: * new: history details by month,day git-svn-id: http://piwigo.org/svn/trunk@894 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/config_default.inc.php | 11 +++++++++++ include/functions.inc.php | 3 +++ 2 files changed, 14 insertions(+) (limited to 'include') diff --git a/include/config_default.inc.php b/include/config_default.inc.php index e0c047f42..b6854946a 100644 --- a/include/config_default.inc.php +++ b/include/config_default.inc.php @@ -359,4 +359,15 @@ $conf['upload_maxheight_thumbnail'] = 100; // upload_maxwidth_thumbnail: maximum width authorized for the uploaded // thumbnails $conf['upload_maxwidth_thumbnail'] = 150; + +// +-----------------------------------------------------------------------+ +// | history | +// +-----------------------------------------------------------------------+ + +// nb_logs_page : how many logs to display on a page +$conf['nb_logs_page'] = 300; + +// history__admin : history admin visits ? +$conf['history_admin'] = false; + ?> diff --git a/include/functions.inc.php b/include/functions.inc.php index 0c4e462e9..261260b16 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -354,6 +354,8 @@ function pwg_log( $file, $category, $picture = '' ) if ($conf['log']) { + if ( ($conf['history_admin'] ) or ( (! $conf['history_admin']) and ($user['status'] != 'admin') ) ) + { $login = ($user['id'] == $conf['guest_id']) ? 'guest' : addslashes($user['username']); @@ -370,6 +372,7 @@ INSERT INTO '.HISTORY_TABLE.' ;'; pwg_query($query); } + } } // format_date returns a formatted date for display. The date given in -- cgit v1.2.3