diff --git a/admin/appinfo/app.php b/admin/appinfo/app.php index a0ee0a0e55..9e39a05244 100644 --- a/admin/appinfo/app.php +++ b/admin/appinfo/app.php @@ -5,8 +5,10 @@ if( OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' )) { OC_APP::addNavigationEntry( array( "id" => "admin_index", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "index.php" ), "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ), "name" => "Administration" )); } -OC_APP::addAdminPage( array( "order" => 1, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" => "System settings" )); -OC_APP::addAdminPage( array( "order" => 2, "href" => OC_HELPER::linkTo( "admin", "users.php" ), "name" => "Users" )); -OC_APP::addAdminPage( array( "order" => 3, "href" => OC_HELPER::linkTo( "admin", "plugins.php" ), "name" => "Plugins" )); +OC_APP::addAdminPage( array( "id" => "core_basic", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "basic.php" ), "name" => "Basic Settings" )); +OC_APP::addAdminPage( array( "id" => "core_system", "order" => 2, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" => "System settings" )); +OC_APP::addAdminPage( array( "id" => "core_users", "order" => 3, "href" => OC_HELPER::linkTo( "admin", "users.php" ), "name" => "Users" )); +OC_APP::addAdminPage( array( "id" => "core_apps", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "apps.php" ), "name" => "Apps" )); +OC_APP::addAdminPage( array( "id" => "core_plugins", "order" => 5, "href" => OC_HELPER::linkTo( "admin", "plugins.php" ), "name" => "Plugins" )); ?> diff --git a/admin/index.php b/admin/index.php index 8abef28709..2446ebc50a 100644 --- a/admin/index.php +++ b/admin/index.php @@ -28,15 +28,21 @@ if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' exit(); } -$adminpages = array(); +$apppages = array(); +$syspages = array(); foreach( OC_APP::getAdminPages() as $i ){ - // Do some more work here soon - $adminpages[] = $i; + if( substr( $i["id"], 0, 5 ) == "core_" ){ + $syspages[] = $i; + } + else{ + $apppages[] = $i; + } } $tmpl = new OC_TEMPLATE( "admin", "index", "admin" ); -$tmpl->assign( "adminpages", $adminpages ); +$tmpl->assign( "apppages", $apppages ); +$tmpl->assign( "syspages", $syspages ); $tmpl->printPage(); ?> diff --git a/admin/templates/index.php b/admin/templates/index.php index 9d0ffd84c6..fa32a67ead 100644 --- a/admin/templates/index.php +++ b/admin/templates/index.php @@ -5,8 +5,15 @@ ?>

Administration

+

System

+

Applications

+ diff --git a/admin/templates/users.php b/admin/templates/users.php index 7aa93baf49..88edc01aef 100644 --- a/admin/templates/users.php +++ b/admin/templates/users.php @@ -9,36 +9,71 @@ - + - +
Name Groups
edit | remove
+New user +

Groups

- - - - - - - - - + +
Name
+ - - + + - - -
removeName
+ + + + + + remove + + + + + + + + + + +Add group + + +
+
+ User name
+
+ Password
+ +
+
+ +
+
+ New password for $user
+ +
+
+ +
+ Do you really want to delete user $user? +
+ +
+ Do you really want to delete group $group? +
diff --git a/admin/users.php b/admin/users.php index 4d14c791c3..312bfba2c5 100644 --- a/admin/users.php +++ b/admin/users.php @@ -28,21 +28,24 @@ if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin' exit(); } +// We have some javascript foo! +OC_UTIL::addScript( "admin", "users" ); + $users = array(); $groups = array(); foreach( OC_USER::getUsers() as $i ){ // Do some more work here soon $ingroups = array(); - foreach( OC_USER::getUserGroups( $i ) as $userGroup){ - $ingroup[] = OC_USER::getGroupName( $userGroup ); + foreach( OC_GROUP::getUserGroups( $i ) as $userGroup ){ + $ingroups[] = $userGroup; } $users[] = array( "name" => $i, "groups" => join( ",", $ingroups )); } -foreach( OC_USER::getGroups() as $i ){ +foreach( OC_GROUP::getGroups() as $i ){ // Do some more work here soon - $groups[] = array( "name" => $i ); + $groups[] = array( "name" => $i["gid"] ); } $tmpl = new OC_TEMPLATE( "admin", "users", "admin" ); diff --git a/index.php b/index.php index 2f56510bfb..c744f094e6 100644 --- a/index.php +++ b/index.php @@ -24,8 +24,6 @@ require_once( 'lib/base.php' ); require_once( 'appconfig.php' ); require_once( 'template.php' ); -var_dump( $_SESSION ); -//exit; if( OC_USER::isLoggedIn()){ if( $_GET["logout"] ){ OC_USER::logout(); diff --git a/lib/Group/database.php b/lib/Group/database.php index bdf5bbc5c5..e3e6c825b9 100644 --- a/lib/Group/database.php +++ b/lib/Group/database.php @@ -119,7 +119,7 @@ class OC_GROUP_DATABASE extends OC_GROUP_BACKEND { $groups = array(); while( $row = $result->fetchRow()){ - $groups[] = $row; + $groups[] = $row["gid"]; } return $groups;