summaryrefslogtreecommitdiffstatshomepage
path: root/src/SemanticScuttle
diff options
context:
space:
mode:
Diffstat (limited to 'src/SemanticScuttle')
-rw-r--r--src/SemanticScuttle/Service/Bookmark.php6
-rw-r--r--src/SemanticScuttle/Service/User.php20
2 files changed, 22 insertions, 4 deletions
diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php
index 39ec4f0..17f91b1 100644
--- a/src/SemanticScuttle/Service/Bookmark.php
+++ b/src/SemanticScuttle/Service/Bookmark.php
@@ -504,7 +504,9 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
'bPrivateNote' => $privateNote,
'bStatus' => intval($status),
'bHash' => $this->getHash($address),
- 'bShort' => $short
+ 'bShort' => $short,
+ 'bVotes' => 0,
+ 'bVoting' => 0,
);
$sql = 'INSERT INTO '. $this->getTableName()
@@ -1136,7 +1138,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
// Delete final /
if (substr($address, -1) == '/') {
- $address = substr($address, 0, strlen($address)-2);
+ $address = substr($address, 0, -1);
}
return $address;
diff --git a/src/SemanticScuttle/Service/User.php b/src/SemanticScuttle/Service/User.php
index 917c7c9..68e8c11 100644
--- a/src/SemanticScuttle/Service/User.php
+++ b/src/SemanticScuttle/Service/User.php
@@ -103,7 +103,15 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
GENERAL_ERROR, 'Could not get user',
'', __LINE__, __FILE__, $query, $this->db
);
- return false;
+ return [ 'uId' => 0,
+ 'username' => '',
+ 'name' => '',
+ 'email' => '',
+ 'homepage' => '',
+ 'content' => '',
+ 'datetime' => NULL,
+ 'isAdmin' => false,
+ 'privateKeey' => '' ];
}
$row = $this->db->sql_fetchrow($dbresult);
@@ -111,7 +119,15 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
if ($row) {
return $row;
} else {
- return false;
+ return [ 'uId' => 0,
+ 'username' => '',
+ 'name' => '',
+ 'email' => '',
+ 'homepage' => '',
+ 'content' => '',
+ 'datetime' => NULL,
+ 'isAdmin' => false,
+ 'privateKeey' => '' ];
}
}