| @@ 149-155 (lines=7) @@ | ||
| 146 | ||
| 147 | $isValid = true; |
|
| 148 | // Validate |
|
| 149 | if (!ctype_digit($minValue) && $minValue !== 'auto') { |
|
| 150 | $isValid = false; |
|
| 151 | \OC::$server->getLogger()->warning( |
|
| 152 | $minValue . ' is not a valid value for minimal versions retention obligation. Check versions_retention_obligation in your config.php. Falling back to auto.', |
|
| 153 | ['app'=>'files_versions'] |
|
| 154 | ); |
|
| 155 | } |
|
| 156 | ||
| 157 | if (!ctype_digit($maxValue) && $maxValue !== 'auto') { |
|
| 158 | $isValid = false; |
|
| @@ 157-163 (lines=7) @@ | ||
| 154 | ); |
|
| 155 | } |
|
| 156 | ||
| 157 | if (!ctype_digit($maxValue) && $maxValue !== 'auto') { |
|
| 158 | $isValid = false; |
|
| 159 | \OC::$server->getLogger()->warning( |
|
| 160 | $maxValue . ' is not a valid value for maximal versions retention obligation. Check versions_retention_obligation in your config.php. Falling back to auto.', |
|
| 161 | ['app'=>'files_versions'] |
|
| 162 | ); |
|
| 163 | } |
|
| 164 | ||
| 165 | if (!$isValid){ |
|
| 166 | $minValue = 'auto'; |
|
| @@ 205-209 (lines=5) @@ | ||
| 202 | */ |
|
| 203 | protected function load($translationFile) { |
|
| 204 | $json = json_decode(file_get_contents($translationFile), true); |
|
| 205 | if (!is_array($json)) { |
|
| 206 | $jsonError = json_last_error(); |
|
| 207 | \OC::$server->getLogger()->warning("Failed to load $translationFile - json error code: $jsonError", ['app' => 'l10n']); |
|
| 208 | return false; |
|
| 209 | } |
|
| 210 | ||
| 211 | if (!empty($json['pluralForm'])) { |
|
| 212 | $this->pluralFormString = $json['pluralForm']; |
|
| @@ 107-111 (lines=5) @@ | ||
| 104 | $this->app = true; |
|
| 105 | ||
| 106 | $json = json_decode(file_get_contents($transFile), true); |
|
| 107 | if (!is_array($json)) { |
|
| 108 | $jsonError = json_last_error(); |
|
| 109 | \OC::$server->getLogger()->warning("Failed to load $transFile - json error code: $jsonError", ['app' => 'l10n']); |
|
| 110 | return false; |
|
| 111 | } |
|
| 112 | ||
| 113 | $this->pluralFormString = $json['pluralForm']; |
|
| 114 | $translations = $json['translations']; |
|