From d5f09b7e4d802cdc2d5f3f876c48ea918c961488 Mon Sep 17 00:00:00 2001 From: cweiske Date: Sat, 3 Oct 2009 21:52:30 +0000 Subject: make the application work again git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@388 b3834d28-1941-0410-a4f8-b48e95affb8f --- www/api/export_csv.php | 84 +++++++++++++++++++------------------- www/api/export_gcs.php | 4 +- www/api/export_html.php | 104 +++++++++++++++++++++++------------------------ www/api/export_sioc.php | 14 +++---- www/api/httpauth.inc.php | 2 +- www/api/opensearch.php | 26 ++++++------ www/api/posts_add.php | 4 +- www/api/posts_all.php | 4 +- www/api/posts_dates.php | 4 +- www/api/posts_delete.php | 4 +- www/api/posts_get.php | 4 +- www/api/posts_public.php | 4 +- www/api/posts_recent.php | 4 +- www/api/posts_update.php | 4 +- www/api/tags_get.php | 4 +- www/api/tags_rename.php | 4 +- 16 files changed, 137 insertions(+), 137 deletions(-) (limited to 'www/api') diff --git a/www/api/export_csv.php b/www/api/export_csv.php index 2389642..c696001 100644 --- a/www/api/export_csv.php +++ b/www/api/export_csv.php @@ -1,47 +1,47 @@ -getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, getSortOrder()); - +require_once('httpauth.inc.php'); +require_once '../../src/SemanticScuttle/header.php'; + +/* Service creation: only useful services are created */ +$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); + +// Check to see if a tag was specified. +if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != '')) + $tag = trim($_REQUEST['tag']); +else + $tag = NULL; + +// Get the posts relevant to the passed-in variables. +$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, getSortOrder()); + header("Content-Type: application/csv-tab-delimited-table;charset=UTF-8"); -header("Content-disposition: filename=exportBookmarks.csv"); - +header("Content-disposition: filename=exportBookmarks.csv"); + //columns titles echo 'url;title;tags;description'; -echo "\n"; - -foreach($bookmarks['bookmarks'] as $row) { - if (is_null($row['bDescription']) || (trim($row['bDescription']) == '')) - $description = ''; - else - $description = filter(str_replace(array("\r\n", "\n", "\r"),"", $row['bDescription']), 'xml'); - - $taglist = ''; - if (count($row['tags']) > 0) { - foreach($row['tags'] as $tag) - $taglist .= convertTag($tag) .','; - $taglist = substr($taglist, 0, -1); - } else { - $taglist = 'system:unfiled'; - } - +echo "\n"; + +foreach($bookmarks['bookmarks'] as $row) { + if (is_null($row['bDescription']) || (trim($row['bDescription']) == '')) + $description = ''; + else + $description = filter(str_replace(array("\r\n", "\n", "\r"),"", $row['bDescription']), 'xml'); + + $taglist = ''; + if (count($row['tags']) > 0) { + foreach($row['tags'] as $tag) + $taglist .= convertTag($tag) .','; + $taglist = substr($taglist, 0, -1); + } else { + $taglist = 'system:unfiled'; + } + echo '"'.filter($row['bAddress'], 'xml') .'";"'. filter($row['bTitle'], 'xml') .'";"'. filter($taglist, 'xml') .'";"'. $description .'"'; - echo "\n"; -} - - -?> + echo "\n"; +} + + +?> diff --git a/www/api/export_gcs.php b/www/api/export_gcs.php index 6f1f4c2..1eed961 100644 --- a/www/api/export_gcs.php +++ b/www/api/export_gcs.php @@ -5,7 +5,7 @@ // Force HTTP authentication first! //require_once('httpauth.inc.php'); -require_once('../header.inc.php'); +require_once '../../src/SemanticScuttle/header.php'; if($GLOBALS['enableGoogleCustomSearch'] == false) { echo "Google Custom Search disabled. You can enable it into the config.inc.php file."; @@ -13,7 +13,7 @@ if($GLOBALS['enableGoogleCustomSearch'] == false) { } /* Service creation: only useful services are created */ -$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); +$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); /* diff --git a/www/api/export_html.php b/www/api/export_html.php index 55553c2..922901a 100644 --- a/www/api/export_html.php +++ b/www/api/export_html.php @@ -1,54 +1,54 @@ -getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, getSortOrder()); - - -// Set up the XML file and output all the posts. +require_once('httpauth.inc.php'); +require_once '../../src/SemanticScuttle/header.php'; + +/* Service creation: only useful services are created */ +$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); + +// Check to see if a tag was specified. +if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != '')) + $tag = trim($_REQUEST['tag']); +else + $tag = NULL; + +// Get the posts relevant to the passed-in variables. +$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, getSortOrder()); + + +// Set up the XML file and output all the posts. echo ''."\r\n"; -echo ''; -echo ''."\r\n"; -echo 'Bookmarks'."\r\n"; -echo '

Bookmarks for '. htmlspecialchars($currentUser->getUsername()) .''. (is_null($tag) ? '' : ' tag="'. htmlspecialchars($tag) .'"') ." from " . $sitename ."

\r\n"; -echo '

'."\r\n"; - - - -foreach($bookmarks['bookmarks'] as $row) { - if (is_null($row['bDescription']) || (trim($row['bDescription']) == '')) - $description = ''; - else - $description = 'description="'. filter($row['bDescription'], 'xml') .'" '; - - $taglist = ''; - if (count($row['tags']) > 0) { - foreach($row['tags'] as $tag) - $taglist .= convertTag($tag) .','; - $taglist = substr($taglist, 0, -1); - } else { - $taglist = 'system:unfiled'; - } - - echo "\t

" . filter($row['bTitle'], 'xml') ."\r\n"; -} - - -echo '

'; -?> +echo ''; +echo ''."\r\n"; +echo 'Bookmarks'."\r\n"; +echo '

Bookmarks for '. htmlspecialchars($currentUser->getUsername()) .''. (is_null($tag) ? '' : ' tag="'. htmlspecialchars($tag) .'"') ." from " . $sitename ."

\r\n"; +echo '

'."\r\n"; + + + +foreach($bookmarks['bookmarks'] as $row) { + if (is_null($row['bDescription']) || (trim($row['bDescription']) == '')) + $description = ''; + else + $description = 'description="'. filter($row['bDescription'], 'xml') .'" '; + + $taglist = ''; + if (count($row['tags']) > 0) { + foreach($row['tags'] as $tag) + $taglist .= convertTag($tag) .','; + $taglist = substr($taglist, 0, -1); + } else { + $taglist = 'system:unfiled'; + } + + echo "\t

" . filter($row['bTitle'], 'xml') ."\r\n"; +} + + +echo '

'; +?> diff --git a/www/api/export_sioc.php b/www/api/export_sioc.php index 746d0ea..90713e7 100644 --- a/www/api/export_sioc.php +++ b/www/api/export_sioc.php @@ -1,12 +1,12 @@ "; ?> diff --git a/www/api/httpauth.inc.php b/www/api/httpauth.inc.php index 5dd7444..23e3a5e 100644 --- a/www/api/httpauth.inc.php +++ b/www/api/httpauth.inc.php @@ -1,5 +1,5 @@ - - - - - UTF-8 - - Jan Seifert "jan.seifert@uid.com" - semanticscuttle bookmark web - data:image/gif;base64,R0lGODlhEAAQAMZ9ANaPE9mREteTHtSXLdmXIdiXJtaYKdiYJ9iYKNeaLtKdP9CdRd2dLNWfQuWiFMqjX9+hNMykXt6jPOCkPM2oaM+paeCpQuGoR+OqOeKpR+GqS9+uWeSwU+ayS+uzOeWxVeWxWOSyWOu0POazXOS0YOm8Zee8cOy+WOm9a/jBLum+bPbCNurAbe7BYuvBc/LDV/LEV+zEdv/KKf/KLP/KLf/LLuzHe//MNP/NN/nMTv/OOf/OPP/OP/jNW//PPvnOVv/QQv7QRv/QRP/RR/HOhP/SSf/STPnRav/TT//TUPfScf/UUvzUXP/UVP/VV/bTfv/WWf/WW//WXP7XYf/XX//XYP/YZPPVmf/ZZv/ZZ/vYeP/aaf/aa//abP/abf/abvvaef/bb//bcfzbfP/ccv/cc//cdP/cdf/dd//deP/def3egP/ee//efP/efv/ffv/ggf/gg//ghP/ghfrfmv/hif/ii//ijP/jkfzjm//kkv7klv/lmP///////////yH5BAEKAH8ALAAAAAAQABAAAAergH+Cg38hhIeHIFcmiIgDLnt0Go2EE1pyd0QbjQMQDC9bZGprKBcjA4IfAQMrQUhOVFlhaGNPMRl/Aw4yMzc7QkZNUlZdZmASqAJKcW1WPDpARUtQUx0RgyR5fHpzUTU4PkMiqIMVNnh2c25lSTQpAIgqdXJvaWReXz0JiCxwbWhiuGCp8uMAohJszhw5AYMJlBwFEHFoYQHBAwUEMHgwgKjBA0QLKFAaKSgQADs= - - + + + + + UTF-8 + + Jan Seifert "jan.seifert@uid.com" + semanticscuttle bookmark web + data:image/gif;base64,R0lGODlhEAAQAMZ9ANaPE9mREteTHtSXLdmXIdiXJtaYKdiYJ9iYKNeaLtKdP9CdRd2dLNWfQuWiFMqjX9+hNMykXt6jPOCkPM2oaM+paeCpQuGoR+OqOeKpR+GqS9+uWeSwU+ayS+uzOeWxVeWxWOSyWOu0POazXOS0YOm8Zee8cOy+WOm9a/jBLum+bPbCNurAbe7BYuvBc/LDV/LEV+zEdv/KKf/KLP/KLf/LLuzHe//MNP/NN/nMTv/OOf/OPP/OP/jNW//PPvnOVv/QQv7QRv/QRP/RR/HOhP/SSf/STPnRav/TT//TUPfScf/UUvzUXP/UVP/VV/bTfv/WWf/WW//WXP7XYf/XX//XYP/YZPPVmf/ZZv/ZZ/vYeP/aaf/aa//abP/abf/abvvaef/bb//bcfzbfP/ccv/cc//cdP/cdf/dd//deP/def3egP/ee//efP/efv/ffv/ggf/gg//ghP/ghfrfmv/hif/ii//ijP/jkfzjm//kkv7klv/lmP///////////yH5BAEKAH8ALAAAAAAQABAAAAergH+Cg38hhIeHIFcmiIgDLnt0Go2EE1pyd0QbjQMQDC9bZGprKBcjA4IfAQMrQUhOVFlhaGNPMRl/Aw4yMzc7QkZNUlZdZmASqAJKcW1WPDpARUtQUx0RgyR5fHpzUTU4PkMiqIMVNnh2c25lSTQpAIgqdXJvaWReXz0JiCxwbWhiuGCp8uMAohJszhw5AYMJlBwFEHFoYQHBAwUEMHgwgKjBA0QLKFAaKSgQADs= + + diff --git a/www/api/posts_add.php b/www/api/posts_add.php index ba3e02c..f396b5e 100644 --- a/www/api/posts_add.php +++ b/www/api/posts_add.php @@ -11,10 +11,10 @@ // Force HTTP authentication require_once('httpauth.inc.php'); -require_once('../header.inc.php'); +require_once '../../src/SemanticScuttle/header.php'; /* Service creation: only useful services are created */ -$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); +$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); // Get all the bookmark's passed-in information if (isset($_REQUEST['url']) && (trim($_REQUEST['url']) != '')) diff --git a/www/api/posts_all.php b/www/api/posts_all.php index 4ecbd7e..4c280c7 100644 --- a/www/api/posts_all.php +++ b/www/api/posts_all.php @@ -6,10 +6,10 @@ // Force HTTP authentication first! require_once('httpauth.inc.php'); -require_once('../header.inc.php'); +require_once '../../src/SemanticScuttle/header.php'; /* Service creation: only useful services are created */ -$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); +$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); // Check to see if a tag was specified. diff --git a/www/api/posts_dates.php b/www/api/posts_dates.php index d4962ff..5f002d1 100644 --- a/www/api/posts_dates.php +++ b/www/api/posts_dates.php @@ -4,10 +4,10 @@ // Force HTTP authentication first! require_once('httpauth.inc.php'); -require_once('../header.inc.php'); +require_once '../../src/SemanticScuttle/header.php'; /* Service creation: only useful services are created */ -$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); +$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); // Check to see if a tag was specified. diff --git a/www/api/posts_delete.php b/www/api/posts_delete.php index d24ba59..7ad332f 100644 --- a/www/api/posts_delete.php +++ b/www/api/posts_delete.php @@ -8,10 +8,10 @@ // Force HTTP authentication first! require_once('httpauth.inc.php'); -require_once('../header.inc.php'); +require_once '../../src/SemanticScuttle/header.php'; /* Service creation: only useful services are created */ -$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); +$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); // Note that del.icio.us only errors out if no URL was passed in; there's no error on attempting diff --git a/www/api/posts_get.php b/www/api/posts_get.php index 34d192e..a6a6102 100644 --- a/www/api/posts_get.php +++ b/www/api/posts_get.php @@ -11,10 +11,10 @@ // Force HTTP authentication first! require_once('httpauth.inc.php'); -require_once('../header.inc.php'); +require_once '../../src/SemanticScuttle/header.php'; /* Service creation: only useful services are created */ -$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); +$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); // Check to see if a tag was specified. diff --git a/www/api/posts_public.php b/www/api/posts_public.php index f7aa955..2ade45e 100644 --- a/www/api/posts_public.php +++ b/www/api/posts_public.php @@ -6,10 +6,10 @@ // Force HTTP authentication first! //require_once('httpauth.inc.php'); -require_once('../header.inc.php'); +require_once '../../src/SemanticScuttle/header.php'; /* Service creation: only useful services are created */ -$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); +$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); // Check to see if a tag was specified. diff --git a/www/api/posts_recent.php b/www/api/posts_recent.php index daa9d39..e8bc644 100644 --- a/www/api/posts_recent.php +++ b/www/api/posts_recent.php @@ -8,10 +8,10 @@ $countMax = 100; // Force HTTP authentication first! require_once('httpauth.inc.php'); -require_once('../header.inc.php'); +require_once '../../src/SemanticScuttle/header.php'; /* Service creation: only useful services are created */ -$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); +$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); // Check to see if a tag was specified. diff --git a/www/api/posts_update.php b/www/api/posts_update.php index 6ea50e2..18e5676 100644 --- a/www/api/posts_update.php +++ b/www/api/posts_update.php @@ -6,10 +6,10 @@ // Force HTTP authentication first! require_once('httpauth.inc.php'); -require_once('../header.inc.php'); +require_once '../../src/SemanticScuttle/header.php'; /* Service creation: only useful services are created */ -$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); +$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark'); // Get the posts relevant to the passed-in variables. diff --git a/www/api/tags_get.php b/www/api/tags_get.php index cee36ee..043b629 100644 --- a/www/api/tags_get.php +++ b/www/api/tags_get.php @@ -6,10 +6,10 @@ // Force HTTP authentication first! require_once('httpauth.inc.php'); -require_once('../header.inc.php'); +require_once '../../src/SemanticScuttle/header.php'; /* Service creation: only useful services are created */ -$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); +$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); // Get the tags relevant to the passed-in variables. diff --git a/www/api/tags_rename.php b/www/api/tags_rename.php index dd16339..bf78b39 100644 --- a/www/api/tags_rename.php +++ b/www/api/tags_rename.php @@ -6,10 +6,10 @@ // Force HTTP authentication first! require_once('httpauth.inc.php'); -require_once('../header.inc.php'); +require_once '../../src/SemanticScuttle/header.php'; /* Service creation: only useful services are created */ -$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); +$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag'); // Get the tag info. if (isset($_REQUEST['old']) && (trim($_REQUEST['old']) != '')) -- cgit v1.2.3