[geeklog-hg] geeklog: Fixed references an undefined variable
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Nov 19 06:33:03 EST 2013
changeset 9339:624954c7d042
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/624954c7d042
user: dengen <taharaxp at gmail.com>
date: Tue Nov 19 20:31:42 2013 +0900
description:
Fixed references an undefined variable
diffstat:
system/classes/story.class.php | 4 +---
system/lib-security.php | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diffs (40 lines):
diff -r ce6db9890a02 -r 624954c7d042 system/classes/story.class.php
--- a/system/classes/story.class.php Sun Nov 17 09:36:05 2013 +0100
+++ b/system/classes/story.class.php Tue Nov 19 20:31:42 2013 +0900
@@ -397,8 +397,6 @@
*/
function loadFromArray($story)
{
- global $_USER;
-
/* Use the magic cheat array to quickly reload the whole story
* from the database result array, doing the quick stripslashes.
*/
@@ -457,6 +455,7 @@
$sid = DB_escapeString(COM_applyFilter($sid));
+ $sql = array();
if (!empty($sid) && (($mode == 'edit') || ($mode == 'view') || ($mode == 'clone'))) {
if (empty($topic)) {
$topic_sql = ' AND ta.tdefault = 1';
@@ -464,7 +463,6 @@
$topic_sql = " AND ta.tid = '{$topic}'";
}
- $sql = array();
/* Original
$sql['mysql'] = "SELECT STRAIGHT_JOIN s.*, UNIX_TIMESTAMP(s.date) AS unixdate, UNIX_TIMESTAMP(s.expire) AS expireunix, UNIX_TIMESTAMP(s.comment_expire) AS cmt_expire_unix, "
. "u.username, u.fullname, u.photo, u.email, t.topic, t.imageurl " . "FROM {$_TABLES['stories']} AS s, {$_TABLES['users']} AS u, {$_TABLES['topics']} AS t " . "WHERE (s.uid = u.uid) AND (s.tid = t.tid) AND (sid = '$sid')";
diff -r ce6db9890a02 -r 624954c7d042 system/lib-security.php
--- a/system/lib-security.php Sun Nov 17 09:36:05 2013 +0100
+++ b/system/lib-security.php Tue Nov 19 20:31:42 2013 +0900
@@ -568,7 +568,7 @@
}
}
- if ((empty ($_USER['uid']) && ($uid == 1)) || ($uid == $_USER['uid'])) {
+ if ((empty ($_USER['uid']) && ($uid == 1)) || (!empty ($_USER['uid']) && ($uid == $_USER['uid']))) {
if (empty ($_GROUPS)) {
$_GROUPS = SEC_getUserGroups ($uid);
}
More information about the geeklog-cvs
mailing list