From 29422fa55379aa61a61019b832c83dab6d450264 Mon Sep 17 00:00:00 2001 From: cweiske Date: Sat, 3 Oct 2009 14:00:33 +0000 Subject: move files to new locations git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@386 b3834d28-1941-0410-a4f8-b48e95affb8f --- api/export_csv.php | 47 --------------------------- api/export_gcs.php | 66 -------------------------------------- api/export_html.php | 54 ------------------------------- api/export_sioc.php | 90 ---------------------------------------------------- api/httpauth.inc.php | 33 ------------------- api/opensearch.php | 18 ----------- api/posts_add.php | 83 ------------------------------------------------ api/posts_all.php | 48 ---------------------------- api/posts_dates.php | 40 ----------------------- api/posts_delete.php | 34 -------------------- api/posts_get.php | 61 ----------------------------------- api/posts_public.php | 48 ---------------------------- api/posts_recent.php | 62 ------------------------------------ api/posts_update.php | 25 --------------- api/tags_get.php | 26 --------------- api/tags_rename.php | 37 --------------------- 16 files changed, 772 deletions(-) delete mode 100644 api/export_csv.php delete mode 100644 api/export_gcs.php delete mode 100644 api/export_html.php delete mode 100644 api/export_sioc.php delete mode 100644 api/httpauth.inc.php delete mode 100644 api/opensearch.php delete mode 100644 api/posts_add.php delete mode 100644 api/posts_all.php delete mode 100644 api/posts_dates.php delete mode 100644 api/posts_delete.php delete mode 100644 api/posts_get.php delete mode 100644 api/posts_public.php delete mode 100644 api/posts_recent.php delete mode 100644 api/posts_update.php delete mode 100644 api/tags_get.php delete mode 100644 api/tags_rename.php (limited to 'api') diff --git a/api/export_csv.php b/api/export_csv.php deleted file mode 100644 index 2389642..0000000 --- a/api/export_csv.php +++ /dev/null @@ -1,47 +0,0 @@ -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"); - -//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 '"'.filter($row['bAddress'], 'xml') .'";"'. filter($row['bTitle'], 'xml') .'";"'. filter($taglist, 'xml') .'";"'. $description .'"'; - echo "\n"; -} - - -?> diff --git a/api/export_gcs.php b/api/export_gcs.php deleted file mode 100644 index 6f1f4c2..0000000 --- a/api/export_gcs.php +++ /dev/null @@ -1,66 +0,0 @@ -isAdmin($userservice->getCurrentUserId())) { - die(T_('You are not allowed to do this action (admin access)')); - }*/ - -// Check if queried format is xml -if (isset($_REQUEST['xml']) && (trim($_REQUEST['xml']) == 1)) -$xml = true; -else -$xml = false; - -// 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, NULL, $tag, NULL, getSortOrder()); - - -// Set up the plain file and output all the posts. -header('Content-Type: text/plain'); -if(!$xml) { - header('Content-Type: text/plain'); - foreach($bookmarks['bookmarks'] as $row) { - if(checkUrl($row['bAddress'], false)) { - echo $row['bAddress']."\n"; - } - } -} else { - header('Content-Type: application/xml'); - echo ''."\n"; - echo ' '."\n"; - foreach($bookmarks['bookmarks'] as $row) { - //if(substr($row['bAddress'], 0, 7) == "http://") { - if(checkUrl($row['bAddress'], false)) { - echo ' '."\n"; - echo ' '."\n"; - } - } - echo ' '."\n"; - echo ''."\n"; -} - -?> diff --git a/api/export_html.php b/api/export_html.php deleted file mode 100644 index 55553c2..0000000 --- a/api/export_html.php +++ /dev/null @@ -1,54 +0,0 @@ -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 '

'; -?> diff --git a/api/export_sioc.php b/api/export_sioc.php deleted file mode 100644 index 746d0ea..0000000 --- a/api/export_sioc.php +++ /dev/null @@ -1,90 +0,0 @@ - -"; ?> - - - - - - - -?> - -getObjectUsers(); - -$usersArray = array(); // useful for bookmarks display -foreach($users as $user) { - $usersArray[$user->getId()] = $user->getUserName(); -} -?> - - - - getUserName() ?> - - - - - - Authors at PlanetRDF.com - - -*/ -?> - -getBookmarks(0, NULL, NULL, NULL); -?> - - - - - - - - - - - - - - - - - - - - - - diff --git a/api/httpauth.inc.php b/api/httpauth.inc.php deleted file mode 100644 index 5dd7444..0000000 --- a/api/httpauth.inc.php +++ /dev/null @@ -1,33 +0,0 @@ -isLoggedOn()) { - /* Maybe we have caught authentication data in $_SERVER['REMOTE_USER'] - ( Inspired by http://www.yetanothercommunitysystem.com/article-321-regle-comment-utiliser-l-authentification-http-en-php-chez-ovh ) */ - if((!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) - && preg_match('/Basic\s+(.*)$/i', $_SERVER['REMOTE_USER'], $matches)) { - list($name, $password) = explode(':', base64_decode($matches[1])); - $_SERVER['PHP_AUTH_USER'] = strip_tags($name); - $_SERVER['PHP_AUTH_PW'] = strip_tags($password); - } - - if (!isset($_SERVER['PHP_AUTH_USER'])) { - authenticate(); - } else { - $login = $userservice->login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']); - if (!$login) { - authenticate(); - } - } -} -?> diff --git a/api/opensearch.php b/api/opensearch.php deleted file mode 100644 index a6f79f8..0000000 --- a/api/opensearch.php +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - 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/api/posts_add.php b/api/posts_add.php deleted file mode 100644 index ba3e02c..0000000 --- a/api/posts_add.php +++ /dev/null @@ -1,83 +0,0 @@ - 2) { - $status = 0; - } - } else { - switch ($status_str) { - case 'private': - $status = 2; - break; - case 'shared': - $status = 1; - break; - default: - $status = 0; - break; - } - } -} - -// Error out if there's no address or description -if (is_null($url) || is_null($description)) { - $added = false; -} else { -// We're good with info; now insert it! - if ($bookmarkservice->bookmarkExists($url, $userservice->getCurrentUserId())) - $added = false; - else - $added = $bookmarkservice->addBookmark($url, $description, $extended, '', $status, $tags, $dt, true); -} - -// Set up the XML file and output the result. -header('Content-Type: text/xml'); -echo '\r\n"; -echo ''; -?> \ No newline at end of file diff --git a/api/posts_all.php b/api/posts_all.php deleted file mode 100644 index 4ecbd7e..0000000 --- a/api/posts_all.php +++ /dev/null @@ -1,48 +0,0 @@ -getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag); - -// Set up the XML file and output all the posts. -header('Content-Type: text/xml'); -echo '\r\n"; -echo '\r\n"; - -foreach($bookmarks['bookmarks'] as $row) { - if (is_null($row['bDescription']) || (trim($row['bDescription']) == '')) - $description = ''; - else - $description = 'extended="'. 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\r\n"; -} - -echo ''; -?> \ No newline at end of file diff --git a/api/posts_dates.php b/api/posts_dates.php deleted file mode 100644 index d4962ff..0000000 --- a/api/posts_dates.php +++ /dev/null @@ -1,40 +0,0 @@ -getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag); - -// Set up the XML file and output all the tags. -header('Content-Type: text/xml'); -echo '\r\n"; -echo '\r\n"; - -$lastdate = NULL; -foreach($bookmarks['bookmarks'] as $row) { - $thisdate = gmdate('Y-m-d', strtotime($row['bDatetime'])); - if ($thisdate != $lastdate && $lastdate != NULL) { - echo "\t\r\n"; - $count = 1; - } else { - $count = $count + 1; - } - $lastdate = $thisdate; -} - -echo ""; -?> \ No newline at end of file diff --git a/api/posts_delete.php b/api/posts_delete.php deleted file mode 100644 index d24ba59..0000000 --- a/api/posts_delete.php +++ /dev/null @@ -1,34 +0,0 @@ -getBookmarkByAddress($_REQUEST['url']); - $bid = $bookmark['bId']; - $delete = $bookmarkservice->deleteBookmark($bid); - $deleted = true; -} - -// Set up the XML file and output the result. -header('Content-Type: text/xml'); -echo '\r\n"; -echo ''; -?> \ No newline at end of file diff --git a/api/posts_get.php b/api/posts_get.php deleted file mode 100644 index 34d192e..0000000 --- a/api/posts_get.php +++ /dev/null @@ -1,61 +0,0 @@ -getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, NULL, NULL, $dtstart, $dtend); - - -// Set up the XML file and output all the tags. -header('Content-Type: text/xml'); -echo '\r\n"; -echo '\r\n"; - -foreach($bookmarks['bookmarks'] as $row) { - if (is_null($row['bDescription']) || (trim($row['bDescription']) == '')) - $description = ''; - else - $description = 'extended="'. 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\r\n"; -} - -echo ''; -?> \ No newline at end of file diff --git a/api/posts_public.php b/api/posts_public.php deleted file mode 100644 index f7aa955..0000000 --- a/api/posts_public.php +++ /dev/null @@ -1,48 +0,0 @@ -getBookmarks(0, NULL, NULL, $tag); - -// Set up the XML file and output all the posts. -header('Content-Type: text/xml'); -echo '\r\n"; -echo '\r\n"; - -foreach($bookmarks['bookmarks'] as $row) { - if (is_null($row['bDescription']) || (trim($row['bDescription']) == '')) - $description = ''; - else - $description = 'extended="'. 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\r\n"; -} - -echo ''; -?> diff --git a/api/posts_recent.php b/api/posts_recent.php deleted file mode 100644 index daa9d39..0000000 --- a/api/posts_recent.php +++ /dev/null @@ -1,62 +0,0 @@ - $countMax) - $count = $countMax; - elseif ($count < 0) - $count = 0; -} else { - $count = $countDefault; -} - -// Get the posts relevant to the passed-in variables. -$bookmarks =& $bookmarkservice->getBookmarks(0, $count, $userservice->getCurrentUserId(), $tag); - - -// Set up the XML file and output all the tags. -header('Content-Type: text/xml'); -echo '\r\n"; -echo '\r\n"; - -foreach($bookmarks['bookmarks'] as $row) { - if (is_null($row['bDescription']) || (trim($row['bDescription']) == '')) - $description = ''; - else - $description = 'extended="'. 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\r\n"; -} - -echo ''; -?> \ No newline at end of file diff --git a/api/posts_update.php b/api/posts_update.php deleted file mode 100644 index 6ea50e2..0000000 --- a/api/posts_update.php +++ /dev/null @@ -1,25 +0,0 @@ -getBookmarks(0, 1, $userservice->getCurrentUserId()); - - -// Set up the XML file and output all the tags. -header('Content-Type: text/xml'); -echo '\r\n"; -foreach($bookmarks['bookmarks'] as $row) { - echo ''; -} -?> \ No newline at end of file diff --git a/api/tags_get.php b/api/tags_get.php deleted file mode 100644 index cee36ee..0000000 --- a/api/tags_get.php +++ /dev/null @@ -1,26 +0,0 @@ -getTags($userservice->getCurrentUserId()); - -// Set up the XML file and output all the tags. -header('Content-Type: text/xml'); -echo '\r\n"; -echo "\r\n"; -foreach($tags as $row) { - echo "\t\r\n"; -} -echo ""; -?> diff --git a/api/tags_rename.php b/api/tags_rename.php deleted file mode 100644 index dd16339..0000000 --- a/api/tags_rename.php +++ /dev/null @@ -1,37 +0,0 @@ -) than the other API calls. - -// Force HTTP authentication first! -require_once('httpauth.inc.php'); -require_once('../header.inc.php'); - -/* Service creation: only useful services are created */ -$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); - -// Get the tag info. -if (isset($_REQUEST['old']) && (trim($_REQUEST['old']) != '')) - $old = trim($_REQUEST['old']); -else - $old = NULL; - -if (isset($_REQUEST['new']) && (trim($_REQUEST['new']) != '')) - $new = trim($_REQUEST['new']); -else - $new = NULL; - -if (is_null($old) || is_null($new)) { - $renamed = false; -} else { - // Rename the tag. - $result = $b2tservice->renameTag($userservice->getCurrentUserId(), $old, $new, true); - $renamed = $result; -} - -// Set up the XML file and output the result. -header('Content-Type: text/xml'); -echo '\r\n"; -echo ''. ($renamed ? 'done' : 'something went wrong') .''; -?> -- cgit v1.2.3-54-g00ecf