diff --git a/apps/core_unhosted/admin.php b/apps/core_unhosted/admin.php deleted file mode 100644 index 8a4f9f9a2e0..00000000000 --- a/apps/core_unhosted/admin.php +++ /dev/null @@ -1,50 +0,0 @@ -. -* -*/ - - -// Init owncloud -require_once('../../lib/base.php'); -require_once( 'lib_unhosted.php' ); -require( 'template.php' ); - -// Check if we are a user -if( !OC_USER::isLoggedIn()){ -//var_export($_COOKIE); -//var_export($_SESSION); -//die('get a cookie!'); - header( "Location: ".OC_HELPER::linkTo( "index.php" )); - exit(); -} - -OC_APP::setActiveNavigationEntry( "unhosted_web_administration" ); - -OC_UTIL::addStyle( 'unhosted_web', 'admin' ); -OC_UTIL::addScript( 'unhosted_web', 'admin' ); - -// return template -$tmpl = new OC_TEMPLATE( "unhosted_web", "admin", "admin" ); -$tmpl->assign( 'tokens', OC_UnhostedWeb::getAllTokens()); -$tmpl->printPage(); - -?> diff --git a/apps/core_unhosted/ajax/deletetoken.php b/apps/core_unhosted/ajax/deletetoken.php deleted file mode 100644 index 3e3668188bd..00000000000 --- a/apps/core_unhosted/ajax/deletetoken.php +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/apps/core_unhosted/ajax/link.php b/apps/core_unhosted/ajax/link.php deleted file mode 100644 index 9f479cbd510..00000000000 --- a/apps/core_unhosted/ajax/link.php +++ /dev/null @@ -1,49 +0,0 @@ - 'https://myfavouritesandwich.org:444/', - 'usr' => $_POST['userAddress'],//this is not necessarily the case, you could also use one owncloud user and many user addresses on it - 'pwd' => OC_User::generatePassword(), - ); - $storage = array( - 'dataScope' => $_POST['dataScope'], - 'storageType' => 'http://unhosted.org/spec/dav/0.1', - 'davUrl' => 'https://myfavouritesandwich.org:444/apps/unhosted_web/compat.php/'.$ownCloudDetails['usr'].'/unhosted/', - 'userAddress' => $_POST['userAddress'],//here, it refers to the user sent to DAV in the basic auth - ); - if(OC_User::userExists($ownCloudDetails['usr'])){ - $message = 'account reopened'; - $result = OC_User::setPassword($ownCloudDetails['usr'], $ownCloudDetails['pwd']); - } else { - $message = 'account created'; - $result = OC_User::createUser($ownCloudDetails['usr'], $ownCloudDetails['pwd']); - } - if($result) { - $storage['davToken'] = OC_UnhostedWeb::createDataScope( - 'https://myfavouritesandwich.org/', - $ownCloudDetails['usr'], $storage['dataScope']); - echo json_encode(array('ownCloudDetails' => $ownCloudDetails, 'storage' => $storage)); - exit(); - } else { - echo json_encode( array( "status" => "error", "data" => "couldn't ", "ownCloudDetails" => $ownCloudDetails)); - exit(); - } - } else { - echo json_encode( array( "status" => "error", "data" => "post not ok")); - } -} catch(Exception $e) { - echo json_encode( array( "status" => "error", "data" => $e)); -} -echo json_encode( array( "status" => "error", "data" => array( "message" => "Computer says 'no'" ))); -?> diff --git a/apps/core_unhosted/css/admin.css b/apps/core_unhosted/css/admin.css deleted file mode 100644 index f21b289f043..00000000000 --- a/apps/core_unhosted/css/admin.css +++ /dev/null @@ -1,2 +0,0 @@ -td.path{min-width:200px} -td.expire{width:120px} \ No newline at end of file diff --git a/apps/core_unhosted/img/island.png b/apps/core_unhosted/img/island.png deleted file mode 100644 index 8536e508e34..00000000000 Binary files a/apps/core_unhosted/img/island.png and /dev/null differ diff --git a/apps/core_unhosted/js/admin.js b/apps/core_unhosted/js/admin.js deleted file mode 100644 index bf578c0b547..00000000000 --- a/apps/core_unhosted/js/admin.js +++ /dev/null @@ -1,16 +0,0 @@ -$(document).ready(function() { - $("button.revoke").live('click', function( event ) { - event.preventDefault(); - var token=$(this).attr('data-token'); - var data="token="+token; - $.ajax({ - type: 'GET', - url: 'ajax/deletetoken.php', - cache: false, - data: data, - success: function(){ - $('#'+token).remove(); - } - }); - }); -}); diff --git a/apps/core_unhosted/templates/admin.php b/apps/core_unhosted/templates/admin.php deleted file mode 100644 index 5ad76cc17c8..00000000000 --- a/apps/core_unhosted/templates/admin.php +++ /dev/null @@ -1,19 +0,0 @@ -
| t( 'App-Url' ); ?> | -t( 'User-Address' ); ?> | -t( 'Token' ); ?> | -|
| - | - | - | - |
