From ec345f7a1343769abdf3f5920a0732b24726b733 Mon Sep 17 00:00:00 2001 From: Mark Pemberton Date: Fri, 13 May 2011 14:26:51 -0400 Subject: new privatekey2 branch with privatekey changes --- data/schema/6.sql | 4 ++++ data/tables.sql | 3 ++- data/templates/editprofile.tpl.php | 8 ++++++++ data/templates/rss.tpl.php | 4 ++-- data/templates/top.inc.php | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) (limited to 'data') diff --git a/data/schema/6.sql b/data/schema/6.sql index 0c208ad..e4acd53 100644 --- a/data/schema/6.sql +++ b/data/schema/6.sql @@ -13,3 +13,7 @@ CREATE TABLE `sc_users_sslclientcerts` ( PRIMARY KEY ( `id` ) , UNIQUE (`id`) ) CHARACTER SET utf8 COLLATE utf8_general_ci; + +ALTER TABLE `sc_users` ADD `privateKey` VARCHAR(33) NULL; +CREATE INDEX `privateKey` ON `sc_users` (`privateKey`); + diff --git a/data/tables.sql b/data/tables.sql index d53945e..dd4e924 100644 --- a/data/tables.sql +++ b/data/tables.sql @@ -84,8 +84,9 @@ CREATE TABLE `sc_users_sslclientcerts` ( `sslClientIssuerDn` VARCHAR( 1024 ) NOT NULL , `sslName` VARCHAR( 64 ) NOT NULL , `sslEmail` VARCHAR( 64 ) NOT NULL , + `privateKey` varchar(33) default NULL, PRIMARY KEY ( `id` ) , - UNIQUE (`id`) + UNIQUE KEY `privateKey` (`privateKey`) ) CHARACTER SET utf8 COLLATE utf8_general_ci; -- diff --git a/data/templates/editprofile.tpl.php b/data/templates/editprofile.tpl.php index cc74f04..76f608a 100644 --- a/data/templates/editprofile.tpl.php +++ b/data/templates/editprofile.tpl.php @@ -28,6 +28,14 @@ $this->includeTemplate($GLOBALS['top_include']); + + + /> +     + + + +

diff --git a/data/templates/rss.tpl.php b/data/templates/rss.tpl.php index e6e66f7..6be5425 100644 --- a/data/templates/rss.tpl.php +++ b/data/templates/rss.tpl.php @@ -3,7 +3,7 @@ echo '<' . '?xml version="1.0" encoding="utf-8" ?' . ">\n"; ?> - <?php echo htmlspecialchars($feedtitle); ?> + <?php echo $feedtitle; ?> @@ -23,4 +23,4 @@ echo '<' . '?xml version="1.0" encoding="utf-8" ?' . ">\n"; - \ No newline at end of file + diff --git a/data/templates/top.inc.php b/data/templates/top.inc.php index bdd4b1a..738b71e 100644 --- a/data/templates/top.inc.php +++ b/data/templates/top.inc.php @@ -12,7 +12,7 @@ if (isset($rsschannels)) { $size = count($rsschannels); for ($i = 0; $i < $size; $i++) { echo ' '; } } -- cgit v1.2.3-54-g00ecf From 16791766dee4f9c03700b7c817063071e4d0ed33 Mon Sep 17 00:00:00 2001 From: Mark Pemberton Date: Sat, 14 May 2011 23:08:46 -0400 Subject: Fixed SQL structure for PrivateKey --- data/schema/6.sql | 2 +- data/tables.sql | 8 ++++---- doc/UPGRADE.txt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'data') diff --git a/data/schema/6.sql b/data/schema/6.sql index e4acd53..cf9dd37 100644 --- a/data/schema/6.sql +++ b/data/schema/6.sql @@ -15,5 +15,5 @@ CREATE TABLE `sc_users_sslclientcerts` ( ) CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE `sc_users` ADD `privateKey` VARCHAR(33) NULL; -CREATE INDEX `privateKey` ON `sc_users` (`privateKey`); +CREATE UNIQUE INDEX `privateKey` ON `sc_users` (`privateKey`); diff --git a/data/tables.sql b/data/tables.sql index dd4e924..68d5ba9 100644 --- a/data/tables.sql +++ b/data/tables.sql @@ -72,7 +72,9 @@ CREATE TABLE `sc_users` ( `email` varchar(50) NOT NULL default '', `homepage` varchar(255) default NULL, `uContent` text, - PRIMARY KEY (`uId`) + `privateKey` varchar(33) default NULL, + PRIMARY KEY (`uId`), + UNIQUE KEY `privateKey` (`privateKey`) ) CHARACTER SET utf8 COLLATE utf8_general_ci ; -- -------------------------------------------------------- @@ -84,9 +86,7 @@ CREATE TABLE `sc_users_sslclientcerts` ( `sslClientIssuerDn` VARCHAR( 1024 ) NOT NULL , `sslName` VARCHAR( 64 ) NOT NULL , `sslEmail` VARCHAR( 64 ) NOT NULL , - `privateKey` varchar(33) default NULL, - PRIMARY KEY ( `id` ) , - UNIQUE KEY `privateKey` (`privateKey`) + PRIMARY KEY ( `id` ) ) CHARACTER SET utf8 COLLATE utf8_general_ci; -- diff --git a/doc/UPGRADE.txt b/doc/UPGRADE.txt index fe8624a..53ccbf4 100644 --- a/doc/UPGRADE.txt +++ b/doc/UPGRADE.txt @@ -13,7 +13,7 @@ Database updates: Apply data/schema/6.sql or do the following: INSERT INTO `sc_version` (`schema_version`) VALUES ('6'); ALTER TABLE `sc_users` ADD `privateKey` VARCHAR(33) NULL; - CREATE INDEX `privateKey` ON `sc_users` (`privateKey`); + CREATE UNIQUE INDEX `privateKey` ON `sc_users` (`privateKey`); From version 0.96 to 0.97 -- cgit v1.2.3-54-g00ecf From 10214c43b51e99cc3f8f58a4c4e8893eb2480e62 Mon Sep 17 00:00:00 2001 From: Mark Pemberton Date: Mon, 16 May 2011 00:35:31 -0400 Subject: Updated 'Generate New Key' button to use ajax if javascript enabled. --- data/templates/editprofile.tpl.php | 4 +++- src/SemanticScuttle/Service/Bookmark.php | 11 ++++++----- www/profile.php | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'data') diff --git a/data/templates/editprofile.tpl.php b/data/templates/editprofile.tpl.php index 76f608a..258e864 100644 --- a/data/templates/editprofile.tpl.php +++ b/data/templates/editprofile.tpl.php @@ -33,7 +33,9 @@ $this->includeTemplate($GLOBALS['top_include']); />     - + + + diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php index 57d0b2e..9a075be 100644 --- a/src/SemanticScuttle/Service/Bookmark.php +++ b/src/SemanticScuttle/Service/Bookmark.php @@ -728,14 +728,15 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService $privacy = ' AND B.bStatus = 0'; } + $tagcount = 0; // Set up the tags, if need be. - if (!is_array($tags) && !is_null($tags)) { + if (!is_array($tags) && !is_null($tags) && $tags<>"") { $tags = explode('+', trim($tags)); - } - $tagcount = count($tags); - for ($i = 0; $i < $tagcount; $i ++) { - $tags[$i] = trim($tags[$i]); + $tagcount = count($tags); + for ($i = 0; $i < $tagcount; $i ++) { + $tags[$i] = trim($tags[$i]); + } } // Set up the SQL query. diff --git a/www/profile.php b/www/profile.php index e6894d0..63f4da8 100644 --- a/www/profile.php +++ b/www/profile.php @@ -23,6 +23,7 @@ require_once 'www-header.php'; /* Service creation: only useful services are created */ // No specific services +$tplVars['loadjs'] = true; /* Managing all possible inputs */ isset($_POST['submittedPK']) ? define('POST_SUBMITTEDPK', $_POST['submittedPK']): define('POST_SUBMITTEDPK', ''); -- cgit v1.2.3-54-g00ecf From 920f7fc623ecad4f1338ab68326f2817c12c4610 Mon Sep 17 00:00:00 2001 From: Mark Pemberton Date: Tue, 17 May 2011 00:24:43 -0400 Subject: Updated PrivateKey to include Tag searches --- data/templates/editprofile.tpl.php | 4 +-- src/SemanticScuttle/Service/Bookmark.php | 37 ++++++++++++++++++---------- src/SemanticScuttle/Service/Bookmark2Tag.php | 2 +- src/SemanticScuttle/Service/Tag.php | 4 +-- www/bookmarks.php | 17 ++++++++++++- www/tags.php | 15 ++++++++++- 6 files changed, 58 insertions(+), 21 deletions(-) (limited to 'data') diff --git a/data/templates/editprofile.tpl.php b/data/templates/editprofile.tpl.php index 258e864..25dc3a4 100644 --- a/data/templates/editprofile.tpl.php +++ b/data/templates/editprofile.tpl.php @@ -33,9 +33,7 @@ $this->includeTemplate($GLOBALS['top_include']); />     - - - + diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php index 9a075be..232f9d0 100644 --- a/src/SemanticScuttle/Service/Bookmark.php +++ b/src/SemanticScuttle/Service/Bookmark.php @@ -821,23 +821,34 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService // Handle the parts of the query that depend on any tags that are present. $query_4 = ''; - for ($i = 0; $i < $tagcount; $i ++) { - $query_2 .= ', '. $b2tservice->getTableName() .' AS T'. $i; + if ($tagcount > 0) { + $query_2 .= ', '. $b2tservice->getTableName() .' AS T0'; $query_4 .= ' AND ('; + + $tagArray = array(); + for ($i = 0; $i < $tagcount; $i ++) { + $tmpTag = $this->db->sql_escape($tags[$i]); + $allLinkedTags = $tag2tagservice->getAllLinkedTags( + $tmpTag, '>', $user + ); - $allLinkedTags = $tag2tagservice->getAllLinkedTags( - $this->db->sql_escape($tags[$i]), '>', $user - ); + while (is_array($allLinkedTags) && count($allLinkedTags)>0) { + $tmpValue = array_pop($allLinkedTags); + if (in_array($tmpValue, $tagArray) == false) { + $tagArray[] = $tmpValue; + } + } - while (is_array($allLinkedTags) && count($allLinkedTags)>0) { - $query_4 .= ' T'. $i .'.tag = "'. array_pop($allLinkedTags) .'"'; - $query_4 .= ' OR'; + if (in_array($tmpTag, $tagArray) == false) { + $tagArray[] = $tmpTag; + } } - - $query_4 .= ' T'. $i .'.tag = "'. $this->db->sql_escape($tags[$i]) .'"'; - - $query_4 .= ') AND T'. $i .'.bId = B.bId'; - //die($query_4); + // loop through array of possible tags + foreach ($tagArray as $k => $v) { + $query_4 .= ' T0.tag = "'. $v .'" OR'; + } + $query_4 = substr($query_4,0,-3); + $query_4 .= ') AND T0.bId = B.bId'; } // Search terms diff --git a/src/SemanticScuttle/Service/Bookmark2Tag.php b/src/SemanticScuttle/Service/Bookmark2Tag.php index a10cb61..fc59a1c 100644 --- a/src/SemanticScuttle/Service/Bookmark2Tag.php +++ b/src/SemanticScuttle/Service/Bookmark2Tag.php @@ -99,7 +99,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_DbService $tags_count = is_array($tags)?count($tags):0; for ($i = 0; $i < $tags_count; $i++) { - $tags[$i] = trim(strtolower($tags[$i])); + $tags[$i] = trim(utf8_strtolower($tags[$i])); if ($fromApi) { include_once 'SemanticScuttle/functions.php'; $tags[$i] = convertTag($tags[$i], 'in'); diff --git a/src/SemanticScuttle/Service/Tag.php b/src/SemanticScuttle/Service/Tag.php index 25d3888..8325285 100644 --- a/src/SemanticScuttle/Service/Tag.php +++ b/src/SemanticScuttle/Service/Tag.php @@ -141,10 +141,10 @@ class SemanticScuttle_Service_Tag extends SemanticScuttle_DbService //normalize if(!is_array($tags)) { - $tags = strtolower(trim($tags)); + $tags = utf8_strtolower(trim($tags)); } else { for($i=0; $i' - . '' . htmlspecialchars($rsschannels[$i][0]) .'' + . ' title="' . $rsschannels[$i][0] . '">' + . '' . $rsschannels[$i][0] .'' . ''; } diff --git a/tests/AllTests.php b/tests/AllTests.php index 9e825e8..92f8960 100644 --- a/tests/AllTests.php +++ b/tests/AllTests.php @@ -46,6 +46,7 @@ class AllTests extends PHPUnit_Framework_TestSuite $suite->addTestFile($tdir . '/VoteTest.php'); $suite->addTestFile($tdir . '/UserTest.php'); $suite->addTestFile($tdir . '/Api/ExportCsvTest.php'); + $suite->addTestFile($tdir . '/Api/OpenSearchTest.php'); $suite->addTestFile($tdir . '/Api/PostsAddTest.php'); $suite->addTestFile($tdir . '/Api/PostsDeleteTest.php'); $suite->addTestFile($tdir . '/Api/PostsUpdateTest.php'); @@ -58,4 +59,4 @@ class AllTests extends PHPUnit_Framework_TestSuite { } } -?> \ No newline at end of file +?> diff --git a/tests/Api/PostsAddTest.php b/tests/Api/PostsAddTest.php index 02e2b38..e6d0531 100644 --- a/tests/Api/PostsAddTest.php +++ b/tests/Api/PostsAddTest.php @@ -108,7 +108,7 @@ TXT; $this->assertEquals($bmUrl, $bm['bAddress']); $this->assertEquals($bmTitle, $bm['bTitle']); - $this->assertEquals($bmDescription, $bm['bDescription']); + $this->assertEquals($bmDescription, stripslashes($bm['bDescription'])); $this->assertEquals($bmTags, $bm['tags']); $this->assertEquals( gmdate('Y-m-d H:i:s', strtotime($bmDatetime)), @@ -170,7 +170,7 @@ TXT; $this->assertEquals($bmUrl, $bm['bAddress']); $this->assertEquals($bmTitle, $bm['bTitle']); - $this->assertEquals($bmDescription, $bm['bDescription']); + $this->assertEquals($bmDescription, stripslashes($bm['bDescription'])); $this->assertEquals($bmTags, $bm['tags']); $this->assertEquals( gmdate('Y-m-d H:i:s', strtotime($bmDatetime)), diff --git a/tests/Bookmark2TagTest.php b/tests/Bookmark2TagTest.php index 789540f..66a6e1f 100644 --- a/tests/Bookmark2TagTest.php +++ b/tests/Bookmark2TagTest.php @@ -290,8 +290,8 @@ class Bookmark2TagTest extends TestBase $arTags = $this->b2ts->getPopularTags(null, 10, null, 1); $this->assertInternalType('array', $arTags); $this->assertEquals(3, count($arTags)); - $this->assertContains(array('tag' => 'one', 'bCount' => '2'), $arTags); - $this->assertContains(array('tag' => 'two', 'bCount' => '1'), $arTags); + $this->assertContains(array('tag' => 'one', 'bCount' => '3'), $arTags); + $this->assertContains(array('tag' => 'two', 'bCount' => '2'), $arTags); $this->assertContains(array('tag' => 'thr', 'bCount' => '1'), $arTags); $arTags = $this->b2ts->getPopularTags(null, 10, null, 2); @@ -608,4 +608,4 @@ class Bookmark2TagTest extends TestBase $this->assertContains(array('tag' => 'usable', 'bCount' => '2'), $arTags); } } -?> \ No newline at end of file +?> diff --git a/www/index.php b/www/index.php index 0977923..931d64d 100644 --- a/www/index.php +++ b/www/index.php @@ -42,7 +42,7 @@ if (GET_ACTION == "logout") { // Header variables $tplVars['loadjs'] = true; $tplVars['rsschannels'] = array( -array(sprintf(T_('%s: Recent bookmarks'), $sitename), createURL('rss').'?sort='.getSortOrder()) +array(sprintf(T_('%s: Recent bookmarks'), htmlspecialchars($sitename)), createURL('rss').'?sort='.getSortOrder()) ); if ($userservice->isLoggedOn()) { -- cgit v1.2.3-54-g00ecf From 032ea9ec2582be96527defe65091c6209905ce5a Mon Sep 17 00:00:00 2001 From: Mark Pemberton Date: Tue, 7 Jun 2011 21:42:11 -0400 Subject: Fixed missing change that was in master --- data/templates/default/bookmarks.tpl.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'data') diff --git a/data/templates/default/bookmarks.tpl.php b/data/templates/default/bookmarks.tpl.php index 27118f5..8753b7f 100644 --- a/data/templates/default/bookmarks.tpl.php +++ b/data/templates/default/bookmarks.tpl.php @@ -221,9 +221,12 @@ if ($currenttag!= '') { $brss = ''; $size = count($rsschannels); for ($i = 0; $i < $size; $i++) { - $brss = '' - . '' . $rsschannels[$i][0] .'' + . '' . $rsschannels[$i][0] .'' . ''; } -- cgit v1.2.3-54-g00ecf From 90b6e65b1193b780c9c363fee3b1e92a5d0fba30 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 27 Jun 2011 23:03:31 +0200 Subject: escape feed links properly and fix some bugs in the feed link parameters --- data/templates/default/bookmarks.tpl.php | 12 ++++++------ data/templates/default/top.inc.php | 2 +- www/bookmarks.php | 20 +++++++++++++++----- www/index.php | 16 ++++++++++++---- www/tags.php | 17 +++++++++++++---- 5 files changed, 47 insertions(+), 20 deletions(-) (limited to 'data') diff --git a/data/templates/default/bookmarks.tpl.php b/data/templates/default/bookmarks.tpl.php index 8753b7f..0ed9c1d 100644 --- a/data/templates/default/bookmarks.tpl.php +++ b/data/templates/default/bookmarks.tpl.php @@ -222,12 +222,12 @@ if ($currenttag!= '') { $size = count($rsschannels); for ($i = 0; $i < $size; $i++) { $brss = '' - . '' . $rsschannels[$i][0] .'' - . ''; + . ' href="'. htmlspecialchars($rsschannels[$i][1]) . '"' + . ' title="' . htmlspecialchars($rsschannels[$i][0]) . '">' + . '' . htmlspecialchars($rsschannels[$i][0]) .'' + . ''; } $pagesBanner = '

'. $bfirst .' / '. $bprev .' / '. $bnext .' / '. $blast .' / '. sprintf(T_('Page %d of %d'), $page, $totalpages) ." ". $brss ."

\n"; diff --git a/data/templates/default/top.inc.php b/data/templates/default/top.inc.php index 9eed6ff..0f67a17 100644 --- a/data/templates/default/top.inc.php +++ b/data/templates/default/top.inc.php @@ -13,7 +13,7 @@ if (isset($rsschannels)) { for ($i = 0; $i < $size; $i++) { echo ' '; + . ' href="'. htmlspecialchars($rsschannels[$i][1]) .'" />' . "\n"; } } ?> diff --git a/www/bookmarks.php b/www/bookmarks.php index 7056fa6..72c063e 100644 --- a/www/bookmarks.php +++ b/www/bookmarks.php @@ -229,14 +229,14 @@ if ($templatename == 'editbookmark.tpl') { $tplVars['sidebar_blocks'] = array('watchstatus'); if (!$cat) { //user page without tags - $rssTitle = ": My Bookmarks"; + $rssTitle = "My Bookmarks"; $cat = NULL; $tplVars['currenttag'] = NULL; //$tplVars['sidebar_blocks'][] = 'menu2'; $tplVars['sidebar_blocks'][] = 'linked'; $tplVars['sidebar_blocks'][] = 'popular'; } else { //pages with tags - $rssTitle = ": Tags" . $catTitle; + $rssTitle = "Tags" . $catTitle; $rssCat = '/'. filter($cat, 'url'); $tplVars['currenttag'] = $cat; $tplVars['sidebar_blocks'][] = 'tagactions'; @@ -266,7 +266,11 @@ if ($templatename == 'editbookmark.tpl') { // Set template vars $tplVars['rsschannels'] = array( - array(filter($sitename .$rssTitle), createURL('rss', filter($user, 'url') . $rssCat.'?sort='.getSortOrder())) + array( + sprintf(T_('%s: %s'), $sitename, $rssTitle), + createURL('rss', filter($user, 'url')) + . $rssCat . '?sort='.getSortOrder() + ) ); if ($userservice->isLoggedOn()) { @@ -275,8 +279,14 @@ if ($templatename == 'editbookmark.tpl') { array_push( $tplVars['rsschannels'], array( - filter($sitename . $rssTitle. sprintf(T_(': (private) ')) . $currentUsername), - createURL('rss', filter($currentUsername, 'url') . '?sort='.getSortOrder().'&privateKey='.$currentUser->getPrivateKey()) + sprintf( + T_('%s: %s (+private %s)'), + $sitename, $rssTitle, $currentUsername + ), + createURL('rss', filter($currentUsername, 'url')) + . $rssCat + . '?sort=' . getSortOrder() + . '&privateKey=' . $currentUser->getPrivateKey() ) ); } diff --git a/www/index.php b/www/index.php index f270f73..7fbb84c 100644 --- a/www/index.php +++ b/www/index.php @@ -42,17 +42,25 @@ if (GET_ACTION == "logout") { // Header variables $tplVars['loadjs'] = true; $tplVars['rsschannels'] = array( -array(sprintf(T_('%s: Recent bookmarks'), htmlspecialchars($sitename)), createURL('rss').'?sort='.getSortOrder()) + array( + sprintf(T_('%s: Recent bookmarks'), $sitename), + createURL('rss') . '?sort=' . getSortOrder() + ) ); if ($userservice->isLoggedOn()) { - $currentUsername = $currentUser->getUsername(); if ($userservice->isPrivateKeyValid($currentUser->getPrivateKey())) { + $currentUsername = $currentUser->getUsername(); array_push( $tplVars['rsschannels'], array( - filter(sprintf(T_('%s: Recent bookmarks (+private) %s'), $sitename, $currentUsername)), - createURL('rss', filter($currentUsername, 'url') . '?sort='.getSortOrder().'&privateKey='.$currentUser->getPrivateKey()) + sprintf( + T_('%s: Recent bookmarks (+private %s)'), + $sitename, $currentUsername + ), + createURL('rss') + . '?sort=' . getSortOrder() + . '&privateKey=' . $currentUser->getPrivateKey() ) ); } diff --git a/www/tags.php b/www/tags.php index fca8a04..127f6c5 100644 --- a/www/tags.php +++ b/www/tags.php @@ -67,17 +67,26 @@ if ($usecache) { $tplVars['pagetitle'] = T_('Tags') .': '. $cat; $tplVars['loadjs'] = true; $tplVars['rsschannels'] = array( -array(filter($sitename .': Tags: '. $cat), createURL('rss', 'all/'. filter($cat, 'url')).'?sort='.getSortOrder()) + array( + sprintf(T_('%s: tagged with "%s"'), $sitename, $cat), + createURL('rss', 'all/' . filter($cat, 'url')) + . '?sort='.getSortOrder() + ) ); if ($userservice->isLoggedOn()) { - $currentUsername = $currentUser->getUsername(); if ($userservice->isPrivateKeyValid($currentUser->getPrivateKey())) { + $currentUsername = $currentUser->getUsername(); array_push( $tplVars['rsschannels'], array( - filter($sitename .': Tags: '. $cat . sprintf(T_(': (private) ')) . $currentUsername), - createURL('rss', filter($currentUsername, 'url') . '?sort='.getSortOrder().'&privateKey='.$currentUser->getPrivateKey()) + sprintf( + T_('%s: tagged with "%s" (+private %s)'), + $sitename, $cat, $currentUsername + ), + createURL('rss', filter($currentUsername, 'url')) + . '?sort=' . getSortOrder() + . '&privateKey=' . $currentUser->getPrivateKey() ) ); } -- cgit v1.2.3-54-g00ecf From 83714e3889d846639c24c3e6401eb026969230b8 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 21 Jul 2011 22:28:42 +0200 Subject: make release docs more readable, update version to 0.98, update pear package changelog, fix pear package inclusion files --- build.xml | 62 +++++++++++++++++++++------------- data/templates/default/about.tpl.php | 2 +- doc/ChangeLog | 1 + doc/developers/release-new-version.rst | 12 +++---- 4 files changed, 47 insertions(+), 30 deletions(-) (limited to 'data') diff --git a/build.xml b/build.xml index 54456e3..202b3b8 100644 --- a/build.xml +++ b/build.xml @@ -9,18 +9,31 @@ - - + + - @@ -67,7 +80,6 @@ - SemanticScuttle A social bookmarking tool @@ -109,30 +121,34 @@ **/.svn build* data/config.php + data/config.testing.php + data/config.testing-tmp.php data/locales/messages.po data/locales/*/LC_MESSAGES/messages.po dist/** - doc/developers/** scripts/** src/php-gettext/examples/** - src/php-gettext/bin/** - *.tgz + src/php-gettext/tests/** *.properties + *.sql + *.tgz - + + - - - diff --git a/data/templates/default/about.tpl.php b/data/templates/default/about.tpl.php index 7bff98d..8a9b206 100644 --- a/data/templates/default/about.tpl.php +++ b/data/templates/default/about.tpl.php @@ -17,7 +17,7 @@ $this->includeTemplate($GLOBALS['top_include']); isAdmin()): ?> -
  • SemanticScuttle v0.97.0
  • +
  • SemanticScuttle v0.98.0
  • diff --git a/doc/ChangeLog b/doc/ChangeLog index 87c1b46..7ed1796 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -26,6 +26,7 @@ ChangeLog for SemantiScuttle - Support HTTPS connections when ``$root`` is not configured - SQL schema version table to ease future database upgrades - Documentation is written with rST (reStructuredText) now +- Support per-host configuration files 0.97.2 - 2011-02-17 diff --git a/doc/developers/release-new-version.rst b/doc/developers/release-new-version.rst index 4b2540a..a5e77dc 100644 --- a/doc/developers/release-new-version.rst +++ b/doc/developers/release-new-version.rst @@ -2,18 +2,18 @@ How to release a new version of SemanticScuttle =============================================== 0. Run unit tests and verify that all of them pass -1. Update doc/ChangeLog -2. Update doc/UPGRADE.txt -3. Update version in data/templates/about.tpl.php, - build.xml and doc/README.txt +1. Update ``doc/ChangeLog`` +2. Update ``doc/UPGRADE.txt`` +3. Update version in ``data/templates/about.tpl.php``, + ``build.xml`` and ``doc/README.rst`` 4. Create a release zip file via the build script: - Just type "phing". + Just type "``phing``". 5. Make a test installation from your zip file with a fresh database. Register a user, add bookmarks etc. 6. When all is fine, it's time to release. The build script takes care for most of the tasks. - Run "phing release", and it will upload the release to + Run "``phing release``", and it will upload the release to sourceforge and create a svn tag. 7. Write announcement mail to the SemanticScuttle mailing list semanticscuttle-devel@lists.sourceforge.net -- cgit v1.2.3-54-g00ecf From dc69d1ad13889022b90c24b6ccbff441f52403cd Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sat, 23 Jul 2011 08:27:17 +0200 Subject: Fix bug #3375635: XML parsing problem in top.inc.php (happened only when short_open_tags were activated) --- data/templates/default/top.inc.php | 2 +- doc/ChangeLog | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'data') diff --git a/data/templates/default/top.inc.php b/data/templates/default/top.inc.php index 0f67a17..17ec982 100644 --- a/data/templates/default/top.inc.php +++ b/data/templates/default/top.inc.php @@ -1,4 +1,4 @@ - +?xml version="1.0" encoding="utf-8"?> diff --git a/doc/ChangeLog b/doc/ChangeLog index d97c5ac..417f4c6 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -3,6 +3,11 @@ ChangeLog for SemantiScuttle .. contents:: +0.98.1 - 2011-XX-XX +------------------- +- Fix bug #3375635: XML parsing problem in top.inc.php + + 0.98.0 - 2011-07-21 ------------------- - Switch to jQuery and drop dojo -- cgit v1.2.3-54-g00ecf From ba6465e310a5cb537cc46c2ed483e55ea9949cd0 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sat, 23 Jul 2011 08:33:52 +0200 Subject: Fix bug #3375428: Forgot to remove some old dojo files --- data/templates/default/dojo.inc.php | 35 ----------------- doc/ChangeLog | 1 + www/js/jstree-1.0-rc2/MultiComboBox.js | 72 ---------------------------------- 3 files changed, 1 insertion(+), 107 deletions(-) delete mode 100644 data/templates/default/dojo.inc.php delete mode 100644 www/js/jstree-1.0-rc2/MultiComboBox.js (limited to 'data') diff --git a/data/templates/default/dojo.inc.php b/data/templates/default/dojo.inc.php deleted file mode 100644 index 366dcfe..0000000 --- a/data/templates/default/dojo.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/doc/ChangeLog b/doc/ChangeLog index 417f4c6..229db55 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -6,6 +6,7 @@ ChangeLog for SemantiScuttle 0.98.1 - 2011-XX-XX ------------------- - Fix bug #3375635: XML parsing problem in top.inc.php +- Fix bug #3375428: Forgot to remove some old dojo files 0.98.0 - 2011-07-21 diff --git a/www/js/jstree-1.0-rc2/MultiComboBox.js b/www/js/jstree-1.0-rc2/MultiComboBox.js deleted file mode 100644 index b263c8b..0000000 --- a/www/js/jstree-1.0-rc2/MultiComboBox.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright (c) 2004-2008, The Dojo Foundation All Rights Reserved. - Available via Academic Free License >= 2.1 OR the modified BSD license. - see: http://dojotoolkit.org/license for details -*/ - -/* SemanticScuttle: This script is a light modification of dojox.form.MultiComboBox -This fork allows specific use until DOJO 1.2.3 in Google CDN. */ - - - -if(!dojo._hasResource["js.MultiComboBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. -dojo._hasResource["js.MultiComboBox"] = true; -dojo.provide("js.MultiComboBox"); -dojo.experimental("js.MultiComboBox"); -dojo.require("dijit.form.ComboBox"); -dojo.require("dijit.form.ValidationTextBox"); - -dojo.declare("js.MultiComboBox", - [dijit.form.ValidationTextBox, dijit.form.ComboBoxMixin],{ - // - // summary: A ComboBox that accpets multiple inputs on a single line? - // - // delimiter: String - // The character to use to separate items in the ComboBox input - delimiter: ",", - _previousMatches: false, - - _setValueAttr: function(value){ - if (this.delimiter && value.length != 0){ - value = value+this.delimiter+" "; - arguments[0] = this._addPreviousMatches(value); - } - this.inherited(arguments); - }, - - _addPreviousMatches: function(/* String */text){ - if(this._previousMatches){ - if(!text.match(new RegExp("^"+this._previousMatches))){ - text = this._previousMatches+text; - } - } - text = this._cleanupDelimiters(text); // SScuttle: this line was moved - return text; // String - }, - - _cleanupDelimiters: function(/* String */text){ - if(this.delimiter){ - text = text.replace(new RegExp(" +"), " "); - text = text.replace(new RegExp("^ *"+this.delimiter+"* *"), ""); - text = text.replace(new RegExp(this.delimiter+" *"+this.delimiter), this.delimiter); - } - return text; - }, - - _autoCompleteText: function(/* String */text){ - arguments[0] = this._addPreviousMatches(text); - this.inherited(arguments); - }, - - _startSearch: function(/* String */text){ - text = this._cleanupDelimiters(text); - var re = new RegExp("^.*"+this.delimiter+" *"); - - if((this._previousMatches = text.match(re))){ - arguments[0] = text.replace(re, ""); - } - this.inherited(arguments); - } -}); - -} \ No newline at end of file -- cgit v1.2.3-54-g00ecf