Ignore:
Timestamp:
Feb 14, 2009, 3:28:21 AM (16 years ago)
Author:
rvelices
Message:

merge 3145-3146 from trunk
Last (I hope) paranoic optims ...

  • move get_uysername and get_groupname from public to admin/functions.inc.php
  • optim in index.php
  • tags.tpl does not need smarty modifier included
  • move func get_comment_post_key from functions_comment to functions (avoid extra inclusion every time on picture page)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/include/picture_comment.inc.php

    r3123 r3147  
    8989if ($page['show_comments'])
    9090{
    91   // number of comment for this picture
    92   $query = 'SELECT COUNT(*) AS nb_comments';
    93   $query.= ' FROM '.COMMENTS_TABLE.' WHERE image_id = '.$page['image_id'];
    94   $query.= " AND validated = 'true'";
    95   $query.= ';';
     91  // number of comments for this picture
     92  $query = '
     93SELECT COUNT(*) AS nb_comments
     94  FROM '.COMMENTS_TABLE.'
     95  WHERE image_id='.$page['image_id']." AND validated = 'true'";
    9696  $row = mysql_fetch_array( pwg_query( $query ) );
    9797
     
    161161      or (is_a_guest() and $conf['comments_forall']))
    162162  {
    163     include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
    164163    $key = get_comment_post_key($page['image_id']);
    165164    $content = '';
Note: See TracChangeset for help on using the changeset viewer.