*/
public function update()
{
- $updatesRan = array();
+ $updatesRan = [];
// If the user isn't logged in, exit without updating.
if ($this->isLoggedIn !== true) {
foreach ($this->methods as $method) {
// Not an update method or already done, pass.
- if (!startsWith($method->getName(), 'updateMethod')
+ if (
+ !startsWith($method->getName(), 'updateMethod')
|| in_array($method->getName(), $this->doneUpdates)
) {
continue;
}
// Set sub config keys (config and plugins)
- $subConfig = array('config', 'plugins');
+ $subConfig = ['config', 'plugins'];
foreach ($subConfig as $sub) {
foreach ($oldConfig[$sub] as $key => $value) {
if (isset($legacyMap[$sub . '.' . $key])) {
$save = $this->conf->get('resource.data_dir') . '/datastore.' . date('YmdHis') . '.php';
copy($this->conf->get('resource.datastore'), $save);
- $links = array();
+ $links = [];
foreach ($this->linkDB as $offset => $value) {
$links[] = $value;
unset($this->linkDB[$offset]);
*/
public function updateMethodDownloadSizeAndTimeoutConf()
{
- if ($this->conf->exists('general.download_max_size')
+ if (
+ $this->conf->exists('general.download_max_size')
&& $this->conf->exists('general.download_timeout')
) {
return true;