aboutsummaryrefslogtreecommitdiffstats
path: root/include/picture_comment.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2009-02-14 02:24:10 +0000
committerrvelices <rv-github@modusoptimus.com>2009-02-14 02:24:10 +0000
commit6c92ade174238e18ed22f6f95234ab9604e3b445 (patch)
tree51f2748c50cee6e5ceb1198fbdfaf1545911b1fc /include/picture_comment.inc.php
parent290f2c1d39d1c47d48ba4e6a6d347459975e8b0f (diff)
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) git-svn-id: http://piwigo.org/svn/trunk@3145 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/picture_comment.inc.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php
index eb2cd710b..73b245b6b 100644
--- a/include/picture_comment.inc.php
+++ b/include/picture_comment.inc.php
@@ -88,11 +88,11 @@ elseif ( isset($_POST['content']) )
if ($page['show_comments'])
{
- // number of comment for this picture
- $query = 'SELECT COUNT(*) AS nb_comments';
- $query.= ' FROM '.COMMENTS_TABLE.' WHERE image_id = '.$page['image_id'];
- $query.= " AND validated = 'true'";
- $query.= ';';
+ // number of comments for this picture
+ $query = '
+SELECT COUNT(*) AS nb_comments
+ FROM '.COMMENTS_TABLE.'
+ WHERE image_id='.$page['image_id']." AND validated = 'true'";
$row = mysql_fetch_array( pwg_query( $query ) );
// navigation bar creation
@@ -160,7 +160,6 @@ SELECT id,author,date,image_id,content
if (!is_a_guest()
or (is_a_guest() and $conf['comments_forall']))
{
- include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
$key = get_comment_post_key($page['image_id']);
$content = '';
if ('reject'===@$comment_action)