Пример #1
0
<?php

/**
 * Copyright (c) 2014 Victor Dubiniuk <*****@*****.**>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */
$installedVersion = \OCP\Config::getAppValue('files_antivirus', 'installed_version');
if (version_compare($installedVersion, '0.5', '<')) {
    \OCA\Files_Antivirus\Status::init();
}
if (version_compare($installedVersion, '0.6', '<')) {
    // remove the old job with old classname
    $jobList = new \OC\BackgroundJob\JobList();
    $jobs = $jobList->getAll();
    foreach ($jobs as $job) {
        $jobArg = $job->getArgument();
        if ($jobArg[0] == 'OC_Files_Antivirus_BackgroundScanner') {
            $jobList->remove($job);
        }
    }
}
Пример #2
0
 /**
  * Action to take if this item status is unclear
  * @param Status $status
  * @param boolean $isBackground
  */
 public function processUnchecked(Status $status, $isBackground)
 {
     //TODO: Show warning to the user: The file can not be checked
     $this->logError('Not Checked. ' . $status->getDetails());
 }