@@ -32,25 +32,25 @@ |
||
| 32 | 32 | * @deprecated 14.0.0 |
| 33 | 33 | */ |
| 34 | 34 | class BackgroundJob { |
| 35 | - /** |
|
| 36 | - * @since 5.0.0 |
|
| 37 | - * @deprecated 14.0.0 |
|
| 38 | - */ |
|
| 39 | - public static function getExecutionType() { |
|
| 40 | - return ''; |
|
| 41 | - } |
|
| 35 | + /** |
|
| 36 | + * @since 5.0.0 |
|
| 37 | + * @deprecated 14.0.0 |
|
| 38 | + */ |
|
| 39 | + public static function getExecutionType() { |
|
| 40 | + return ''; |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * @since 5.0.0 |
|
| 45 | - * @deprecated 14.0.0 |
|
| 46 | - */ |
|
| 47 | - public static function setExecutionType($type) { |
|
| 48 | - } |
|
| 43 | + /** |
|
| 44 | + * @since 5.0.0 |
|
| 45 | + * @deprecated 14.0.0 |
|
| 46 | + */ |
|
| 47 | + public static function setExecutionType($type) { |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - /** |
|
| 51 | - * @since 6.0.0 |
|
| 52 | - * @deprecated 8.1.0 Use \OC::$server->getJobList()->add() instead |
|
| 53 | - */ |
|
| 54 | - public static function registerJob($job, $argument = null) { |
|
| 55 | - } |
|
| 50 | + /** |
|
| 51 | + * @since 6.0.0 |
|
| 52 | + * @deprecated 8.1.0 Use \OC::$server->getJobList()->add() instead |
|
| 53 | + */ |
|
| 54 | + public static function registerJob($job, $argument = null) { |
|
| 55 | + } |
|
| 56 | 56 | } |
@@ -34,11 +34,11 @@ discard block |
||
| 34 | 34 | * |
| 35 | 35 | */ |
| 36 | 36 | |
| 37 | -require_once __DIR__ . '/lib/versioncheck.php'; |
|
| 37 | +require_once __DIR__.'/lib/versioncheck.php'; |
|
| 38 | 38 | |
| 39 | 39 | try { |
| 40 | 40 | |
| 41 | - require_once __DIR__ . '/lib/base.php'; |
|
| 41 | + require_once __DIR__.'/lib/base.php'; |
|
| 42 | 42 | |
| 43 | 43 | if (\OCP\Util::needUpgrade()) { |
| 44 | 44 | \OCP\Util::writeLog('cron', 'Update required, skipping cron', \OCP\Util::DEBUG); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $appMode = $config->getAppValue('core', 'backgroundjobs_mode', 'ajax'); |
| 75 | 75 | if ($appMode === 'none') { |
| 76 | 76 | if (OC::$CLI) { |
| 77 | - echo 'Background Jobs are disabled!' . PHP_EOL; |
|
| 77 | + echo 'Background Jobs are disabled!'.PHP_EOL; |
|
| 78 | 78 | } else { |
| 79 | 79 | OC_JSON::error(array('data' => array('message' => 'Background jobs disabled!'))); |
| 80 | 80 | } |
@@ -89,15 +89,15 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | // the cron job must be executed with the right user |
| 91 | 91 | if (!function_exists('posix_getuid')) { |
| 92 | - echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL; |
|
| 92 | + echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php".PHP_EOL; |
|
| 93 | 93 | exit(1); |
| 94 | 94 | } |
| 95 | 95 | $user = posix_getpwuid(posix_getuid()); |
| 96 | - $configUser = posix_getpwuid(fileowner(OC::$configDir . 'config.php')); |
|
| 96 | + $configUser = posix_getpwuid(fileowner(OC::$configDir.'config.php')); |
|
| 97 | 97 | if ($user['name'] !== $configUser['name']) { |
| 98 | - echo "Console has to be executed with the same user as the web server is operated" . PHP_EOL; |
|
| 99 | - echo "Current user: " . $user['name'] . PHP_EOL; |
|
| 100 | - echo "Web server user: " . $configUser['name'] . PHP_EOL; |
|
| 98 | + echo "Console has to be executed with the same user as the web server is operated".PHP_EOL; |
|
| 99 | + echo "Current user: ".$user['name'].PHP_EOL; |
|
| 100 | + echo "Web server user: ".$configUser['name'].PHP_EOL; |
|
| 101 | 101 | exit(1); |
| 102 | 102 | } |
| 103 | 103 | |
@@ -38,124 +38,124 @@ |
||
| 38 | 38 | |
| 39 | 39 | try { |
| 40 | 40 | |
| 41 | - require_once __DIR__ . '/lib/base.php'; |
|
| 42 | - |
|
| 43 | - if (\OCP\Util::needUpgrade()) { |
|
| 44 | - \OCP\Util::writeLog('cron', 'Update required, skipping cron', \OCP\Util::DEBUG); |
|
| 45 | - exit; |
|
| 46 | - } |
|
| 47 | - if (\OC::$server->getSystemConfig()->getValue('maintenance', false)) { |
|
| 48 | - \OCP\Util::writeLog('cron', 'We are in maintenance mode, skipping cron', \OCP\Util::DEBUG); |
|
| 49 | - exit; |
|
| 50 | - } |
|
| 51 | - |
|
| 52 | - // load all apps to get all api routes properly setup |
|
| 53 | - OC_App::loadApps(); |
|
| 54 | - |
|
| 55 | - \OC::$server->getSession()->close(); |
|
| 56 | - |
|
| 57 | - // initialize a dummy memory session |
|
| 58 | - $session = new \OC\Session\Memory(''); |
|
| 59 | - $cryptoWrapper = \OC::$server->getSessionCryptoWrapper(); |
|
| 60 | - $session = $cryptoWrapper->wrapSession($session); |
|
| 61 | - \OC::$server->setSession($session); |
|
| 62 | - |
|
| 63 | - $logger = \OC::$server->getLogger(); |
|
| 64 | - $config = \OC::$server->getConfig(); |
|
| 65 | - |
|
| 66 | - // Don't do anything if Nextcloud has not been installed |
|
| 67 | - if (!$config->getSystemValue('installed', false)) { |
|
| 68 | - exit(0); |
|
| 69 | - } |
|
| 70 | - |
|
| 71 | - \OC::$server->getTempManager()->cleanOld(); |
|
| 72 | - |
|
| 73 | - // Exit if background jobs are disabled! |
|
| 74 | - $appMode = $config->getAppValue('core', 'backgroundjobs_mode', 'ajax'); |
|
| 75 | - if ($appMode === 'none') { |
|
| 76 | - if (OC::$CLI) { |
|
| 77 | - echo 'Background Jobs are disabled!' . PHP_EOL; |
|
| 78 | - } else { |
|
| 79 | - OC_JSON::error(array('data' => array('message' => 'Background jobs disabled!'))); |
|
| 80 | - } |
|
| 81 | - exit(1); |
|
| 82 | - } |
|
| 83 | - |
|
| 84 | - if (OC::$CLI) { |
|
| 85 | - // set to run indefinitely if needed |
|
| 86 | - if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) { |
|
| 87 | - @set_time_limit(0); |
|
| 88 | - } |
|
| 89 | - |
|
| 90 | - // the cron job must be executed with the right user |
|
| 91 | - if (!function_exists('posix_getuid')) { |
|
| 92 | - echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL; |
|
| 93 | - exit(1); |
|
| 94 | - } |
|
| 95 | - $user = posix_getpwuid(posix_getuid()); |
|
| 96 | - $configUser = posix_getpwuid(fileowner(OC::$configDir . 'config.php')); |
|
| 97 | - if ($user['name'] !== $configUser['name']) { |
|
| 98 | - echo "Console has to be executed with the same user as the web server is operated" . PHP_EOL; |
|
| 99 | - echo "Current user: " . $user['name'] . PHP_EOL; |
|
| 100 | - echo "Web server user: " . $configUser['name'] . PHP_EOL; |
|
| 101 | - exit(1); |
|
| 102 | - } |
|
| 103 | - |
|
| 104 | - // We call Nextcloud from the CLI (aka cron) |
|
| 105 | - if ($appMode !== 'cron') { |
|
| 106 | - $config->setAppValue('core', 'backgroundjobs_mode', 'cron'); |
|
| 107 | - } |
|
| 108 | - |
|
| 109 | - // Work |
|
| 110 | - $jobList = \OC::$server->getJobList(); |
|
| 111 | - |
|
| 112 | - // We only ask for jobs for 14 minutes, because after 15 minutes the next |
|
| 113 | - // system cron task should spawn. |
|
| 114 | - $endTime = time() + 14 * 60; |
|
| 115 | - |
|
| 116 | - $executedJobs = []; |
|
| 117 | - while ($job = $jobList->getNext()) { |
|
| 118 | - if (isset($executedJobs[$job->getId()])) { |
|
| 119 | - $jobList->unlockJob($job); |
|
| 120 | - break; |
|
| 121 | - } |
|
| 122 | - |
|
| 123 | - $job->execute($jobList, $logger); |
|
| 124 | - // clean up after unclean jobs |
|
| 125 | - \OC_Util::tearDownFS(); |
|
| 126 | - |
|
| 127 | - $jobList->setLastJob($job); |
|
| 128 | - $executedJobs[$job->getId()] = true; |
|
| 129 | - unset($job); |
|
| 130 | - |
|
| 131 | - if (time() > $endTime) { |
|
| 132 | - break; |
|
| 133 | - } |
|
| 134 | - } |
|
| 135 | - |
|
| 136 | - } else { |
|
| 137 | - // We call cron.php from some website |
|
| 138 | - if ($appMode == 'cron') { |
|
| 139 | - // Cron is cron :-P |
|
| 140 | - OC_JSON::error(array('data' => array('message' => 'Backgroundjobs are using system cron!'))); |
|
| 141 | - } else { |
|
| 142 | - // Work and success :-) |
|
| 143 | - $jobList = \OC::$server->getJobList(); |
|
| 144 | - $job = $jobList->getNext(); |
|
| 145 | - if ($job != null) { |
|
| 146 | - $job->execute($jobList, $logger); |
|
| 147 | - $jobList->setLastJob($job); |
|
| 148 | - } |
|
| 149 | - OC_JSON::success(); |
|
| 150 | - } |
|
| 151 | - } |
|
| 152 | - |
|
| 153 | - // Log the successful cron execution |
|
| 154 | - \OC::$server->getConfig()->setAppValue('core', 'lastcron', time()); |
|
| 155 | - exit(); |
|
| 41 | + require_once __DIR__ . '/lib/base.php'; |
|
| 42 | + |
|
| 43 | + if (\OCP\Util::needUpgrade()) { |
|
| 44 | + \OCP\Util::writeLog('cron', 'Update required, skipping cron', \OCP\Util::DEBUG); |
|
| 45 | + exit; |
|
| 46 | + } |
|
| 47 | + if (\OC::$server->getSystemConfig()->getValue('maintenance', false)) { |
|
| 48 | + \OCP\Util::writeLog('cron', 'We are in maintenance mode, skipping cron', \OCP\Util::DEBUG); |
|
| 49 | + exit; |
|
| 50 | + } |
|
| 51 | + |
|
| 52 | + // load all apps to get all api routes properly setup |
|
| 53 | + OC_App::loadApps(); |
|
| 54 | + |
|
| 55 | + \OC::$server->getSession()->close(); |
|
| 56 | + |
|
| 57 | + // initialize a dummy memory session |
|
| 58 | + $session = new \OC\Session\Memory(''); |
|
| 59 | + $cryptoWrapper = \OC::$server->getSessionCryptoWrapper(); |
|
| 60 | + $session = $cryptoWrapper->wrapSession($session); |
|
| 61 | + \OC::$server->setSession($session); |
|
| 62 | + |
|
| 63 | + $logger = \OC::$server->getLogger(); |
|
| 64 | + $config = \OC::$server->getConfig(); |
|
| 65 | + |
|
| 66 | + // Don't do anything if Nextcloud has not been installed |
|
| 67 | + if (!$config->getSystemValue('installed', false)) { |
|
| 68 | + exit(0); |
|
| 69 | + } |
|
| 70 | + |
|
| 71 | + \OC::$server->getTempManager()->cleanOld(); |
|
| 72 | + |
|
| 73 | + // Exit if background jobs are disabled! |
|
| 74 | + $appMode = $config->getAppValue('core', 'backgroundjobs_mode', 'ajax'); |
|
| 75 | + if ($appMode === 'none') { |
|
| 76 | + if (OC::$CLI) { |
|
| 77 | + echo 'Background Jobs are disabled!' . PHP_EOL; |
|
| 78 | + } else { |
|
| 79 | + OC_JSON::error(array('data' => array('message' => 'Background jobs disabled!'))); |
|
| 80 | + } |
|
| 81 | + exit(1); |
|
| 82 | + } |
|
| 83 | + |
|
| 84 | + if (OC::$CLI) { |
|
| 85 | + // set to run indefinitely if needed |
|
| 86 | + if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) { |
|
| 87 | + @set_time_limit(0); |
|
| 88 | + } |
|
| 89 | + |
|
| 90 | + // the cron job must be executed with the right user |
|
| 91 | + if (!function_exists('posix_getuid')) { |
|
| 92 | + echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL; |
|
| 93 | + exit(1); |
|
| 94 | + } |
|
| 95 | + $user = posix_getpwuid(posix_getuid()); |
|
| 96 | + $configUser = posix_getpwuid(fileowner(OC::$configDir . 'config.php')); |
|
| 97 | + if ($user['name'] !== $configUser['name']) { |
|
| 98 | + echo "Console has to be executed with the same user as the web server is operated" . PHP_EOL; |
|
| 99 | + echo "Current user: " . $user['name'] . PHP_EOL; |
|
| 100 | + echo "Web server user: " . $configUser['name'] . PHP_EOL; |
|
| 101 | + exit(1); |
|
| 102 | + } |
|
| 103 | + |
|
| 104 | + // We call Nextcloud from the CLI (aka cron) |
|
| 105 | + if ($appMode !== 'cron') { |
|
| 106 | + $config->setAppValue('core', 'backgroundjobs_mode', 'cron'); |
|
| 107 | + } |
|
| 108 | + |
|
| 109 | + // Work |
|
| 110 | + $jobList = \OC::$server->getJobList(); |
|
| 111 | + |
|
| 112 | + // We only ask for jobs for 14 minutes, because after 15 minutes the next |
|
| 113 | + // system cron task should spawn. |
|
| 114 | + $endTime = time() + 14 * 60; |
|
| 115 | + |
|
| 116 | + $executedJobs = []; |
|
| 117 | + while ($job = $jobList->getNext()) { |
|
| 118 | + if (isset($executedJobs[$job->getId()])) { |
|
| 119 | + $jobList->unlockJob($job); |
|
| 120 | + break; |
|
| 121 | + } |
|
| 122 | + |
|
| 123 | + $job->execute($jobList, $logger); |
|
| 124 | + // clean up after unclean jobs |
|
| 125 | + \OC_Util::tearDownFS(); |
|
| 126 | + |
|
| 127 | + $jobList->setLastJob($job); |
|
| 128 | + $executedJobs[$job->getId()] = true; |
|
| 129 | + unset($job); |
|
| 130 | + |
|
| 131 | + if (time() > $endTime) { |
|
| 132 | + break; |
|
| 133 | + } |
|
| 134 | + } |
|
| 135 | + |
|
| 136 | + } else { |
|
| 137 | + // We call cron.php from some website |
|
| 138 | + if ($appMode == 'cron') { |
|
| 139 | + // Cron is cron :-P |
|
| 140 | + OC_JSON::error(array('data' => array('message' => 'Backgroundjobs are using system cron!'))); |
|
| 141 | + } else { |
|
| 142 | + // Work and success :-) |
|
| 143 | + $jobList = \OC::$server->getJobList(); |
|
| 144 | + $job = $jobList->getNext(); |
|
| 145 | + if ($job != null) { |
|
| 146 | + $job->execute($jobList, $logger); |
|
| 147 | + $jobList->setLastJob($job); |
|
| 148 | + } |
|
| 149 | + OC_JSON::success(); |
|
| 150 | + } |
|
| 151 | + } |
|
| 152 | + |
|
| 153 | + // Log the successful cron execution |
|
| 154 | + \OC::$server->getConfig()->setAppValue('core', 'lastcron', time()); |
|
| 155 | + exit(); |
|
| 156 | 156 | |
| 157 | 157 | } catch (Exception $ex) { |
| 158 | - \OC::$server->getLogger()->logException($ex, ['app' => 'cron']); |
|
| 158 | + \OC::$server->getLogger()->logException($ex, ['app' => 'cron']); |
|
| 159 | 159 | } catch (Error $ex) { |
| 160 | - \OC::$server->getLogger()->logException($ex, ['app' => 'cron']); |
|
| 160 | + \OC::$server->getLogger()->logException($ex, ['app' => 'cron']); |
|
| 161 | 161 | } |
@@ -24,147 +24,147 @@ |
||
| 24 | 24 | namespace OC\App\CodeChecker; |
| 25 | 25 | |
| 26 | 26 | class DeprecationCheck extends AbstractCheck { |
| 27 | - /** |
|
| 28 | - * @return string |
|
| 29 | - */ |
|
| 30 | - protected function getLocalDescription() { |
|
| 31 | - return 'deprecated'; |
|
| 32 | - } |
|
| 33 | - |
|
| 34 | - /** |
|
| 35 | - * @return array E.g.: `'ClassName' => 'oc version',` |
|
| 36 | - */ |
|
| 37 | - protected function getLocalClasses() { |
|
| 38 | - return [ |
|
| 39 | - 'OC_JSON' => '8.2.0', |
|
| 40 | - |
|
| 41 | - 'OCP\Contacts' => '8.1.0', |
|
| 42 | - 'OCP\DB' => '8.1.0', |
|
| 43 | - 'OCP\IHelper' => '8.1.0', |
|
| 44 | - 'OCP\JSON' => '8.1.0', |
|
| 45 | - 'OCP\Response' => '8.1.0', |
|
| 46 | - 'OCP\AppFramework\IApi' => '8.0.0', |
|
| 47 | - 'OCP\User' => '13.0.0', |
|
| 48 | - 'OCP\BackgroundJob' => '14.0.0', |
|
| 49 | - ]; |
|
| 50 | - } |
|
| 51 | - |
|
| 52 | - /** |
|
| 53 | - * @return array E.g.: `'ClassName::CONSTANT_NAME' => 'oc version',` |
|
| 54 | - */ |
|
| 55 | - protected function getLocalConstants() { |
|
| 56 | - return [ |
|
| 57 | - 'OC_API::GUEST_AUTH' => '8.2.0', |
|
| 58 | - 'OC_API::USER_AUTH' => '8.2.0', |
|
| 59 | - 'OC_API::SUBADMIN_AUTH' => '8.2.0', |
|
| 60 | - 'OC_API::ADMIN_AUTH' => '8.2.0', |
|
| 61 | - 'OC_API::RESPOND_UNAUTHORISED' => '8.2.0', |
|
| 62 | - 'OC_API::RESPOND_SERVER_ERROR' => '8.2.0', |
|
| 63 | - 'OC_API::RESPOND_NOT_FOUND' => '8.2.0', |
|
| 64 | - 'OC_API::RESPOND_UNKNOWN_ERROR' => '8.2.0', |
|
| 65 | - |
|
| 66 | - 'OCP::PERMISSION_CREATE' => '8.0.0', |
|
| 67 | - 'OCP::PERMISSION_READ' => '8.0.0', |
|
| 68 | - 'OCP::PERMISSION_UPDATE' => '8.0.0', |
|
| 69 | - 'OCP::PERMISSION_DELETE' => '8.0.0', |
|
| 70 | - 'OCP::PERMISSION_SHARE' => '8.0.0', |
|
| 71 | - 'OCP::PERMISSION_ALL' => '8.0.0', |
|
| 72 | - 'OCP::FILENAME_INVALID_CHARS' => '8.0.0', |
|
| 73 | - ]; |
|
| 74 | - } |
|
| 75 | - |
|
| 76 | - /** |
|
| 77 | - * @return array E.g.: `'functionName' => 'oc version',` |
|
| 78 | - */ |
|
| 79 | - protected function getLocalFunctions() { |
|
| 80 | - return [ |
|
| 81 | - 'OCP::image_path' => '8.0.0', |
|
| 82 | - 'OCP::mimetype_icon' => '8.0.0', |
|
| 83 | - 'OCP::preview_icon' => '8.0.0', |
|
| 84 | - 'OCP::publicPreview_icon' => '8.0.0', |
|
| 85 | - 'OCP::human_file_size' => '8.0.0', |
|
| 86 | - 'OCP::relative_modified_date' => '8.0.0', |
|
| 87 | - 'OCP::simple_file_size' => '8.0.0', |
|
| 88 | - 'OCP::html_select_options' => '8.0.0', |
|
| 89 | - ]; |
|
| 90 | - } |
|
| 91 | - |
|
| 92 | - /** |
|
| 93 | - * @return array E.g.: `'ClassName::methodName' => 'oc version',` |
|
| 94 | - */ |
|
| 95 | - protected function getLocalMethods() { |
|
| 96 | - return [ |
|
| 97 | - 'OC_L10N::get' => '8.2.0', |
|
| 98 | - |
|
| 99 | - 'OCP\Activity\IManager::publishActivity' => '8.2.0', |
|
| 100 | - |
|
| 101 | - 'OCP\App::register' => '8.1.0', |
|
| 102 | - 'OCP\App::addNavigationEntry' => '8.1.0', |
|
| 103 | - 'OCP\App::getActiveNavigationEntry' => '8.2.0', |
|
| 104 | - 'OCP\App::setActiveNavigationEntry' => '8.1.0', |
|
| 105 | - |
|
| 106 | - 'OCP\AppFramework\Controller::params' => '7.0.0', |
|
| 107 | - 'OCP\AppFramework\Controller::getParams' => '7.0.0', |
|
| 108 | - 'OCP\AppFramework\Controller::method' => '7.0.0', |
|
| 109 | - 'OCP\AppFramework\Controller::getUploadedFile' => '7.0.0', |
|
| 110 | - 'OCP\AppFramework\Controller::env' => '7.0.0', |
|
| 111 | - 'OCP\AppFramework\Controller::cookie' => '7.0.0', |
|
| 112 | - 'OCP\AppFramework\Controller::render' => '7.0.0', |
|
| 113 | - |
|
| 114 | - 'OCP\AppFramework\IAppContainer::getCoreApi' => '8.0.0', |
|
| 115 | - 'OCP\AppFramework\IAppContainer::isLoggedIn' => '8.0.0', |
|
| 116 | - 'OCP\AppFramework\IAppContainer::isAdminUser' => '8.0.0', |
|
| 117 | - 'OCP\AppFramework\IAppContainer::log' => '8.0.0', |
|
| 118 | - |
|
| 119 | - 'OCP\BackgroundJob::registerJob' => '8.1.0', |
|
| 120 | - 'OCP\BackgroundJob::getExecutionType' => '14.0.0', |
|
| 121 | - 'OCP\BackgroundJob::setExecutionType' => '14.0.0', |
|
| 122 | - |
|
| 123 | - 'OCP\Files::tmpFile' => '8.1.0', |
|
| 124 | - 'OCP\Files::tmpFolder' => '8.1.0', |
|
| 125 | - |
|
| 126 | - 'OCP\IAppConfig::getValue' => '8.0.0', |
|
| 127 | - 'OCP\IAppConfig::deleteKey' => '8.0.0', |
|
| 128 | - 'OCP\IAppConfig::getKeys' => '8.0.0', |
|
| 129 | - 'OCP\IAppConfig::setValue' => '8.0.0', |
|
| 130 | - 'OCP\IAppConfig::deleteApp' => '8.0.0', |
|
| 131 | - |
|
| 132 | - 'OCP\IDBConnection::createQueryBuilder' => '8.2.0', |
|
| 133 | - 'OCP\IDBConnection::getExpressionBuilder' => '8.2.0', |
|
| 134 | - |
|
| 135 | - 'OCP\ISearch::search' => '8.0.0', |
|
| 136 | - |
|
| 137 | - 'OCP\IServerContainer::getCache' => '8.2.0', |
|
| 138 | - 'OCP\IServerContainer::getDb' => '8.1.0', |
|
| 139 | - 'OCP\IServerContainer::getHTTPHelper' => '8.1.0', |
|
| 140 | - |
|
| 141 | - 'OCP\User::getUser' => '8.0.0', |
|
| 142 | - 'OCP\User::getUsers' => '8.1.0', |
|
| 143 | - 'OCP\User::getDisplayName' => '8.1.0', |
|
| 144 | - 'OCP\User::getDisplayNames' => '8.1.0', |
|
| 145 | - 'OCP\User::userExists' => '8.1.0', |
|
| 146 | - 'OCP\User::logout' => '8.1.0', |
|
| 147 | - 'OCP\User::checkPassword' => '8.1.0', |
|
| 148 | - 'OCP\User::isLoggedIn' => '13.0.0', |
|
| 149 | - 'OCP\User::checkAdminUser' => '13.0.0', |
|
| 150 | - 'OCP\User::checkLoggedIn' => '13.0.0', |
|
| 151 | - |
|
| 152 | - 'OCP\Util::encryptedFiles' => '8.1.0', |
|
| 153 | - 'OCP\Util::formatDate' => '8.0.0', |
|
| 154 | - 'OCP\Util::generateRandomBytes' => '8.1.0', |
|
| 155 | - 'OCP\Util::getServerHost' => '8.1.0', |
|
| 156 | - 'OCP\Util::getServerProtocol' => '8.1.0', |
|
| 157 | - 'OCP\Util::getRequestUri' => '8.1.0', |
|
| 158 | - 'OCP\Util::getScriptName' => '8.1.0', |
|
| 159 | - 'OCP\Util::imagePath' => '8.1.0', |
|
| 160 | - 'OCP\Util::isValidFileName' => '8.1.0', |
|
| 161 | - 'OCP\Util::linkToRoute' => '8.1.0', |
|
| 162 | - 'OCP\Util::linkTo' => '8.1.0', |
|
| 163 | - 'OCP\Util::logException' => '8.2.0', |
|
| 164 | - 'OCP\Util::mb_str_replace' => '8.2.0', |
|
| 165 | - 'OCP\Util::mb_substr_replace' => '8.2.0', |
|
| 166 | - 'OCP\Util::sendMail' => '8.1.0', |
|
| 167 | - 'OCP\Util::writeLog' => '13.0.0', |
|
| 168 | - ]; |
|
| 169 | - } |
|
| 27 | + /** |
|
| 28 | + * @return string |
|
| 29 | + */ |
|
| 30 | + protected function getLocalDescription() { |
|
| 31 | + return 'deprecated'; |
|
| 32 | + } |
|
| 33 | + |
|
| 34 | + /** |
|
| 35 | + * @return array E.g.: `'ClassName' => 'oc version',` |
|
| 36 | + */ |
|
| 37 | + protected function getLocalClasses() { |
|
| 38 | + return [ |
|
| 39 | + 'OC_JSON' => '8.2.0', |
|
| 40 | + |
|
| 41 | + 'OCP\Contacts' => '8.1.0', |
|
| 42 | + 'OCP\DB' => '8.1.0', |
|
| 43 | + 'OCP\IHelper' => '8.1.0', |
|
| 44 | + 'OCP\JSON' => '8.1.0', |
|
| 45 | + 'OCP\Response' => '8.1.0', |
|
| 46 | + 'OCP\AppFramework\IApi' => '8.0.0', |
|
| 47 | + 'OCP\User' => '13.0.0', |
|
| 48 | + 'OCP\BackgroundJob' => '14.0.0', |
|
| 49 | + ]; |
|
| 50 | + } |
|
| 51 | + |
|
| 52 | + /** |
|
| 53 | + * @return array E.g.: `'ClassName::CONSTANT_NAME' => 'oc version',` |
|
| 54 | + */ |
|
| 55 | + protected function getLocalConstants() { |
|
| 56 | + return [ |
|
| 57 | + 'OC_API::GUEST_AUTH' => '8.2.0', |
|
| 58 | + 'OC_API::USER_AUTH' => '8.2.0', |
|
| 59 | + 'OC_API::SUBADMIN_AUTH' => '8.2.0', |
|
| 60 | + 'OC_API::ADMIN_AUTH' => '8.2.0', |
|
| 61 | + 'OC_API::RESPOND_UNAUTHORISED' => '8.2.0', |
|
| 62 | + 'OC_API::RESPOND_SERVER_ERROR' => '8.2.0', |
|
| 63 | + 'OC_API::RESPOND_NOT_FOUND' => '8.2.0', |
|
| 64 | + 'OC_API::RESPOND_UNKNOWN_ERROR' => '8.2.0', |
|
| 65 | + |
|
| 66 | + 'OCP::PERMISSION_CREATE' => '8.0.0', |
|
| 67 | + 'OCP::PERMISSION_READ' => '8.0.0', |
|
| 68 | + 'OCP::PERMISSION_UPDATE' => '8.0.0', |
|
| 69 | + 'OCP::PERMISSION_DELETE' => '8.0.0', |
|
| 70 | + 'OCP::PERMISSION_SHARE' => '8.0.0', |
|
| 71 | + 'OCP::PERMISSION_ALL' => '8.0.0', |
|
| 72 | + 'OCP::FILENAME_INVALID_CHARS' => '8.0.0', |
|
| 73 | + ]; |
|
| 74 | + } |
|
| 75 | + |
|
| 76 | + /** |
|
| 77 | + * @return array E.g.: `'functionName' => 'oc version',` |
|
| 78 | + */ |
|
| 79 | + protected function getLocalFunctions() { |
|
| 80 | + return [ |
|
| 81 | + 'OCP::image_path' => '8.0.0', |
|
| 82 | + 'OCP::mimetype_icon' => '8.0.0', |
|
| 83 | + 'OCP::preview_icon' => '8.0.0', |
|
| 84 | + 'OCP::publicPreview_icon' => '8.0.0', |
|
| 85 | + 'OCP::human_file_size' => '8.0.0', |
|
| 86 | + 'OCP::relative_modified_date' => '8.0.0', |
|
| 87 | + 'OCP::simple_file_size' => '8.0.0', |
|
| 88 | + 'OCP::html_select_options' => '8.0.0', |
|
| 89 | + ]; |
|
| 90 | + } |
|
| 91 | + |
|
| 92 | + /** |
|
| 93 | + * @return array E.g.: `'ClassName::methodName' => 'oc version',` |
|
| 94 | + */ |
|
| 95 | + protected function getLocalMethods() { |
|
| 96 | + return [ |
|
| 97 | + 'OC_L10N::get' => '8.2.0', |
|
| 98 | + |
|
| 99 | + 'OCP\Activity\IManager::publishActivity' => '8.2.0', |
|
| 100 | + |
|
| 101 | + 'OCP\App::register' => '8.1.0', |
|
| 102 | + 'OCP\App::addNavigationEntry' => '8.1.0', |
|
| 103 | + 'OCP\App::getActiveNavigationEntry' => '8.2.0', |
|
| 104 | + 'OCP\App::setActiveNavigationEntry' => '8.1.0', |
|
| 105 | + |
|
| 106 | + 'OCP\AppFramework\Controller::params' => '7.0.0', |
|
| 107 | + 'OCP\AppFramework\Controller::getParams' => '7.0.0', |
|
| 108 | + 'OCP\AppFramework\Controller::method' => '7.0.0', |
|
| 109 | + 'OCP\AppFramework\Controller::getUploadedFile' => '7.0.0', |
|
| 110 | + 'OCP\AppFramework\Controller::env' => '7.0.0', |
|
| 111 | + 'OCP\AppFramework\Controller::cookie' => '7.0.0', |
|
| 112 | + 'OCP\AppFramework\Controller::render' => '7.0.0', |
|
| 113 | + |
|
| 114 | + 'OCP\AppFramework\IAppContainer::getCoreApi' => '8.0.0', |
|
| 115 | + 'OCP\AppFramework\IAppContainer::isLoggedIn' => '8.0.0', |
|
| 116 | + 'OCP\AppFramework\IAppContainer::isAdminUser' => '8.0.0', |
|
| 117 | + 'OCP\AppFramework\IAppContainer::log' => '8.0.0', |
|
| 118 | + |
|
| 119 | + 'OCP\BackgroundJob::registerJob' => '8.1.0', |
|
| 120 | + 'OCP\BackgroundJob::getExecutionType' => '14.0.0', |
|
| 121 | + 'OCP\BackgroundJob::setExecutionType' => '14.0.0', |
|
| 122 | + |
|
| 123 | + 'OCP\Files::tmpFile' => '8.1.0', |
|
| 124 | + 'OCP\Files::tmpFolder' => '8.1.0', |
|
| 125 | + |
|
| 126 | + 'OCP\IAppConfig::getValue' => '8.0.0', |
|
| 127 | + 'OCP\IAppConfig::deleteKey' => '8.0.0', |
|
| 128 | + 'OCP\IAppConfig::getKeys' => '8.0.0', |
|
| 129 | + 'OCP\IAppConfig::setValue' => '8.0.0', |
|
| 130 | + 'OCP\IAppConfig::deleteApp' => '8.0.0', |
|
| 131 | + |
|
| 132 | + 'OCP\IDBConnection::createQueryBuilder' => '8.2.0', |
|
| 133 | + 'OCP\IDBConnection::getExpressionBuilder' => '8.2.0', |
|
| 134 | + |
|
| 135 | + 'OCP\ISearch::search' => '8.0.0', |
|
| 136 | + |
|
| 137 | + 'OCP\IServerContainer::getCache' => '8.2.0', |
|
| 138 | + 'OCP\IServerContainer::getDb' => '8.1.0', |
|
| 139 | + 'OCP\IServerContainer::getHTTPHelper' => '8.1.0', |
|
| 140 | + |
|
| 141 | + 'OCP\User::getUser' => '8.0.0', |
|
| 142 | + 'OCP\User::getUsers' => '8.1.0', |
|
| 143 | + 'OCP\User::getDisplayName' => '8.1.0', |
|
| 144 | + 'OCP\User::getDisplayNames' => '8.1.0', |
|
| 145 | + 'OCP\User::userExists' => '8.1.0', |
|
| 146 | + 'OCP\User::logout' => '8.1.0', |
|
| 147 | + 'OCP\User::checkPassword' => '8.1.0', |
|
| 148 | + 'OCP\User::isLoggedIn' => '13.0.0', |
|
| 149 | + 'OCP\User::checkAdminUser' => '13.0.0', |
|
| 150 | + 'OCP\User::checkLoggedIn' => '13.0.0', |
|
| 151 | + |
|
| 152 | + 'OCP\Util::encryptedFiles' => '8.1.0', |
|
| 153 | + 'OCP\Util::formatDate' => '8.0.0', |
|
| 154 | + 'OCP\Util::generateRandomBytes' => '8.1.0', |
|
| 155 | + 'OCP\Util::getServerHost' => '8.1.0', |
|
| 156 | + 'OCP\Util::getServerProtocol' => '8.1.0', |
|
| 157 | + 'OCP\Util::getRequestUri' => '8.1.0', |
|
| 158 | + 'OCP\Util::getScriptName' => '8.1.0', |
|
| 159 | + 'OCP\Util::imagePath' => '8.1.0', |
|
| 160 | + 'OCP\Util::isValidFileName' => '8.1.0', |
|
| 161 | + 'OCP\Util::linkToRoute' => '8.1.0', |
|
| 162 | + 'OCP\Util::linkTo' => '8.1.0', |
|
| 163 | + 'OCP\Util::logException' => '8.2.0', |
|
| 164 | + 'OCP\Util::mb_str_replace' => '8.2.0', |
|
| 165 | + 'OCP\Util::mb_substr_replace' => '8.2.0', |
|
| 166 | + 'OCP\Util::sendMail' => '8.1.0', |
|
| 167 | + 'OCP\Util::writeLog' => '13.0.0', |
|
| 168 | + ]; |
|
| 169 | + } |
|
| 170 | 170 | } |