~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to lib/Controller/Maintenance.php

  • Committer: Dan Garner
  • Date: 2016-04-05 12:44:24 UTC
  • mfrom: (487.1.67)
  • Revision ID: git-v1:3ee1212b02c722a146a00e094f0ff69f88fb5c7d
Merge pull request #149 from dasgarner/develop

Post 1.8.0-alpha3 fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
namespace Xibo\Controller;
10
10
 
11
11
 
 
12
use Stash\Interfaces\PoolInterface;
12
13
use Xibo\Entity\Layout;
13
14
use Xibo\Entity\UserGroup;
14
15
use Xibo\Entity\UserNotification;
40
41
    /** @var  StorageServiceInterface */
41
42
    private $store;
42
43
 
 
44
    /** @var  PoolInterface */
 
45
    private $pool;
 
46
 
 
47
    /** @var  UserFactory */
 
48
    private $userFactory;
 
49
 
43
50
    /** @var  UserGroupFactory */
44
51
    private $userGroupFactory;
45
52
 
71
78
     * @param DateServiceInterface $date
72
79
     * @param ConfigServiceInterface $config
73
80
     * @param StorageServiceInterface $store
74
 
     * @param UserFactory $userGroupFactory
 
81
     * @param PoolInterface $pool
 
82
     * @param UserFactory $userFactory
 
83
     * @param UserGroupFactory $userGroupFactory
75
84
     * @param LayoutFactory $layoutFactory
76
85
     * @param DisplayFactory $displayFactory
77
86
     * @param UpgradeFactory $upgradeFactory
79
88
     * @param NotificationFactory $notificationFactory
80
89
     * @param UserNotificationFactory $userNotificationFactory
81
90
     */
82
 
    public function __construct($log, $sanitizerService, $state, $user, $help, $date, $config, $store, $userGroupFactory, $layoutFactory, $displayFactory, $upgradeFactory, $mediaFactory, $notificationFactory, $userNotificationFactory)
 
91
    public function __construct($log, $sanitizerService, $state, $user, $help, $date, $config, $store, $pool, $userFactory, $userGroupFactory, $layoutFactory, $displayFactory, $upgradeFactory, $mediaFactory, $notificationFactory, $userNotificationFactory)
83
92
    {
84
93
        $this->setCommonDependencies($log, $sanitizerService, $state, $user, $help, $date, $config);
85
94
 
86
95
        $this->store = $store;
87
96
        $this->userGroupFactory = $userGroupFactory;
 
97
        $this->pool = $pool;
 
98
        $this->userFactory = $userFactory;
88
99
        $this->layoutFactory = $layoutFactory;
89
100
        $this->displayFactory = $displayFactory;
90
101
        $this->upgradeFactory = $upgradeFactory;
265
276
                    print "-&gt;" . __("Disabled") . "<br/>\n";
266
277
                }
267
278
 
 
279
                //
268
280
                // Stats Tidy
 
281
                //
269
282
                print "<h1>" . __("Tidy Stats") . "</h1>";
270
283
                if (!$quick &&  $this->getConfig()->GetSetting("MAINTENANCE_STAT_MAXAGE") != 0) {
271
284
 
289
302
                    print "-&gt;" . __("Disabled") . "<br/>\n";
290
303
                }
291
304
 
 
305
                //
 
306
                // Tidy the Cache
 
307
                //
 
308
                echo '<h1>' . __('Tidy Cache') . '</h1>';
 
309
                if (!$quick) {
 
310
                    $this->pool->purge();
 
311
                } else {
 
312
                    echo '-&gt;' . __('Disabled') . '<br/>\n';
 
313
                }
 
314
                echo __('Done.');
 
315
 
 
316
                //
292
317
                // Validate Display Licence Slots
 
318
                //
293
319
                $maxDisplays = $this->getConfig()->GetSetting('MAX_LICENSED_DISPLAYS');
294
320
 
295
321
                if ($maxDisplays > 0) {