diff options
Diffstat (limited to 'docs/skeleton')
-rw-r--r-- | docs/skeleton/admin.php | 8 | ||||
-rw-r--r-- | docs/skeleton/appinfo/app.sample.php | 6 | ||||
-rw-r--r-- | docs/skeleton/index.php | 12 |
3 files changed, 13 insertions, 13 deletions
diff --git a/docs/skeleton/admin.php b/docs/skeleton/admin.php index 723c7f7612b..20df8a0c71d 100644 --- a/docs/skeleton/admin.php +++ b/docs/skeleton/admin.php @@ -29,12 +29,12 @@ $RUNTIME_NOSETUPFS = true; require_once('../lib/base.php'); // We need the file system although we said do not load it! Do it by hand now -OC_UTIL::setupFS(); +OC_Util::setupFS(); // The user should have admin rights. This is an admin page! -if( !OC_USER::isLoggedIn() || !OC_USER::ingroup( $_SESSION['username'], 'admin' )){ +if( !OC_User::isLoggedIn() || !OC_User::ingroup( $_SESSION['username'], 'admin' )){ // Bad boy! Go to the very first page of owncloud - header( "Location: ".OC_HELPER::linkTo( "index.php" )); + header( "Location: ".OC_Helper::linkTo( "index.php" )); exit(); } @@ -43,7 +43,7 @@ $myvar = 2; $myarray = array( "foo" => array( 0, 1, 2 ), "bar" => "baz" ); // Preparing for output! -$tmpl = new OC_TEMPLATE( "skeleton", "admin", "admin" ); // Programname, template, mode +$tmpl = new OC_Template( "skeleton", "admin", "admin" ); // Programname, template, mode // Assign the vars $tmpl->assign( "var", $myvar ); $tmpl->assign( "array", $myarray ); diff --git a/docs/skeleton/appinfo/app.sample.php b/docs/skeleton/appinfo/app.sample.php index 12db7154c2b..ce310996b05 100644 --- a/docs/skeleton/appinfo/app.sample.php +++ b/docs/skeleton/appinfo/app.sample.php @@ -4,12 +4,12 @@ */ // Hello, we are here -OC_APP::register( array( "id" => "skeleton", "name" => "Files", "order" => 1000 )); +OC_App::register( array( "id" => "skeleton", "name" => "Files", "order" => 1000 )); // Add application to navigation -OC_UTIL::addNavigationEntry( array( "id" => "skeleton_index", "order" => 1000, "href" => OC_HELPER::linkTo( "skeleton", "index.php" ), "icon" => OC_HELPER::imagePath( "skeleton", "app.png" ), "name" => "Example app" )); +OC_Util::addNavigationEntry( array( "id" => "skeleton_index", "order" => 1000, "href" => OC_Helper::linkTo( "skeleton", "index.php" ), "icon" => OC_Helper::imagePath( "skeleton", "app.png" ), "name" => "Example app" )); // Add an admin page -OC_UTIL::addAdminPage( array( "order" => 1, "href" => OC_HELPER::linkTo( "skeleton", "admin.php" ), "name" => "Example app options" )); +OC_Util::addAdminPage( array( "order" => 1, "href" => OC_Helper::linkTo( "skeleton", "admin.php" ), "name" => "Example app options" )); ?> diff --git a/docs/skeleton/index.php b/docs/skeleton/index.php index 5402990e4c9..10043887845 100644 --- a/docs/skeleton/index.php +++ b/docs/skeleton/index.php @@ -26,20 +26,20 @@ require_once('../lib/base.php'); // Check if we are a user -if( !OC_USER::isLoggedIn()){ - header( "Location: ".OC_HELPER::linkTo( "index.php" )); +if( !OC_User::isLoggedIn()){ + header( "Location: ".OC_Helper::linkTo( "index.php" )); exit(); } // Load the files we need -OC_UTIL::addStyle( "files", "files" ); -OC_UTIL::addScript( "files", "files" ); +OC_Util::addStyle( "files", "files" ); +OC_Util::addScript( "files", "files" ); // Load the files $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; $files = array(); -foreach( OC_FILES::getdirectorycontent( $dir ) as $i ){ +foreach( OC_Files::getdirectorycontent( $dir ) as $i ){ $i["date"] = date( $CONFIG_DATEFORMAT, $i["mtime"] ); $files[] = $i; } @@ -55,7 +55,7 @@ foreach( explode( "/", $dir ) as $i ){ } // return template -$tmpl = new OC_TEMPLATE( "files", "index", "user" ); +$tmpl = new OC_Template( "files", "index", "user" ); $tmpl->assign( "files", $files ); $tmpl->assign( "breadcrumb", $breadcrumb ); $tmpl->printPage(); |