Compare commits
5 commits
master
...
fix-my-set
Author | SHA1 | Date | |
---|---|---|---|
5fb1260ba3 | |||
ca9225972f | |||
9f843178bc | |||
e1bfad3df7 | |||
907fd55a5c |
5 changed files with 32 additions and 14 deletions
|
@ -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;
|
||||
|
|
|
@ -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' => '' ];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,18 +89,18 @@ function get_list_of_locales($locale) {
|
|||
if ($modifier) {
|
||||
if ($country) {
|
||||
if ($charset)
|
||||
array_push($locale_names, "${lang}_$country.$charset@$modifier");
|
||||
array_push($locale_names, "${lang}_$country@$modifier");
|
||||
array_push($locale_names, "{$lang}_$country.$charset@$modifier");
|
||||
array_push($locale_names, "{$lang}_$country@$modifier");
|
||||
} elseif ($charset)
|
||||
array_push($locale_names, "${lang}.$charset@$modifier");
|
||||
array_push($locale_names, "{$lang}.$charset@$modifier");
|
||||
array_push($locale_names, "$lang@$modifier");
|
||||
}
|
||||
if ($country) {
|
||||
if ($charset)
|
||||
array_push($locale_names, "${lang}_$country.$charset");
|
||||
array_push($locale_names, "${lang}_$country");
|
||||
array_push($locale_names, "{$lang}_$country.$charset");
|
||||
array_push($locale_names, "{$lang}_$country");
|
||||
} elseif ($charset)
|
||||
array_push($locale_names, "${lang}.$charset");
|
||||
array_push($locale_names, "{$lang}.$charset");
|
||||
array_push($locale_names, $lang);
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ class gettext_reader {
|
|||
* @param object Reader the StreamReader object
|
||||
* @param boolean enable_cache Enable or disable caching of strings (default on)
|
||||
*/
|
||||
function gettext_reader($Reader, $enable_cache = true) {
|
||||
function __construct($Reader, $enable_cache = true) {
|
||||
// If there isn't a StreamReader, turn on short circuit mode.
|
||||
if (! $Reader || isset($Reader->error) ) {
|
||||
$this->short_circuit = true;
|
||||
|
|
|
@ -49,7 +49,7 @@ class StringReader {
|
|||
var $_pos;
|
||||
var $_str;
|
||||
|
||||
function StringReader($str='') {
|
||||
public function __construct($str='') {
|
||||
$this->_str = $str;
|
||||
$this->_pos = 0;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ class FileReader {
|
|||
var $_fd;
|
||||
var $_length;
|
||||
|
||||
function FileReader($filename) {
|
||||
public function __construct($filename) {
|
||||
if (file_exists($filename)) {
|
||||
|
||||
$this->_length=filesize($filename);
|
||||
|
@ -143,7 +143,7 @@ class FileReader {
|
|||
// Preloads entire file in memory first, then creates a StringReader
|
||||
// over it (it assumes knowledge of StringReader internals)
|
||||
class CachedFileReader extends StringReader {
|
||||
function CachedFileReader($filename) {
|
||||
public function __construct($filename) {
|
||||
if (file_exists($filename)) {
|
||||
|
||||
$length=filesize($filename);
|
||||
|
|
Loading…
Reference in a new issue