mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
- bug 107 fixed: crash when logging visit on a category containing "'"
character. Correction reported from branch 1.4 - bug fixed: in admin/stats, incorrect SQL queries gave no result. git-svn-id: http://piwigo.org/svn/trunk@868 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -80,8 +80,11 @@ while ( $row = mysql_fetch_array( $result ) )
|
||||
$value = '';
|
||||
if (isset($_GET['month']) && isset($_GET['year']) )
|
||||
{
|
||||
$where_clause = "DATE_FORMAT(date,'%Y-%m-%d') = '".$row['d']."'";
|
||||
$value = substr($row['d'],8,2);
|
||||
$where_clause = 'DAYOFMONTH(date) = '.$row['d'].'
|
||||
AND MONTH(date) = '.$row['m'].'
|
||||
AND YEAR(date) = '.$row['y'];
|
||||
$week_day = $lang['day'][date('w', mktime(12,0,0,$row['m'],$row['d'],$row['y']))];
|
||||
$value = $row['d'].' ('.$week_day.')';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -97,12 +100,10 @@ while ( $row = mysql_fetch_array( $result ) )
|
||||
|
||||
// Number of pictures seen
|
||||
$query = '
|
||||
SELECT COUNT(*) as p,
|
||||
FILE as f
|
||||
SELECT COUNT(*) as p
|
||||
FROM '.HISTORY_TABLE.'
|
||||
WHERE '.$where_clause.'
|
||||
AND FILE = \'picture\'
|
||||
GROUP BY FILE
|
||||
;';
|
||||
$pictures = mysql_fetch_array(pwg_query( $query ));
|
||||
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
2005-09-18 Pierrick LE GALL
|
||||
|
||||
* bug 101 fixed: correction reported from branch 1.4
|
||||
* bug 107 fixed: crash when logging visit on a category containing
|
||||
"'" character. Correction reported from branch 1.4
|
||||
|
||||
* bug fixed: in admin/stats, incorrect SQL queries gave no result.
|
||||
|
||||
2005-09-18 Pierrick LE GALL
|
||||
|
||||
* bug 101 fixed: "problem with IE search on keywords". correction
|
||||
reported from branch 1.4
|
||||
|
||||
2005-09-17 Pierrick LE GALL
|
||||
|
||||
|
||||
@@ -359,11 +359,11 @@ INSERT INTO '.HISTORY_TABLE.'
|
||||
(date,login,IP,file,category,picture)
|
||||
VALUES
|
||||
(NOW(),
|
||||
\''.(($user['id'] == 2) ? 'guest' : $user['username']).'\',
|
||||
\''.(($user['id'] == 2) ? 'guest' : addslashes($user['username'])).'\',
|
||||
\''.$_SERVER['REMOTE_ADDR'].'\',
|
||||
\''.$file.'\',
|
||||
\''.$category.'\',
|
||||
\''.$picture.'\')
|
||||
\''.addslashes($file).'\',
|
||||
\''.addslashes($category).'\',
|
||||
\''.addslashes($picture).'\')
|
||||
;';
|
||||
pwg_query($query);
|
||||
}
|
||||
|
||||
@@ -333,6 +333,6 @@ $lang['user_status_guest'] = 'User';
|
||||
$lang['username'] = 'username';
|
||||
$lang['users'] = 'Users';
|
||||
$lang['visitors'] = 'Visitors';
|
||||
$lang['w_day'] = 'w_day';
|
||||
$lang['w_day'] = 'Day';
|
||||
$lang['waiting'] = 'Waiting';
|
||||
?>
|
||||
@@ -331,6 +331,6 @@ $lang['user_status_guest'] = 'Visiteur';
|
||||
$lang['username'] = 'nom utilisateur';
|
||||
$lang['users'] = 'Utilisateurs';
|
||||
$lang['visitors'] = 'Visiteurs';
|
||||
$lang['w_day'] = 'jour de la semaine';
|
||||
$lang['w_day'] = 'Jour';
|
||||
$lang['waiting'] = 'En attente';
|
||||
?>
|
||||
@@ -2,23 +2,22 @@
|
||||
<h2>{lang:title_history}</h2>
|
||||
|
||||
<h3>{L_STAT_TITLE}</h3>
|
||||
<img class="image" src="{IMG_MONTHLY_REPORT}" alt="{L_STAT_MONTHLY_ALT}" />
|
||||
<img class="image" src="{IMG_REPORT}" alt="{L_STAT_MONTHLY_ALT}" />
|
||||
|
||||
<h3>{L_STAT_MONTH_TITLE}</h3>
|
||||
<!-- TODO : center the table ??? -->
|
||||
<table class="table2" width="60%">
|
||||
<tr class="throw">
|
||||
<th>{L_MONTH}</th>
|
||||
<th>{L_PAGES_SEEN}</th>
|
||||
<th>{L_VALUE}</th>
|
||||
<th>{L_PAGES_SEEN}</th>
|
||||
<th>{L_VISITORS}</th>
|
||||
<th>{L_PICTURES}</th>
|
||||
</tr>
|
||||
<!-- BEGIN month -->
|
||||
<tr class="{month.T_CLASS}">
|
||||
<td>{month.MONTH}</td>
|
||||
<td>{month.PAGES}</td>
|
||||
<td>{month.VISITORS}</td>
|
||||
<td>{month.IMAGES}</td>
|
||||
<!-- BEGIN statrow -->
|
||||
<tr class="{statrow.T_CLASS}">
|
||||
<td>{statrow.VALUE}</td>
|
||||
<td>{statrow.PAGES}</td>
|
||||
<td>{statrow.VISITORS}</td>
|
||||
<td>{statrow.IMAGES}</td>
|
||||
</tr>
|
||||
<!-- END month -->
|
||||
<!-- END statrow -->
|
||||
</table>
|
||||
<br />
|
||||
|
||||
Reference in New Issue
Block a user