aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-03-02 03:25:12 -0800
committerFriendika <info@friendika.com>2011-03-02 03:25:12 -0800
commit6480fd73a7c24b939d4b25ffacfdab0c8bb9c930 (patch)
tree9be5b410d243aee37fa71c3524842470a6ff7a1b /include
parentb8740a0a9ce79f10db50835d70b5d7901814f6c1 (diff)
downloadvolse-hubzilla-6480fd73a7c24b939d4b25ffacfdab0c8bb9c930.tar.gz
volse-hubzilla-6480fd73a7c24b939d4b25ffacfdab0c8bb9c930.tar.bz2
volse-hubzilla-6480fd73a7c24b939d4b25ffacfdab0c8bb9c930.zip
units conversion app - needs some styling and code cleanup
Diffstat (limited to 'include')
-rw-r--r--include/dba.php7
-rw-r--r--include/nav.php2
2 files changed, 5 insertions, 4 deletions
diff --git a/include/dba.php b/include/dba.php
index d3da8eae0..b05a1cabf 100644
--- a/include/dba.php
+++ b/include/dba.php
@@ -113,13 +113,14 @@ function printable($s) {
if(! function_exists('dbg')) {
function dbg($state) {
global $db;
+ if($db)
$db->dbg($state);
}}
if(! function_exists('dbesc')) {
function dbesc($str) {
global $db;
- if($db->connected)
+ if($db && $db->connected)
return($db->escape($str));
else
return(str_replace("'","\\'",$str));
@@ -138,7 +139,7 @@ function q($sql) {
$args = func_get_args();
unset($args[0]);
- if($db->connected) {
+ if($db && $db->connected) {
$ret = $db->q(vsprintf($sql,$args));
return $ret;
}
@@ -165,7 +166,7 @@ if(! function_exists('dbq')) {
function dbq($sql) {
global $db;
- if($db->connected)
+ if($db && $db->connected)
$ret = $db->q($sql);
else
$ret = false;
diff --git a/include/nav.php b/include/nav.php
index 043cf0f7f..5e29cc3c4 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -82,7 +82,7 @@ function nav(&$a) {
*
*/
- if(x($_SESSION,'uid')) {
+ if(local_user()) {
$a->page['nav'] .= '<a id="nav-network-link" class="nav-commlink" href="network">' . t('Network')
. '</a><span id="net-update" class="nav-ajax-left"></span>' . "\r\n";