aboutsummaryrefslogtreecommitdiffstats
path: root/comments.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2014-02-16 07:39:19 +0000
committerrvelices <rv-github@modusoptimus.com>2014-02-16 07:39:19 +0000
commit656ac54090c1cc516955c59ac752bf99ac7abf6f (patch)
tree551b78c5de2fd46cd5fd8b0fd5b3dd451ac069e9 /comments.php
parent09764af8ff3b54aa47ab3dd9da00fab2279f3dc5 (diff)
more query2array and remove unnecessary tests in often called url functions
git-svn-id: http://piwigo.org/svn/trunk@27388 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--comments.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/comments.php b/comments.php
index a41e0c57a..9230d41ca 100644
--- a/comments.php
+++ b/comments.php
@@ -69,7 +69,7 @@ if (!in_array($conf['comments_page_nb_comments'], $items_number))
$items_number_new[] = $conf['comments_page_nb_comments'];
$is_inserted = true;
}
-
+
$items_number_new[] = $number;
}
@@ -88,7 +88,7 @@ $since_options = array(
4 => array('label' => l10n('the beginning'),
'clause' => '1=1') // stupid but generic
);
-
+
trigger_action('loc_begin_comments');
if (!empty($_GET['since']) && is_numeric($_GET['since']))
@@ -265,7 +265,7 @@ if (isset($action))
),
$_POST['key']
);
-
+
switch ($comment_action)
{
case 'moderate':
@@ -281,7 +281,7 @@ if (isset($action))
trigger_error('Invalid comment action '.$comment_action, E_USER_WARNING);
}
}
-
+
$edit_comment = $_GET['edit'];
}
@@ -437,13 +437,13 @@ SELECT *
FROM '.IMAGES_TABLE.'
WHERE id IN ('.implode(',', $element_ids).')
;';
- $elements = hash_from_query($query, 'id');
+ $elements = query2array($query, 'id');
// retrieving category informations
- $query = 'SELECT id, name, permalink, uppercats
+ $query = 'SELECT id, name, permalink, uppercats
FROM '.CATEGORIES_TABLE.'
WHERE id IN ('.implode(',', $category_ids).')';
- $categories = hash_from_query($query, 'id');
+ $categories = query2array($query, 'id');
foreach ($comments as $comment)
{
@@ -467,7 +467,7 @@ SELECT *
'image_file' => $elements[$comment['image_id']]['file'],
)
);
-
+
$email = null;
if (!empty($comment['user_email']))
{
@@ -488,7 +488,7 @@ SELECT *
'DATE'=>format_date($comment['date'], true),
'CONTENT'=>trigger_event('render_comment_content',$comment['content']),
);
-
+
if (is_admin())
{
$tpl_comment['EMAIL'] = $email;