Source of file SystemtaskStatsBrowscapupdate.php

Size: 2,117 Bytes - Last Modified: 2016-05-18T03:08:27+02:00

buildproject/core/module_stats/admin/systemtasks/SystemtaskStatsBrowscapupdate.php

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
<?php
/*"******************************************************************************************************
*   (c) 2004-2006 by MulchProductions, www.mulchprod.de                                                 *
*   (c) 2007-2016 by Kajona, www.kajona.de                                                              *
*       Published under the GNU LGPL v2.1, see /system/licence_lgpl.txt                                 *
*-------------------------------------------------------------------------------------------------------*
*   $Id$                                 *
********************************************************************************************************/

namespace Kajona\Stats\Admin\Systemtasks;

use Kajona\Stats\System\Browscap;
use Kajona\System\Admin\Systemtasks\AdminSystemtaskInterface;
use Kajona\System\Admin\Systemtasks\SystemtaskBase;
use Kajona\System\System\SystemModule;


/**
 *
 * @package module_stats
 */
class SystemtaskStatsBrowscapupdate extends SystemtaskBase implements AdminSystemtaskInterface
{


    /**
     * contructor to call the base constructor
     */
    public function __construct()
    {
        parent::__construct();
        $this->setStrTextBase("stats");
    }

    /**
     * @inheritdoc
     */
    public function getGroupIdentifier()
    {
        return "stats";
    }

    /**
     * @inheritdoc
     */
    public function getStrInternalTaskName()
    {
        return "browscapupdate";
    }

    /**
     * @inheritdoc
     */
    public function getStrTaskName()
    {
        return $this->getLang("systemtask_browscapupdate_name");
    }

    /**
     * @inheritdoc
     */
    public function executeTask()
    {

        if (!SystemModule::getModuleByName("stats")->rightEdit()) {
            return $this->getLang("commons_error_permissions");
        }

        $objBrowscap = new Browscap();
        $objBrowscap->updateBrowscap();

        return $this->objToolkit->getTextRow($this->getLang("browscapupdate_end"));
    }

    /**
     * @inheritdoc
     */
    public function getAdminForm()
    {
        return "";
    }

}