tbrehm
2011-05-02 f70fd01c31656759e8033f0e4326bd0797eec0a2
Reverted changes for logview implementation as they can not work on multiserver setups.
2 files deleted
3 files modified
76 ■■■■■ changed files
install/sql/incremental/upd_0011.sql 2 ●●●●● patch | view | raw | blame | history
install/sql/ispconfig3.sql 1 ●●●● patch | view | raw | blame | history
interface/web/sites/form/web_domain.tform.php 27 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_domain_logs.htm 18 ●●●●● patch | view | raw | blame | history
interface/web/sites/web_domain_edit.php 28 ●●●●● patch | view | raw | blame | history
install/sql/incremental/upd_0011.sql
File was deleted
install/sql/ispconfig3.sql
@@ -1151,7 +1151,6 @@
  `backup_copies` INT NOT NULL DEFAULT '1',
  `active` enum('n','y') NOT NULL default 'y',
  `traffic_quota_lock` enum('n','y') NOT NULL default 'n',
  `logs` MEDIUMTEXT NOT NULL,
  PRIMARY KEY  (`domain_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
interface/web/sites/form/web_domain.tform.php
@@ -395,33 +395,6 @@
    )
);
//* Logs
$form["tabs"]['logs'] = array (
    'title'     => "logs",
    'width'     => 100,
    'template'     => "templates/web_domain_logs.htm",
    'readonly'    => true,
    'fields'     => array (
    ##################################
    # Begin Datatable fields
    ##################################
        'logs' => array (
            'datatype'    => 'TEXT',
            'formtype'    => 'TEXTAREA',
            'default'    => 'DEFAULT',
            'value'        => 'VALUE',
            'cols'        => '30',
            'rows'        => '10'
        )
    ##################################
    # ENDE Datatable fields
    ##################################
    )
);
if($_SESSION["s"]["user"]["typ"] == 'admin') {
//* Backup
interface/web/sites/templates/web_domain_logs.htm
File was deleted
interface/web/sites/web_domain_edit.php
@@ -262,32 +262,6 @@
            $app->tpl->setVar("domain_option",$domain_select);
        }
        // Code to display the error log for the site.
        // Query the logfile name
        $tmp  = $app->db->queryOneRecord("SELECT document_root FROM web_domain WHERE domain_id = ".$this->id);
        $logfile = $tmp["document_root"]."/log/error.log";
        $lines = count(file($logfile));
        // the "tail" function
        $handle = @fopen($logfile, "r");
        if ($handle) {
            while (($buffer = fgets($handle)) !== false) {
                $lines = $lines -1;
                // this constant defines how many lines to display
                if ($lines<60) $tail .= $buffer; // TODO: We need a newline here.
            }
               if (!feof($handle)) {
                $tail =  "Error.";
                }
            fclose($handle);
        }
        // store the tail so it can be displayed in the interface
        $app->db->query("UPDATE web_domain SET logs = '$tail' WHERE domain_id = ".$this->id);
        parent::onShowEnd();
    }
@@ -631,4 +605,4 @@
$page = new page_action;
$page->onLoad();
?>
?>