Compare commits

...

10 commits

Author SHA1 Message Date
ca9225972f Fix issue about ‘bVotes’ and ‘bVoting’ not having default values 2024-02-29 09:37:19 -08:00
9f843178bc Fix issue where constructors aren't called
The documentation says that defining a constructor as a function with the same
name as the class is deprecated as of PHP 8, but should still work. However it
seems that this isn't true. Running on my machine these constructors didn't get
called. Renaming them to ‘__construct’ fixed that.
2024-02-29 09:02:19 -08:00
e1bfad3df7 Fix issue accessing an array index on a boolean 2024-02-29 09:01:24 -08:00
907fd55a5c Fix error: Using ${var} in strings is deprecated 2024-02-29 08:59:33 -08:00
buckaroo-labs
ab2657e351
Update README.md 2023-12-21 19:29:26 -08:00
buckaroo-labs
50ee2712b9
Update README.md 2023-12-21 19:13:40 -08:00
buckaroo-labs
ad52b9261c
Update README.md 2023-12-21 19:04:29 -08:00
buckaroo-labs
278fec90a1
Update README.md 2023-12-21 16:34:02 -08:00
buckaroo-labs
bc69e6014d
Update README.md
fix typo
2023-12-21 16:29:38 -08:00
buckaroo-labs
4dd811b81a
Update README.md 2023-12-21 12:23:15 -08:00
6 changed files with 34 additions and 16 deletions

View file

@ -1,14 +1,14 @@
# ![Bookmark star icon](icon.png) SemanticScuttle
SemanticScuttle is a social bookmarking tool experimenting with new features like structured (heirarchical) tags and collaborative descriptions of tags. Originally a fork of Scuttle, it has overtaken its ancestor in stability, features and usability. The querwurzel [fork](https://github.com/querwurzel/semantic-scuttle) brought the software up to PHP 7.3 compatibility, but is no longer in development. This fork's aims are to:
SemanticScuttle is a social bookmarking tool experimenting with new features like structured (hierarchical) tags and collaborative descriptions of tags. Originally a fork of Scuttle, it has overtaken its ancestor in stability, features and usability. The querwurzel [fork](https://github.com/querwurzel/semantic-scuttle) brought the software up to PHP 7.3 compatibility, but is no longer in development. This fork's aims are to:
* bring app compatibility up to PHP 8.2 (for at least the MySQL/mysqli database option, possibly others), avoiding the "Deprecated" messages under PHP 8.2 that will be the "Fatal Error"s of a future PHP version;
* correct broken links in the documentation; and to
* bundle a responsive theme (forked from [sscuttlizr](https://github.com/jonrandoem/sscuttlizr)) with minimal features, designed for cases in which this app is embedded in a larger system.
* secure the application (see warning).
## Warning
We offer no warranty, express or implied, regarding the security of this application. No security testing has been performed, but a visual review has revealed highly questionable coding practices. The associated risks may be mitigated by turning off anonymous editing and user registration capabilities after a single administrative user has been created (see configuration.rst file in doc folder), and/or not exposing the application to the internet.
Although a visual code review leads to the conclusion that due attention has been paid to application security by previous developers, we offer no warranty, express or implied, regarding the security of this application. Many of the risks associated insecure application code may be mitigated by turning off anonymous editing and user registration capabilities after a single administrative user has been created (see configuration.rst file in doc folder), giving the application read-only access to the database after setup and data loading is complete, and/or not exposing the application to the internet.
## Features
* LDAP/Active Directory authentication

View file

@ -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()

View file

@ -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' => '' ];
}
}

View file

@ -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);
}

View file

@ -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;

View file

@ -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);