Changeset 868


Ignore:
Timestamp:
09/18/05 23:56:56 (15 years ago)
Author:
plg
Message:
  • 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.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/stats.php

    r775 r868  
    8181  if (isset($_GET['month']) && isset($_GET['year']) ) 
    8282  { 
    83     $where_clause = "DATE_FORMAT(date,'%Y-%m-%d') = '".$row['d']."'"; 
    84     $value = substr($row['d'],8,2); 
     83    $where_clause = 'DAYOFMONTH(date) = '.$row['d'].' 
     84    AND MONTH(date) = '.$row['m'].' 
     85    AND YEAR(date) = '.$row['y']; 
     86    $week_day = $lang['day'][date('w', mktime(12,0,0,$row['m'],$row['d'],$row['y']))]; 
     87    $value = $row['d'].' ('.$week_day.')'; 
    8588  } 
    8689  else 
     
    98101  // Number of pictures seen 
    99102  $query = ' 
    100 SELECT COUNT(*) as p, 
    101     FILE as f 
     103SELECT COUNT(*) as p 
    102104    FROM '.HISTORY_TABLE.'  
    103105    WHERE '.$where_clause.' 
    104106    AND FILE = \'picture\' 
    105     GROUP BY FILE 
    106107;'; 
    107108  $pictures = mysql_fetch_array(pwg_query( $query )); 
  • trunk/doc/ChangeLog

    r867 r868  
    112005-09-18 Pierrick LE GALL 
    22 
    3         * bug 101 fixed: correction reported from branch 1.4 
     3        * bug 107 fixed: crash when logging visit on a category containing 
     4        "'" character. Correction reported from branch 1.4 
     5 
     6        * bug fixed: in admin/stats, incorrect SQL queries gave no result. 
     7 
     82005-09-18 Pierrick LE GALL 
     9 
     10        * bug 101 fixed: "problem with IE search on keywords". correction 
     11        reported from branch 1.4 
    412 
    5132005-09-17 Pierrick LE GALL 
  • trunk/include/functions.inc.php

    r862 r868  
    360360  VALUES 
    361361  (NOW(), 
    362   \''.(($user['id'] == 2) ? 'guest' : $user['username']).'\', 
     362  \''.(($user['id'] == 2) ? 'guest' : addslashes($user['username'])).'\', 
    363363  \''.$_SERVER['REMOTE_ADDR'].'\', 
    364   \''.$file.'\', 
    365   \''.$category.'\', 
    366   \''.$picture.'\') 
     364  \''.addslashes($file).'\', 
     365  \''.addslashes($category).'\', 
     366  \''.addslashes($picture).'\') 
    367367;'; 
    368368    pwg_query($query); 
  • trunk/language/en_UK.iso-8859-1/admin.lang.php

    r862 r868  
    334334$lang['users'] = 'Users'; 
    335335$lang['visitors'] = 'Visitors'; 
    336 $lang['w_day'] = 'w_day'; 
     336$lang['w_day'] = 'Day'; 
    337337$lang['waiting'] = 'Waiting'; 
    338338?> 
  • trunk/language/fr_FR.iso-8859-1/admin.lang.php

    r863 r868  
    332332$lang['users'] = 'Utilisateurs'; 
    333333$lang['visitors'] = 'Visiteurs'; 
    334 $lang['w_day'] = 'jour de la semaine'; 
     334$lang['w_day'] = 'Jour'; 
    335335$lang['waiting'] = 'En attente'; 
    336336?> 
  • trunk/template/yoga/admin/stats.tpl

    r859 r868  
    33 
    44<h3>{L_STAT_TITLE}</h3> 
    5 <img class="image" src="{IMG_MONTHLY_REPORT}" alt="{L_STAT_MONTHLY_ALT}" /> 
     5<img class="image" src="{IMG_REPORT}" alt="{L_STAT_MONTHLY_ALT}" /> 
     6 
    67<h3>{L_STAT_MONTH_TITLE}</h3> 
    7 <!-- TODO : center the table ??? --> 
    88<table class="table2" width="60%"> 
    99<tr class="throw"> 
    10     <th>{L_MONTH}</th> 
    11         <th>{L_PAGES_SEEN}</th> 
     10    <th>{L_VALUE}</th> 
     11    <th>{L_PAGES_SEEN}</th> 
    1212    <th>{L_VISITORS}</th> 
    1313    <th>{L_PICTURES}</th> 
    1414</tr> 
    15 <!-- BEGIN month --> 
    16   <tr class="{month.T_CLASS}"> 
    17     <td>{month.MONTH}</td> 
    18     <td>{month.PAGES}</td> 
    19     <td>{month.VISITORS}</td> 
    20         <td>{month.IMAGES}</td> 
     15<!-- BEGIN statrow --> 
     16  <tr class="{statrow.T_CLASS}"> 
     17    <td>{statrow.VALUE}</td> 
     18    <td>{statrow.PAGES}</td> 
     19    <td>{statrow.VISITORS}</td> 
     20    <td>{statrow.IMAGES}</td> 
    2121  </tr> 
    22 <!-- END month --> 
     22<!-- END statrow --> 
    2323</table> 
    24 <br /> 
Note: See TracChangeset for help on using the changeset viewer.