<?php

/*
  MailBeez Automatic Trigger Email Campaigns
  http://www.mailbeez.com

  Copyright (c) 2010 - 2012 MailBeez

  Released under the GNU General Public License
 */

///////////////////////////////////////////////////////////////////////////////
///																			 //
///                 MailBeez Core file - do not edit                         //
///                                                                          //
///////////////////////////////////////////////////////////////////////////////

require_once(MH_DIR_CONFIG . 'config_customer_insight/classes/viewbeez.php');
@require_once(MH_DIR_FS_CATALOG . MH_ROOT_PATH . 'common/classes/query_watchdog.php');

class view_query_watchdog extends viewbeez
{

// class constructor
    var $slow_query_time_limit;

    function __construct()
    {
        parent::__construct();

        $this->code = 'view_query_watchdog';
        $this->module = 'view_query_watchdog';
        $this->version = '1.0';
        $this->title = mh_lng('MAILBEEZ_VIEW_QUERY_WATCHDOG_TITLE');
        $this->description = mh_lng('MAILBEEZ_VIEW_QUERY_WATCHDOG_DESCRIPTION');
        $this->hidden = true;
        $this->has_dashboard_view = false;

        $this->sort_order = 999;
        $this->enabled = true;

        $this->slow_query_time_limit = 3;

        $this->set_template();

    }

    public function data_update()
    {
        // backwards compatibility
        if (class_exists('query_watchdog')) {
            $watchdog = new query_watchdog();
            $watchdog->watch();
        }
    }
}
