diff options
author | z0rglub <z0rglub@piwigo.org> | 2004-07-09 21:00:00 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2004-07-09 21:00:00 +0000 |
commit | f007a28bf6a40632e06f227a59f45d525136f9f4 (patch) | |
tree | 485c61ab3eb812b1807bd0d40ee682964dd59d1d /include | |
parent | 2cf37f308e0d530fa642b016dfb4a0db24b5a883 (diff) |
replacement of short_period and long_period by recent_period
git-svn-id: http://piwigo.org/svn/trunk@452 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/category_recent_cats.inc.php | 4 | ||||
-rw-r--r-- | include/functions_user.inc.php | 3 | ||||
-rw-r--r-- | include/htmlfunctions.inc.php | 14 | ||||
-rw-r--r-- | include/user.inc.php | 4 |
4 files changed, 8 insertions, 17 deletions
diff --git a/include/category_recent_cats.inc.php b/include/category_recent_cats.inc.php index 3bfc1f524..c91a738fa 100644 --- a/include/category_recent_cats.inc.php +++ b/include/category_recent_cats.inc.php @@ -38,7 +38,7 @@ $query = ' SELECT id AS category_id FROM '.CATEGORIES_TABLE.' WHERE date_last > SUBDATE(CURRENT_DATE - ,INTERVAL '.$user['short_period'].' DAY)'; + ,INTERVAL '.$user['recent_period'].' DAY)'; if ( $user['forbidden_categories'] != '' ) { $query.= ' @@ -70,7 +70,7 @@ SELECT id,file,tn_ext,storage_category_id FROM '.IMAGES_TABLE.', '.IMAGE_CATEGORY_TABLE.' WHERE category_id = '.$row['category_id'].' AND date_available > SUBDATE(CURRENT_DATE - ,INTERVAL '.$user['short_period'].' DAY) + ,INTERVAL '.$user['recent_period'].' DAY) AND id = image_id ORDER BY RAND() LIMIT 0,1 diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index 983d7e82e..0e1f8a628 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -84,8 +84,7 @@ function register_user( $login, $password, $password_conf, // 1. retrieving default values, the ones of the user "guest" $infos = array( 'nb_image_line', 'nb_line_page', 'language', 'maxwidth', 'maxheight', 'expand', 'show_nb_comments', - 'short_period', 'long_period', 'template', - 'forbidden_categories' ); + 'recent_period', 'template', 'forbidden_categories' ); $query = 'SELECT '; for ( $i = 0; $i < sizeof( $infos ); $i++ ) { diff --git a/include/htmlfunctions.inc.php b/include/htmlfunctions.inc.php index 3c6046c99..a63b44f40 100644 --- a/include/htmlfunctions.inc.php +++ b/include/htmlfunctions.inc.php @@ -36,19 +36,11 @@ function get_icon( $date ) $day_in_seconds = 24*60*60; $output = ''; $title = $lang['recent_image'].' '; - if ( $diff < $user['long_period'] * $day_in_seconds ) + if ( $diff < $user['recent_period'] * $day_in_seconds ) { $icon_url = './template/'.$user['template'].'/theme/'; - if ( $diff < $user['short_period'] * $day_in_seconds ) - { - $icon_url.= 'new_short.gif'; - $title .= $user['short_period']; - } - else - { - $icon_url.= 'new_long.gif'; - $title .= $user['long_period']; - } + $icon_url.= 'recent.gif'; + $title .= $user['recent_period']; $title .= ' '.$lang['days']; $size = getimagesize( $icon_url ); $output = '<img title="'.$title.'" src="'.$icon_url.'" style="border:0;'; diff --git a/include/user.inc.php b/include/user.inc.php index a02c50785..65222f3f6 100644 --- a/include/user.inc.php +++ b/include/user.inc.php @@ -32,8 +32,8 @@ // status --> $user['status'] $infos = array( 'id', 'username', 'mail_address', 'nb_image_line', 'nb_line_page', 'status', 'language', 'maxwidth', - 'maxheight', 'expand', 'show_nb_comments', 'short_period', - 'long_period', 'template', 'forbidden_categories' ); + 'maxheight', 'expand', 'show_nb_comments', 'recent_period', + 'template', 'forbidden_categories' ); $query_user = 'SELECT '.implode( ',', $infos ); $query_user.= ' FROM '.USERS_TABLE; |