aboutsummaryrefslogtreecommitdiffstats
path: root/include/ws_functions.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2009-02-14 02:28:21 +0000
committerrvelices <rv-github@modusoptimus.com>2009-02-14 02:28:21 +0000
commit368059d5353209ddad495081bc9d5d9218a9de23 (patch)
tree18c0de692f0102d0275b254f82756a3fa00c4e7f /include/ws_functions.inc.php
parent35e9af66be0b6da3055d032123bd38100b58bca9 (diff)
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) git-svn-id: http://piwigo.org/svn/branches/2.0@3147 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/ws_functions.inc.php')
-rw-r--r--include/ws_functions.inc.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index fd87ef02e..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',
@@ -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;