Browse Source

fix remote and public.php

remotes/origin/stable5
Robin Appelman 14 years ago
parent
commit
b45d3ced79
  1. 2
      apps/calendar/appinfo/version
  2. 2
      apps/contacts/appinfo/version
  3. 2
      apps/files/appinfo/version
  4. 2
      apps/files_sharing/appinfo/version
  5. 2
      apps/gallery/appinfo/version
  6. 2
      apps/media/appinfo/version
  7. 2
      lib/app.php
  8. 1
      public.php
  9. 10
      remote.php

2
apps/calendar/appinfo/version

@ -1 +1 @@
0.5
0.5.2

2
apps/contacts/appinfo/version

@ -1 +1 @@
0.2.1
0.2.3

2
apps/files/appinfo/version

@ -1 +1 @@
1.1.1
1.1.3

2
apps/files_sharing/appinfo/version

@ -1 +1 @@
0.2.1
0.2.2

2
apps/gallery/appinfo/version

@ -1 +1 @@
0.5.0
0.5.1

2
apps/media/appinfo/version

@ -1 +1 @@
0.4
0.4.1

2
lib/app.php

@ -608,7 +608,7 @@ class OC_App{
//set remote/public handelers
$appData=self::getAppInfo($appid);
foreach($appData['remote'] as $name=>$path){
OCP\CONFIG::setAppValue('core', 'remote_'.$name, $path);
OCP\CONFIG::setAppValue('core', 'remote_'.$name, $appid.'/'.$path);
}
foreach($appData['public'] as $name=>$path){
OCP\CONFIG::setAppValue('core', 'public_'.$name, $appid.'/'.$path);

1
public.php

@ -10,6 +10,7 @@ if(is_null($file)){
$parts=explode('/',$file,2);
$app=$parts[0];
OC_Util::checkAppEnabled($app);
OC_App::loadApp($app);

10
remote.php

@ -15,27 +15,25 @@ if (!$pos = strpos($path_info, '/', 1)) {
$pos = strlen($path_info);
}
$service=substr($path_info, 1, $pos-1);
$file = OC_AppConfig::getValue('core', 'remote_' . $service);
$file = preg_replace('/apps\//','', $file); //Todo Remove after Multiappdir migration
if(is_null($file)){
OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND);
exit;
}
$file = ltrim ($file, '/');
$parts=explode('/', $file, 2);
$app=$parts[0];
switch ($app) {
case 'core':
$file = OC::$SERVERROOT .'/'. $file;
break;
default:
OC_Util::checkAppEnabled($app);
OC_App::loadApp($app);
$file = OC_App::getAppPath($app) .'/'. $parts[1];
break;
case 'core':
$file = OC::$SERVERROOT .'/'. $file;
break;
}
$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
require_once($file);
Loading…
Cancel
Save