nextcloud /
server
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * @copyright Copyright (c) 2016, ownCloud, Inc. |
||
| 4 | * |
||
| 5 | * @author Andreas Fischer <[email protected]> |
||
| 6 | * @author Christopher Schäpers <[email protected]> |
||
| 7 | * @author Frank Karlitschek <[email protected]> |
||
| 8 | * @author Joas Schilling <[email protected]> |
||
| 9 | * @author Jörn Friedrich Dreyer <[email protected]> |
||
| 10 | * @author Lukas Reschke <[email protected]> |
||
| 11 | * @author Masaki Kawabata Neto <[email protected]> |
||
| 12 | * @author Morris Jobke <[email protected]> |
||
| 13 | * |
||
| 14 | * @license AGPL-3.0 |
||
| 15 | * |
||
| 16 | * This code is free software: you can redistribute it and/or modify |
||
| 17 | * it under the terms of the GNU Affero General Public License, version 3, |
||
| 18 | * as published by the Free Software Foundation. |
||
| 19 | * |
||
| 20 | * This program is distributed in the hope that it will be useful, |
||
| 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
| 23 | * GNU Affero General Public License for more details. |
||
| 24 | * |
||
| 25 | * You should have received a copy of the GNU Affero General Public License, version 3, |
||
| 26 | * along with this program. If not, see <http://www.gnu.org/licenses/> |
||
| 27 | * |
||
| 28 | */ |
||
| 29 | |||
| 30 | try { |
||
| 31 | |||
| 32 | require_once __DIR__ . '/lib/base.php'; |
||
| 33 | |||
| 34 | $systemConfig = \OC::$server->getSystemConfig(); |
||
| 35 | |||
| 36 | $installed = (bool) $systemConfig->getValue('installed', false); |
||
| 37 | $maintenance = (bool) $systemConfig->getValue('maintenance', false); |
||
| 38 | # see core/lib/private/legacy/defaults.php and core/themes/example/defaults.php |
||
| 39 | # for description and defaults |
||
| 40 | $defaults = new \OCP\Defaults(); |
||
| 41 | $values=array( |
||
| 42 | 'installed'=>$installed, |
||
| 43 | 'maintenance' => $maintenance, |
||
| 44 | 'needsDbUpgrade' => \OCP\Util::needUpgrade(), |
||
| 45 | 'version'=>implode('.', \OCP\Util::getVersion()), |
||
| 46 | 'versionstring'=>OC_Util::getVersionString(), |
||
| 47 | 'edition'=> '', |
||
| 48 | 'productname'=>$defaults->getName()); |
||
| 49 | if (OC::$CLI) { |
||
| 50 | print_r($values); |
||
| 51 | } else { |
||
| 52 | header('Access-Control-Allow-Origin: *'); |
||
| 53 | header('Content-Type: application/json'); |
||
| 54 | echo json_encode($values); |
||
| 55 | } |
||
| 56 | |||
| 57 | } catch (Exception $ex) { |
||
| 58 | OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); |
||
| 59 | \OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL); |
||
|
0 ignored issues
–
show
|
|||
| 60 | } |
||
| 61 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.