diff options
-rw-r--r-- | include/config.php | 6 | ||||
-rw-r--r-- | mod/display.php | 4 | ||||
-rw-r--r-- | mod/search.php | 2 | ||||
-rw-r--r-- | version.inc | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/include/config.php b/include/config.php index 5b74f6292..7d2dbdcc7 100644 --- a/include/config.php +++ b/include/config.php @@ -114,6 +114,9 @@ function del_config($family,$key) { function load_pconfig($uid,$family = '') { global $a; + if($uid === false) + return false; + if(! array_key_exists($uid,$a->config)) $a->config[$uid] = array(); if(($family) && (! array_key_exists($family,$a->config[$uid]))) @@ -151,6 +154,9 @@ function get_pconfig($uid,$family, $key, $instore = false) { global $a; + if($uid === false) + return false; + if(! array_key_exists($uid,$a->config)) load_pconfig($uid); diff --git a/mod/display.php b/mod/display.php index b1ae54df3..110dd1807 100644 --- a/mod/display.php +++ b/mod/display.php @@ -59,7 +59,7 @@ function display_content(&$a, $update = 0, $load = false) { $o .= '<div id="live-display"></div>' . "\r\n"; - $o .= "<script> var profile_uid = " . intval(local_user()) + $o .= "<script> var profile_uid = " . ((intval(local_user())) ? local_user() : (-1)) . "; var netargs = '?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n"; $a->page['htmlhead'] .= replace_macros(get_markup_template("build_query.tpl"),array( @@ -152,7 +152,7 @@ function display_content(&$a, $update = 0, $load = false) { - $o .= conversation($a,$items,'display', $update, 'client'); + $o .= conversation($a, $items, 'display', $update, 'client'); if($updateable) { $x = q("UPDATE item SET item_flags = ( item_flags ^ %d ) diff --git a/mod/search.php b/mod/search.php index 4e093d865..3129e84b4 100644 --- a/mod/search.php +++ b/mod/search.php @@ -153,7 +153,7 @@ function search_content(&$a,$update = 0, $load = false) { // because browser prefetching might change it on us. We have to deliver it with the page. $o .= '<div id="live-search"></div>' . "\r\n"; - $o .= "<script> var profile_uid = " . intval(local_user()) + $o .= "<script> var profile_uid = " . ((intval(local_user())) ? local_user() : (-1)) . "; var netargs = '?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n"; $a->page['htmlhead'] .= replace_macros(get_markup_template("build_query.tpl"),array( diff --git a/version.inc b/version.inc index b7f186fad..7817365d1 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2013-06-17.347 +2013-06-18.348 |