-Scuttle contains code from the following applications:
+Scuttle and SemanticScuttle contain codes from the following applications:
------------
GPL Licenced
Andreas Gohr <andi@splitbrain.org>
XSPF Web Music Player (Flash)
-http://musicplayer.sourceforge.net/
\ No newline at end of file
+http://musicplayer.sourceforge.net/
+
+
+----
+
+Patches were realised by :
+
+* Simple Admin-Interface for deleting unwanted users
+Idea of the patch from Andreas Jaggi, for details visit:\r
+http://sourceforge.net/tracker/index.php?func=detail&aid=1543065&group_id=134378&atid=729862
+Adaptation by Andreas Keller (aka Arakel) http://akeller.eu for Takuya Misawa.
--- /dev/null
+<?php\r
+/***************************************************************************\r
+Copyright (C) 2007 - 2008 SemanticScuttle project (fork from Scuttle)\r
+http://sourceforge.net/projects/semanticscuttle/\r\r
+\r
+This program is free software; you can redistribute it and/or modify\r
+it under the terms of the GNU General Public License as published by\r
+the Free Software Foundation; either version 2 of the License, or\r
+(at your option) any later version.\r
+\r
+This program is distributed in the hope that it will be useful,\r
+but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+GNU General Public License for more details.\r
+You should have received a copy of the GNU General Public License\r
+along with this program; if not, write to the Free Software\r
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+***************************************************************************/\r
+\r
+require_once('header.inc.php');\r
+\r
+$userservice = & ServiceFactory :: getServiceInstance('UserService');\r
+$bookmark2tagservice = & ServiceFactory :: getServiceInstance('Bookmark2Tagservice');\r
+$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService');
+$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService');\r
+$templateservice = & ServiceFactory :: getServiceInstance('TemplateService');\r
+\r
+// Header variables\r
+$tplVars['subtitle'] = T_('Manage users');\r
+$tplVars['loadjs'] = true;\r
+\r
+if ( !$userservice->isLoggedOn() ) {\r
+ header('Location: '. createURL('login', ''));\r
+ exit();\r
+}\r
+\r
+$currentUser = $userservice->getCurrentUser();\r
+$currentUserID = $userservice->getCurrentUserId();\r
+$currentUsername = $currentUser[$userservice->getFieldName('username')];\r
+\r
+if ( !$userservice->isAdmin($currentUserID) ) {\r
+ header('Location: '. createURL('bookmarks', $currentUsername));\r
+ exit();\r
+}\r
+\r
+@list($url, $action, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;\r
+\r
+if ( $action ) {\r
+ switch ( $action ) {\r
+ case 'delete':\r
+ if ( $user && ($userinfo = $userservice->getUserByUsername($user)) ) {\r
+ $uId = $userinfo['uId'];\r
+
+ $tag2tagservice->removeLinkedTags('','','',$uId);\r
+ $userservice->deleteUser($uId);\r
+ $bookmark2tagservice->deleteTagsForUser($uId);\r
+ // XXX: don't delete bookmarks before tags, else tags can't be deleted !!!\r
+ $bookmarkservice->deleteBookmarksForUser($uId);\r
+\r
+ $tplVars['msg'] = sprintf(T_('%s and all his bookmarks and tags were deleted.'), $user);\r
+ }\r
+ break;\r
+ default:\r
+ // DO NOTHING\r
+ }\r
+}\r
+\r
+$templatename = 'userlist.tpl';\r
+$users =& $userservice->getAllUsers();\r
+\r
+if ( !is_array($users) ) {\r
+ $users = array();\r
+}\r
+\r
+$tplVars['users'] =& $users;\r
+\r
+$templateservice->loadTemplate($templatename, $tplVars);\r
+?>\r