Merge branch 'master' into dont-add-requestheaders-for-cross-domain-requests
This commit is contained in:
commit
2f4a1c9c2c
|
@ -104,8 +104,8 @@
|
||||||
|
|
||||||
<field>
|
<field>
|
||||||
<name>available</name>
|
<name>available</name>
|
||||||
<type>boolean</type>
|
<type>integer</type>
|
||||||
<default>true</default>
|
<default>1</default>
|
||||||
<notnull>true</notnull>
|
<notnull>true</notnull>
|
||||||
</field>
|
</field>
|
||||||
|
|
||||||
|
|
|
@ -528,7 +528,8 @@ class OC {
|
||||||
OC::$SERVERROOT . '/settings',
|
OC::$SERVERROOT . '/settings',
|
||||||
OC::$SERVERROOT . '/ocs',
|
OC::$SERVERROOT . '/ocs',
|
||||||
OC::$SERVERROOT . '/ocs-provider',
|
OC::$SERVERROOT . '/ocs-provider',
|
||||||
OC::$SERVERROOT . '/3rdparty'
|
OC::$SERVERROOT . '/3rdparty',
|
||||||
|
OC::$SERVERROOT . '/tests',
|
||||||
]);
|
]);
|
||||||
spl_autoload_register(array(self::$loader, 'load'));
|
spl_autoload_register(array(self::$loader, 'load'));
|
||||||
$loaderEnd = microtime(true);
|
$loaderEnd = microtime(true);
|
||||||
|
|
|
@ -101,6 +101,15 @@ class OC_App {
|
||||||
}
|
}
|
||||||
// Load the enabled apps here
|
// Load the enabled apps here
|
||||||
$apps = self::getEnabledApps();
|
$apps = self::getEnabledApps();
|
||||||
|
|
||||||
|
// Add each apps' folder as allowed class path
|
||||||
|
foreach($apps as $app) {
|
||||||
|
$path = self::getAppPath($app);
|
||||||
|
if($path !== false) {
|
||||||
|
\OC::$loader->addValidRoot($path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// prevent app.php from printing output
|
// prevent app.php from printing output
|
||||||
ob_start();
|
ob_start();
|
||||||
foreach ($apps as $app) {
|
foreach ($apps as $app) {
|
||||||
|
@ -122,7 +131,6 @@ class OC_App {
|
||||||
*/
|
*/
|
||||||
public static function loadApp($app, $checkUpgrade = true) {
|
public static function loadApp($app, $checkUpgrade = true) {
|
||||||
self::$loadedApps[] = $app;
|
self::$loadedApps[] = $app;
|
||||||
\OC::$loader->addValidRoot(self::getAppPath($app));
|
|
||||||
if (is_file(self::getAppPath($app) . '/appinfo/app.php')) {
|
if (is_file(self::getAppPath($app) . '/appinfo/app.php')) {
|
||||||
\OC::$server->getEventLogger()->start('load_app_' . $app, 'Load app: ' . $app);
|
\OC::$server->getEventLogger()->start('load_app_' . $app, 'Load app: ' . $app);
|
||||||
if ($checkUpgrade and self::shouldUpgrade($app)) {
|
if ($checkUpgrade and self::shouldUpgrade($app)) {
|
||||||
|
|
|
@ -58,7 +58,8 @@ class Storage {
|
||||||
$this->numericId = $row['numeric_id'];
|
$this->numericId = $row['numeric_id'];
|
||||||
} else {
|
} else {
|
||||||
$connection = \OC_DB::getConnection();
|
$connection = \OC_DB::getConnection();
|
||||||
if ($connection->insertIfNotExist('*PREFIX*storages', ['id' => $this->storageId, 'available' => $isAvailable])) {
|
$available = $isAvailable ? 1 : 0;
|
||||||
|
if ($connection->insertIfNotExist('*PREFIX*storages', ['id' => $this->storageId, 'available' => $available])) {
|
||||||
$this->numericId = \OC_DB::insertid('*PREFIX*storages');
|
$this->numericId = \OC_DB::insertid('*PREFIX*storages');
|
||||||
} else {
|
} else {
|
||||||
if ($row = self::getStorageById($this->storageId)) {
|
if ($row = self::getStorageById($this->storageId)) {
|
||||||
|
@ -141,7 +142,7 @@ class Storage {
|
||||||
public function getAvailability() {
|
public function getAvailability() {
|
||||||
if ($row = self::getStorageById($this->storageId)) {
|
if ($row = self::getStorageById($this->storageId)) {
|
||||||
return [
|
return [
|
||||||
'available' => $row['available'],
|
'available' => ($row['available'] === 1),
|
||||||
'last_checked' => $row['last_checked']
|
'last_checked' => $row['last_checked']
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
|
@ -154,7 +155,8 @@ class Storage {
|
||||||
*/
|
*/
|
||||||
public function setAvailability($isAvailable) {
|
public function setAvailability($isAvailable) {
|
||||||
$sql = 'UPDATE `*PREFIX*storages` SET `available` = ?, `last_checked` = ? WHERE `id` = ?';
|
$sql = 'UPDATE `*PREFIX*storages` SET `available` = ?, `last_checked` = ? WHERE `id` = ?';
|
||||||
\OC_DB::executeAudited($sql, array($isAvailable, time(), $this->storageId));
|
$available = $isAvailable ? 1 : 0;
|
||||||
|
\OC_DB::executeAudited($sql, array($available, time(), $this->storageId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
// We only can count up. The 4. digit is only for the internal patchlevel to trigger DB upgrades
|
// We only can count up. The 4. digit is only for the internal patchlevel to trigger DB upgrades
|
||||||
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
|
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
|
||||||
// when updating major/minor version number.
|
// when updating major/minor version number.
|
||||||
$OC_Version = [8, 2, 0, 4];
|
$OC_Version = [8, 2, 0, 5];
|
||||||
|
|
||||||
// The human readable string
|
// The human readable string
|
||||||
$OC_VersionString = '8.2 pre alpha';
|
$OC_VersionString = '8.2 pre alpha';
|
||||||
|
|
Loading…
Reference in New Issue