Compare commits

..

No commits in common. "fix-my-setup" and "master" have entirely different histories.

5 changed files with 14 additions and 32 deletions

View file

@ -504,9 +504,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
'bPrivateNote' => $privateNote, 'bPrivateNote' => $privateNote,
'bStatus' => intval($status), 'bStatus' => intval($status),
'bHash' => $this->getHash($address), 'bHash' => $this->getHash($address),
'bShort' => $short, 'bShort' => $short
'bVotes' => 0,
'bVoting' => 0,
); );
$sql = 'INSERT INTO '. $this->getTableName() $sql = 'INSERT INTO '. $this->getTableName()
@ -1138,7 +1136,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
// Delete final / // Delete final /
if (substr($address, -1) == '/') { if (substr($address, -1) == '/') {
$address = substr($address, 0, -1); $address = substr($address, 0, strlen($address)-2);
} }
return $address; return $address;

View file

@ -103,15 +103,7 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
GENERAL_ERROR, 'Could not get user', GENERAL_ERROR, 'Could not get user',
'', __LINE__, __FILE__, $query, $this->db '', __LINE__, __FILE__, $query, $this->db
); );
return [ 'uId' => 0, return false;
'username' => '',
'name' => '',
'email' => '',
'homepage' => '',
'content' => '',
'datetime' => NULL,
'isAdmin' => false,
'privateKeey' => '' ];
} }
$row = $this->db->sql_fetchrow($dbresult); $row = $this->db->sql_fetchrow($dbresult);
@ -119,15 +111,7 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
if ($row) { if ($row) {
return $row; return $row;
} else { } else {
return [ 'uId' => 0, return false;
'username' => '',
'name' => '',
'email' => '',
'homepage' => '',
'content' => '',
'datetime' => NULL,
'isAdmin' => false,
'privateKeey' => '' ];
} }
} }

View file

@ -89,18 +89,18 @@ function get_list_of_locales($locale) {
if ($modifier) { if ($modifier) {
if ($country) { if ($country) {
if ($charset) if ($charset)
array_push($locale_names, "{$lang}_$country.$charset@$modifier"); array_push($locale_names, "${lang}_$country.$charset@$modifier");
array_push($locale_names, "{$lang}_$country@$modifier"); array_push($locale_names, "${lang}_$country@$modifier");
} elseif ($charset) } elseif ($charset)
array_push($locale_names, "{$lang}.$charset@$modifier"); array_push($locale_names, "${lang}.$charset@$modifier");
array_push($locale_names, "$lang@$modifier"); array_push($locale_names, "$lang@$modifier");
} }
if ($country) { if ($country) {
if ($charset) if ($charset)
array_push($locale_names, "{$lang}_$country.$charset"); array_push($locale_names, "${lang}_$country.$charset");
array_push($locale_names, "{$lang}_$country"); array_push($locale_names, "${lang}_$country");
} elseif ($charset) } elseif ($charset)
array_push($locale_names, "{$lang}.$charset"); array_push($locale_names, "${lang}.$charset");
array_push($locale_names, $lang); array_push($locale_names, $lang);
} }

View file

@ -98,7 +98,7 @@ class gettext_reader {
* @param object Reader the StreamReader object * @param object Reader the StreamReader object
* @param boolean enable_cache Enable or disable caching of strings (default on) * @param boolean enable_cache Enable or disable caching of strings (default on)
*/ */
function __construct($Reader, $enable_cache = true) { function gettext_reader($Reader, $enable_cache = true) {
// If there isn't a StreamReader, turn on short circuit mode. // If there isn't a StreamReader, turn on short circuit mode.
if (! $Reader || isset($Reader->error) ) { if (! $Reader || isset($Reader->error) ) {
$this->short_circuit = true; $this->short_circuit = true;

View file

@ -49,7 +49,7 @@ class StringReader {
var $_pos; var $_pos;
var $_str; var $_str;
public function __construct($str='') { function StringReader($str='') {
$this->_str = $str; $this->_str = $str;
$this->_pos = 0; $this->_pos = 0;
} }
@ -86,7 +86,7 @@ class FileReader {
var $_fd; var $_fd;
var $_length; var $_length;
public function __construct($filename) { function FileReader($filename) {
if (file_exists($filename)) { if (file_exists($filename)) {
$this->_length=filesize($filename); $this->_length=filesize($filename);
@ -143,7 +143,7 @@ class FileReader {
// Preloads entire file in memory first, then creates a StringReader // Preloads entire file in memory first, then creates a StringReader
// over it (it assumes knowledge of StringReader internals) // over it (it assumes knowledge of StringReader internals)
class CachedFileReader extends StringReader { class CachedFileReader extends StringReader {
public function __construct($filename) { function CachedFileReader($filename) {
if (file_exists($filename)) { if (file_exists($filename)) {
$length=filesize($filename); $length=filesize($filename);