Ticket #65: protections_levels.patch

File protections_levels.patch, 7.8 kB (added by Naucki, 8 years ago)

Patch for hardcodet protections_levels, locales, etc

  • trunk/php/welcome.php

     
    11<?php 
    22    /* 
    3      * $Id: welcome.php,v 1.4.2.14 2004/09/10 16:57:30 dmorton Exp $ 
     3     * $Id$ 
    44     * 
    55     * MAIA MAILGUARD LICENSE v.1.0 
    66     * 
     
    125125      } 
    126126      $sth->free(); 
    127127   } 
    128     
    129     $protection['off'] = array ('Y', 'Y','Y','Y','Y','Y','Y','Y','N','999','999','999'); 
    130     $protection['low'] = array ('N', 'Y','Y','Y','N','Y','Y','Y','N','999','999','999'); 
    131     $protection['medium'] = array ('N', 'N','Y','Y','N','N','Y','Y','Y','5','999','999'); 
    132     $protection['high'] = array ('N', 'N','N','N','N','N','N','N','N','1','5','5'); 
    133     
     128       
    134129   if ($button == $lang['button_change_protection'] && isset($HTTP_POST_VARS['protection_level'])) { 
    135130    $select = "SELECT policy_id FROM users WHERE maia_user_id = ?";  
    136131    $sth = $dbh->query($select, $euid); 
    137132  
    138133    $update = "UPDATE policy SET virus_lover = ?, " . 
    139                                     "spam_lover = ?, " . 
    140                                     "banned_files_lover = ?, " . 
    141                                     "bad_header_lover = ?, " . 
    142                                     "bypass_virus_checks = ?, " . 
    143                                     "bypass_spam_checks = ?, " . 
    144                                     "bypass_banned_checks = ?, " . 
    145                                     "bypass_header_checks = ?, " . 
    146                                     "spam_modifies_subj = ?, " . 
    147                                     "spam_tag_level = ?, " . 
    148                                     "spam_tag2_level = ?, " . 
    149                                     "spam_kill_level = ? " . 
    150                   "WHERE id = ?"; 
     134                                 "spam_lover = ?, " . 
     135                                 "banned_files_lover = ?, " . 
     136                                 "bad_header_lover = ?, " . 
     137                                 "bypass_virus_checks = ?, " . 
     138                                 "bypass_spam_checks = ?, " . 
     139                                 "bypass_banned_checks = ?, " . 
     140                                 "bypass_header_checks = ?, " . 
     141                                 "discard_viruses = ?, " . 
     142                                 "discard_spam = ?, " . 
     143                                 "discard_banned_files = ?, " . 
     144                                 "discard_bad_headers = ?, " . 
     145                                 "spam_modifies_subj = ?, " . 
     146                                 "spam_tag_level = ?, " . 
     147                                 "spam_tag2_level = ?, " . 
     148                                 "spam_kill_level = ? " . 
     149               "WHERE id = ?"; 
     150     
    151151    $protection_level = $HTTP_POST_VARS["protection_level"]; 
    152152                   
    153153    while ($row = $sth->fetchrow()) { 
     
    254254    // find current protection level 
    255255   $query = "SELECT DISTINCT virus_lover, spam_lover, banned_files_lover, " .  
    256256               "bad_header_lover, bypass_virus_checks, bypass_spam_checks, bypass_banned_checks, ". 
    257                "bypass_header_checks, spam_modifies_subj, spam_tag_level, ". 
    258                "spam_tag2_level, spam_kill_level " . 
     257               "bypass_header_checks, discard_spam, discard_banned_files, discard_bad_headers, ". 
     258               "spam_modifies_subj, spam_tag_level, spam_tag2_level, spam_kill_level " . 
    259259             "FROM users LEFT JOIN policy ON users.policy_id=policy.id ". 
    260260             "WHERE users.maia_user_id = ?";  
    261261    $sth = $dbh->query($query, array($euid)); 
     
    277277        } elseif(implode(',',$result) == implode(',',$protection['high'])){ 
    278278                $protection_mode = $lang['radio_protection_high'];               
    279279        } else { 
    280                 $protection_mode = "custom"; 
     280                $protection_mode = $lang['radio_protection_custom']; 
    281281        } 
    282282    } else {  
    283283    //ERROR? 
  • trunk/php/locale/en/welcome.php

     
    11<?php 
    22    /* 
    3      * $Id: welcome.php,v 1.1.2.7 2004/09/19 23:34:21 dmorton Exp $ 
     3     * $Id$ 
    44     * 
    55     * MAIA MAILGUARD LICENSE v.1.0 
    66     * 
     
    101101    $lang['radio_protection_low'] = "Low"; 
    102102    $lang['radio_protection_medium'] = "Medium"; 
    103103    $lang['radio_protection_high'] = "High"; 
     104    $lang['radio_protection_custom'] = "Custom"; 
    104105     
    105106    $lang['banner_subtitle'] = "Welcome"; 
    106107     
     
    121122    $lang['action_banned_cache'] = "Delete/Rescue"; 
    122123    $lang['action_header_cache'] = "Delete/Rescue"; 
    123124     
    124      
    125  No newline at end of file 
     125     
  • trunk/php/locale/de/welcome.php

     
    9292     $lang['radio_protection_low'] = "Niedrig"; 
    9393     $lang['radio_protection_medium'] = "Mittel"; 
    9494     $lang['radio_protection_high'] = "Hoch"; 
     95     $lang['radio_protection_custom'] = "Benutzerdefiniert"; 
    9596     $lang['banner_subtitle'] = "Willkommen"; 
    9697     $lang['text_cache_spam'] = "Sie haben <b>%d</b> eMails in Ihrem Spam-Zwischenspeicher.  <br>Klicken Sie <a href=\"%s\">hier</a> um diese zu melden, oder eine versehentlich blockierte eMail erneut zuzustellen."; 
    9798     $lang['text_cache_virus'] = "Sie haben <b>%d</b> eMails in Ihrem Viren-Zwischenspeicher.  <br>Klicken Sie <a href=\"%s\">hier</a> um diese zu löschen, oder eine versehentlich blockierte eMail erneut zuzustellen."; 
     
    104105     $lang['action_banned_cache'] = "Löschen/erneut zustellen"; 
    105106     $lang['action_header_cache'] = "Löschen/erneut zustellen"; 
    106107     
    107      
    108  No newline at end of file 
     108     
  • trunk/php/locale/de/help.php

     
    11<?php 
    22    /* 
    3      * $Id: help.php,v 1.1.2.2 2004/09/10 16:17:31 dmorton Exp $ 
     3     * $Id$ 
    44     * 
    55     * MAIA MAILGUARD LICENSE v.1.0 
    66     * 
     
    495495    // Credits 
    496496    $lang['help_credits_1'] = "<b><i>%s</i></b> wurde geschrieben von %s, als ein Webbasierendes eMail-Filtersystem " . 
    497497                           "basierend auf dem %s und %s.  VirenScanning wird durchgeführt unter Benutzung von %s, %s, und %s." . 
    498                            "<br>Deutsche Übersetzung von <a href=\"mailto:daniel.nauck@rootbash.com\">Daniel Nauck und <a href=\"mailto:wolfgang@lumpp.de\">Wolfgang Lumpp</a>"; 
     498                           "<br>Deutsche Übersetzung von <a href=\"mailto:daniel.nauck@rootbash.com\">Daniel Nauck</a> und <a href=\"mailto:wolfgang@lumpp.de\">Wolfgang Lumpp</a>"; 
    499499 
    500 ?> 
    501  No newline at end of file 
     500?> 
  • trunk/php/config.php.dist

     
    11<?php 
    22    /* 
    3      * $Id: config.php.dist,v 1.1.4.2 2004/09/07 15:04:39 dmorton Exp $ 
     3     * $Id$ 
    44     * 
    55     * MAIA MAILGUARD LICENSE v.1.0 
    66     * 
     
    8989    $default_charset = "ISO-8859-1"; 
    9090 
    9191 
     92    // Default protection level 
     93    // Level = virus_lover,spam_lover,banned_files_lover,bad_header_lover,bypass_virus_checks,bypass_spam_checks,bypass_banned_checks,bypass_header_checks,d$ 
     94    $protection['off']    = array ('Y','Y','Y','Y','Y','Y','Y','Y','N','N','N','N','N','0','999','999'); 
     95    $protection['low']    = array ('N','N','Y','Y','N','N','N','N','N','N','N','N','N','0','10','10'); 
     96    $protection['medium'] = array ('N','N','N','Y','N','N','N','N','N','N','N','N','N','0','6.3','6.3'); 
     97    $protection['high']   = array ('N','N','N','N','N','N','N','N','N','N','N','N','N','0','5','5'); 
     98 
     99 
    92100    // Supported databases include: 
    93101    // 
    94102    // "mysql"   (MySQL)