aboutsummaryrefslogtreecommitdiffstats
path: root/include/ws_functions.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/ws_functions.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/ws_functions.inc.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index 26323b736..a85fa2e4b 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -522,8 +522,6 @@ SELECT DISTINCT image_id
return new PwgError(WS_ERR_INVALID_PARAM, "Invalid image_id");
}
- include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
-
$comm = array(
'author' => trim( stripslashes($params['author']) ),
'content' => trim( stripslashes($params['content']) ),
@@ -702,7 +700,6 @@ SELECT id, date, author, content
)
)
{
- include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
$comment_post_data['author'] = $user['username'];
$comment_post_data['key'] = get_comment_post_key($params['image_id']);
}
@@ -1041,15 +1038,15 @@ SELECT
{
// last chance to make the directory writable
@chmod($high_dir, 0777);
-
+
if (!is_writable($high_dir))
{
return new PwgError(500, 'high directory has no write access');
}
}
-
+
secure_directory($high_dir);
-
+
// high resolution path, same name as web size file
$high_path = sprintf(
'%s/%s.%s',
@@ -1482,7 +1479,7 @@ function ws_images_setInfo($params, &$service)
// file_sum
// thumbnail_content
// thumbnail_sum
-
+
$params['image_id'] = (int)$params['image_id'];
if ($params['image_id'] <= 0)
{
@@ -1536,7 +1533,7 @@ SELECT *
array($update)
);
}
-
+
if (isset($params['categories']))
{
ws_add_image_category_relations(
@@ -1617,7 +1614,7 @@ SELECT
{
$current_rank_of[$cat_id] = 0;
}
-
+
if ('auto' == $rank_on_category[$cat_id])
{
$rank_on_category[$cat_id] = $current_rank_of[$cat_id] + 1;