From f87c477cf1cb728c4d5f594484bea7f79bf84ef6 Mon Sep 17 00:00:00 2001 From: querwurzelt <> Date: Sun, 20 Jan 2019 22:19:33 +0100 Subject: [PATCH] PHP 7.3 compat, bug fixes --- README.md | 16 +++++++++++ cache/.gitignore | 1 + cache/.htaccess | 3 +- data/config.default.php | 6 ++-- data/config.php.dist | 6 ++-- data/schema/2.sql | 2 +- data/tables.sql | 6 ++-- data/templates/default/dynamictags.inc.php | 2 +- .../default/sidebar.block.popular.php | 2 +- .../default/sidebar.block.recent.php | 2 +- data/templates/default/tags.tpl.php | 2 +- res/docs/header.tpl.html | 8 ------ res/docs/style.css | 28 ------------------- src/SemanticScuttle/Service/Bookmark.php | 6 ++-- src/SemanticScuttle/Service/Bookmark2Tag.php | 10 +++++-- www/.htaccess | 2 +- 16 files changed, 44 insertions(+), 58 deletions(-) create mode 100644 README.md create mode 100644 cache/.gitignore delete mode 100644 res/docs/header.tpl.html delete mode 100644 res/docs/style.css diff --git a/README.md b/README.md new file mode 100644 index 00000000..8d5f5885 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# SemanticScuttle + +SemanticScuttle is a social bookmarking tool experimenting with new features like structured tags and collaborative descriptions of tags. Originally a fork of Scuttle, it has overtaken its ancestor in stability, features and usability. + +## Features + * LDAP/Active Directory authentication + * RSS feed support: global feed, user feeds, per-tag feeds, private feeds + * Public and private bookmarks + * Delicious and Browser bookmark import + * Theming support + * Firefox plugin + +## Origin + + * https://sourceforge.net/projects/semanticscuttle/ + * https://github.com/cweiske/SemanticScuttle diff --git a/cache/.gitignore b/cache/.gitignore new file mode 100644 index 00000000..f05fcdc1 --- /dev/null +++ b/cache/.gitignore @@ -0,0 +1 @@ +*.cache \ No newline at end of file diff --git a/cache/.htaccess b/cache/.htaccess index baa56e5a..b66e8088 100644 --- a/cache/.htaccess +++ b/cache/.htaccess @@ -1,2 +1 @@ -order allow,deny -deny from all \ No newline at end of file +Require all denied diff --git a/data/config.default.php b/data/config.default.php index 8af04ba9..bb9eddb7 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -115,7 +115,7 @@ * * @var string */ -$dir_cache = dirname(__FILE__) . '/cache/'; +$dir_cache = dirname(__DIR__, 1) . '/cache'; /** * Use clean urls without .php filenames. @@ -149,14 +149,14 @@ * * @var string */ -$dbtype = 'mysql4'; +$dbtype = 'mysqli'; /** * Database hostname/IP * * @var string */ -$dbhost = '127.0.0.1'; +$dbhost = 'localhost'; /** * Database port. diff --git a/data/config.php.dist b/data/config.php.dist index 5f49857e..61eb7afd 100644 --- a/data/config.php.dist +++ b/data/config.php.dist @@ -46,7 +46,7 @@ $cleanurls = false; * * @var boolean */ -$debugMode = true; +$debugMode = false; /*************************************************** @@ -62,7 +62,7 @@ $debugMode = true; * * @var string */ -$dbtype = 'mysql4'; +$dbtype = 'mysqli'; /** * Database username * @@ -89,7 +89,7 @@ $dbname = 'scuttle'; * * @var string */ -$dbhost = '127.0.0.1'; +$dbhost = 'localhost'; /*************************************************** diff --git a/data/schema/2.sql b/data/schema/2.sql index 6c3bfaf7..171e0115 100644 --- a/data/schema/2.sql +++ b/data/schema/2.sql @@ -1,4 +1,4 @@ -ALTER TABLE `sc_bookmarks` CHANGE `bDescription` `bDescription` VARCHAR( 1500 ) +ALTER TABLE `sc_bookmarks` CHANGE `bDescription` `bDescription` VARCHAR( 1500 ); CREATE TABLE `sc_tagscache` ( `tcId` int(11) NOT NULL auto_increment, `tag1` varchar(100) NOT NULL default '', diff --git a/data/tables.sql b/data/tables.sql index 68d5ba97..e4426f53 100644 --- a/data/tables.sql +++ b/data/tables.sql @@ -5,6 +5,8 @@ -- Table structure for table `sc_bookmarks` -- +SET sql_mode = ''; + CREATE TABLE `sc_bookmarks` ( `bId` int(11) NOT NULL auto_increment, `uId` int(11) NOT NULL default '0', @@ -17,8 +19,8 @@ CREATE TABLE `sc_bookmarks` ( `bDescription` text default NULL, `bPrivateNote` text default NULL, `bHash` varchar(32) NOT NULL default '', - `bVotes` int(11) NOT NULL, - `bVoting` int(11) NOT NULL, + `bVotes` int(11) NOT NULL default '0', + `bVoting` int(11) NOT NULL default '0', `bShort` varchar(16) default NULL, PRIMARY KEY (`bId`), KEY `sc_bookmarks_usd` (`uId`,`bStatus`,`bDatetime`), diff --git a/data/templates/default/dynamictags.inc.php b/data/templates/default/dynamictags.inc.php index c2ab6d4e..f7310486 100644 --- a/data/templates/default/dynamictags.inc.php +++ b/data/templates/default/dynamictags.inc.php @@ -53,7 +53,7 @@ function writeTagsProposition($tagsCloud, $title) $taglist = ''; foreach (array_keys($tagsCloud) as $key) { $row = $tagsCloud[$key]; - $entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']); + $entries = T_ngettext('bookmark', 'bookmarks', (int)$row['bCount']); $taglist .= '