This repository has been archived by the owner on Jul 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bernhard Posselt
committed
Feb 17, 2015
1 parent
77365fe
commit 816a8be
Showing
10 changed files
with
230 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
/** | ||
* ownCloud - News | ||
* | ||
* This file is licensed under the Affero General Public License version 3 or | ||
* later. See the COPYING file. | ||
* | ||
* @author Alessandro Cosentino <[email protected]> | ||
* @author Bernhard Posselt <[email protected]> | ||
* @copyright Alessandro Cosentino 2012 | ||
* @copyright Bernhard Posselt 2012, 2014 | ||
*/ | ||
|
||
namespace OCA\News\Service; | ||
|
||
use OCP\IConfig; | ||
|
||
use OCA\News\Config\Config; | ||
|
||
|
||
class StatusService { | ||
|
||
private $settings; | ||
private $config; | ||
private $appName; | ||
|
||
public function __construct(IConfig $settings, Config $config, $AppName) { | ||
$this->settings = $settings; | ||
$this->config = $config; | ||
$this->appName = $AppName; | ||
} | ||
|
||
|
||
public function getStatus() { | ||
$improperlyConfiguredCron = false; | ||
|
||
$version = $this->settings->getAppValue( | ||
$this->appName, 'installed_version' | ||
); | ||
$cronMode = $this->settings->getAppValue( | ||
'core', 'backgroundjobs_mode' | ||
); | ||
$cronOn = $this->config->getUseCronUpdates(); | ||
|
||
// check for cron modes which may lead to problems | ||
if ($cronMode !== 'cron' && $cronMode !== 'webcron' && $cronOn) { | ||
$improperlyConfiguredCron = true; | ||
} | ||
|
||
|
||
return [ | ||
'version' => $version, | ||
'warnings' => [ | ||
'improperlyConfiguredCron' => $improperlyConfiguredCron | ||
] | ||
]; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.