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 @@ - - - - - - - - - - $details):?> - - - - - - - - -
t( 'App-Url' ); ?>t( 'User-Address' ); ?>t( 'Token' ); ?>
diff --git a/apps/core_unhosted/templates/breadcrumb.php b/apps/core_unhosted/templates/breadcrumb.php deleted file mode 100644 index 733531d9e10..00000000000 --- a/apps/core_unhosted/templates/breadcrumb.php +++ /dev/null @@ -1,4 +0,0 @@ - " alt="Root" /> - - "> - \ No newline at end of file diff --git a/apps/core_unhosted/templates/files.php b/apps/core_unhosted/templates/files.php deleted file mode 100644 index b4ae17656c3..00000000000 --- a/apps/core_unhosted/templates/files.php +++ /dev/null @@ -1,9 +0,0 @@ - - - - )" href="" title=""> - - - + - - \ No newline at end of file diff --git a/apps/unhosted/appinfo/app.php b/apps/unhosted/appinfo/app.php new file mode 100644 index 00000000000..84e07304534 --- /dev/null +++ b/apps/unhosted/appinfo/app.php @@ -0,0 +1,5 @@ + 10, + 'id' => 'unhosted', + 'name' => 'Unhosted Web' )); diff --git a/apps/core_unhosted/appinfo/database.xml b/apps/unhosted/appinfo/database.xml similarity index 100% rename from apps/core_unhosted/appinfo/database.xml rename to apps/unhosted/appinfo/database.xml diff --git a/apps/core_unhosted/appinfo/info.xml b/apps/unhosted/appinfo/info.xml similarity index 92% rename from apps/core_unhosted/appinfo/info.xml rename to apps/unhosted/appinfo/info.xml index dccbd3b8245..359620f4578 100644 --- a/apps/core_unhosted/appinfo/info.xml +++ b/apps/unhosted/appinfo/info.xml @@ -1,6 +1,6 @@ - core_unhosted + unhosted Unhosted Web On websites that allow unhosted accounts, use your owncloud as the storage for your user data 0.1 diff --git a/apps/core_unhosted/compat.php b/apps/unhosted/compat.php similarity index 100% rename from apps/core_unhosted/compat.php rename to apps/unhosted/compat.php diff --git a/apps/core_unhosted/lib_unhosted.php b/apps/unhosted/lib_unhosted.php similarity index 100% rename from apps/core_unhosted/lib_unhosted.php rename to apps/unhosted/lib_unhosted.php diff --git a/apps/core_unhosted/oauth_ro_auth.php b/apps/unhosted/oauth_ro_auth.php similarity index 100% rename from apps/core_unhosted/oauth_ro_auth.php rename to apps/unhosted/oauth_ro_auth.php