merge
This commit is contained in:
commit
e42dbbf7f3
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
|
15
lib/app.php
15
lib/app.php
|
@ -49,12 +49,17 @@ class OC_APP{
|
|||
return true;
|
||||
}
|
||||
|
||||
// Get all appinfo
|
||||
$dir = opendir( $SERVERROOT );
|
||||
// Our very own core apps are hardcoded
|
||||
foreach( array( "admin", "files", "log", "settings" ) as $app ){
|
||||
oc_require( "$app/appinfo/app.php" );
|
||||
}
|
||||
|
||||
// The rest comes here
|
||||
$dir = opendir( "$SERVERROOT/apps" );
|
||||
while( false !== ( $filename = readdir( $dir ))){
|
||||
if( substr( $filename, 0, 1 ) != '.' ){
|
||||
if( file_exists( "$SERVERROOT/$filename/appinfo/app.php" )){
|
||||
require( "$filename/appinfo/app.php" );
|
||||
if( file_exists( "$SERVERROOT/apps/$filename/appinfo/app.php" )){
|
||||
require( "apps/$filename/appinfo/app.php" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -281,7 +286,7 @@ class OC_APP{
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Installs an application
|
||||
* @brief Update an application
|
||||
* @param $data array with all information
|
||||
* @returns integer
|
||||
*
|
||||
|
|
|
@ -156,7 +156,7 @@ class OC_UTIL {
|
|||
if($CONFIG_ENABLEBACKUP){
|
||||
// This creates the Directorys recursively
|
||||
if(!is_dir( "$CONFIG_BACKUPDIRECTORY/$user/$root" )){
|
||||
mkdir( "$CONFIG_BACKUPDIRECTORY/$user/$root", 0x755, true );
|
||||
mkdir( "$CONFIG_BACKUPDIRECTORY/$user/$root", 0755, true );
|
||||
}
|
||||
$backupStorage=OC_FILESYSTEM::createStorage('local',array('datadir'=>$CONFIG_BACKUPDIRECTORY));
|
||||
$backup=new OC_FILEOBSERVER_BACKUP(array('storage'=>$backupStorage));
|
||||
|
@ -166,7 +166,7 @@ class OC_UTIL {
|
|||
|
||||
$CONFIG_DATADIRECTORY = "$CONFIG_DATADIRECTORY_ROOT/$user/$root";
|
||||
if( !is_dir( $CONFIG_DATADIRECTORY )){
|
||||
mkdir( $CONFIG_DATADIRECTORY, 0x755, true );
|
||||
mkdir( $CONFIG_DATADIRECTORY, 0755, true );
|
||||
}
|
||||
|
||||
//set up the other storages according to the system settings
|
||||
|
@ -301,7 +301,7 @@ class OC_HOOK{
|
|||
*
|
||||
* TODO: write example
|
||||
*/
|
||||
public function connect( $signalclass, $signalname, $slotclass, $slotname ){
|
||||
static public function connect( $signalclass, $signalname, $slotclass, $slotname ){
|
||||
// Cerate the data structure
|
||||
if( !array_key_exists( $signalclass, self::$registered )){
|
||||
self::$registered[$signalclass] = array();
|
||||
|
@ -330,7 +330,7 @@ class OC_HOOK{
|
|||
*
|
||||
* TODO: write example
|
||||
*/
|
||||
public function emit( $signalclass, $signalname, $params = array()){
|
||||
static public function emit( $signalclass, $signalname, $params = array()){
|
||||
// Return false if there are no slots
|
||||
if( !array_key_exists( $signalclass, self::$registered )){
|
||||
return false;
|
||||
|
|
|
@ -35,6 +35,12 @@ class OC_HELPER {
|
|||
*/
|
||||
public static function linkTo( $app, $file ){
|
||||
global $WEBROOT;
|
||||
global $SERVERROOT;
|
||||
|
||||
// Check if the app is in the app folder
|
||||
if( file_exists( "$SERVERROOT/apps/$app/$file" )){
|
||||
return "$WEBROOT/apps/$app/$file";
|
||||
}
|
||||
return "$WEBROOT/$app/$file";
|
||||
}
|
||||
|
||||
|
@ -47,7 +53,12 @@ class OC_HELPER {
|
|||
* Returns the path to the image.
|
||||
*/
|
||||
public static function imagePath( $app, $image ){
|
||||
global $SERVERROOT;
|
||||
global $WEBROOT;
|
||||
// Check if the app is in the app folder
|
||||
if( file_exists( "$SERVERROOT/apps/img/$app/$file" )){
|
||||
return "$WEBROOT/apps/img/$app/$file";
|
||||
}
|
||||
return "$WEBROOT/$app/img/$image";
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,13 @@ class OC_TEMPLATE{
|
|||
// Get the right template folder
|
||||
$template = "$SERVERROOT/templates/";
|
||||
if( $app != "core" && $app != "" ){
|
||||
$template = "$SERVERROOT/$app/templates/";
|
||||
// Check if the app is in the app folder
|
||||
if( file_exists( "$SERVERROOT/apps/$app/templates/" )){
|
||||
$template = "$SERVERROOT/apps/$app/templates/";
|
||||
}
|
||||
else{
|
||||
$template = "$SERVERROOT/$app/templates/";
|
||||
}
|
||||
}
|
||||
|
||||
// Templates have the ending .php
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<a href="<?php echo link_to("", "index.php"); ?>" title="" id="owncloud"><img src="<?php echo image_path("", "owncloud-logo-small-white.png"); ?>" alt="ownCloud" /></a>
|
||||
|
||||
<div id="user">
|
||||
<a id="user_menu_link" href="" title="">Username</a>
|
||||
<a id="user_menu_link" href="" title=""><? echo $_SESSION["user_id"] ?></a>
|
||||
<ul id="user_menu">
|
||||
<?php foreach($_["personalmenu"] as $entry): ?>
|
||||
<li><a href="<?php echo $entry["href"]; ?>" title=""><?php echo $entry["name"]; ?></a></li>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<a href="<?php echo link_to("", "index.php"); ?>" title="" id="owncloud"><img src="<?php echo image_path("", "owncloud-logo-small-white.png"); ?>" alt="ownCloud" /></a>
|
||||
|
||||
<div id="user">
|
||||
<a id="user_menu_link" href="" title="">Username</a>
|
||||
<a id="user_menu_link" href="" title=""><? echo $_SESSION["user_id"] ?></a>
|
||||
<ul id="user_menu">
|
||||
<?php foreach($_["personalmenu"] as $entry): ?>
|
||||
<li><a href="<?php echo $entry["href"]; ?>" title=""><?php echo $entry["name"]; ?></a></li>
|
||||
|
|
Loading…
Reference in New Issue