Changeset 736

Show
Ignore:
Timestamp:
07/31/07 22:07:13 (1 year ago)
Author:
raphael
Message:

Fixed #539: Undefined variable: total_mails
Removed hardcoded path in include/ispcp-lib.php
Re-enabled lock file check
Added status target to ispcp_network
Fixed lock file location

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r734 r736  
    77|           * make sure awstats is called in prerotate             | 
    88\_________________________________________________________________/ 
     9 
     102007-07-31 Raphael Geissert 
     11        - GUI: 
     12                * Fixed #539: Undefined variable: total_mails 
     13                * Removed hardcoded path in include/ispcp-lib.php 
     14                * Re-enabled lock file check 
     15        - CONFIGS: 
     16                * Added status target to ispcp_network 
     17        - ENGINE: 
     18                * Fixed lock file location 
    919 
    10202007-07-30 Raphael Geissert 
  • trunk/Makefile

    r658 r736  
    4343        $(SYSTEM_MAKE_DIRS) $(SYSTEM_APACHE_BACK_LOG) 
    4444 
    45         cd ./configs && $(MAKE) install 
     45        cd ./configs && $(MAKE) install & 
    4646        cd ./engine && $(MAKE) install 
    4747        cd ./gui && $(MAKE) install 
     
    5050uninstall: 
    5151 
    52         cd ./tools && $(MAKE) uninstall 
    53         cd ./configs && $(MAKE) uninstall 
    54         cd ./engine && $(MAKE) uninstall 
    55         cd ./gui && $(MAKE) uninstall 
    56         cd ./keys && $(MAKE) uninstall 
     52        cd ./tools && $(MAKE) uninstall & 
     53        cd ./configs && $(MAKE) uninstall & 
     54        cd ./engine && $(MAKE) uninstall & 
     55        cd ./gui && $(MAKE) uninstall & 
     56        cd ./keys && $(MAKE) uninstall & 
    5757 
    5858        rm -rf $(SYSTEM_CONF) 
  • trunk/configs/Makefile

    r715 r736  
    66        if [ $(HOST_OS) == debian ] ; then \ 
    77                cp ./ispcp.conf $(SYSTEM_CONF) ; \ 
    8                 (cd ./apache && $(MAKE) install); \ 
    9                 (cd ./awstats && $(MAKE) install); \ 
    10                 (cd ./bind && $(MAKE) install); \ 
    11                 (cd ./cron.d && $(MAKE) install); \ 
    12                 (cd ./database && $(MAKE) install);  \ 
    13                 (cd ./fcgi && $(MAKE) install); \ 
    14                 (cd ./init.d && $(MAKE) install); \ 
    15                 (cd ./postfix && $(MAKE) install); \ 
    16                 (cd ./courier && $(MAKE) install); \ 
    17                 (cd ./proftpd && $(MAKE) install); \ 
     8                (cd ./apache && $(MAKE) install &); \ 
     9                (cd ./awstats && $(MAKE) install &); \ 
     10                (cd ./bind && $(MAKE) install &); \ 
     11                (cd ./cron.d && $(MAKE) install &); \ 
     12                (cd ./database && $(MAKE) install &);  \ 
     13                (cd ./fcgi && $(MAKE) install &); \ 
     14                (cd ./init.d && $(MAKE) install &); \ 
     15                (cd ./postfix && $(MAKE) install &); \ 
     16                (cd ./courier && $(MAKE) install &); \ 
     17                (cd ./proftpd && $(MAKE) install &); \ 
    1818                (cd ./logrotate && $(MAKE) install); \ 
    1919        elif [ $(HOST_OS) == fedora ] ; then \ 
     
    3737        if [ $(HOST_OS) == debian ] ; then \ 
    3838                rm -rf $(SYSTEM_CONF)/ispcp.conf ;  \ 
    39                 (cd ./apache && $(MAKE) uninstall); \ 
    40                 (cd ./awstats && $(MAKE) uninstall); \ 
    41                 (cd ./bind && $(MAKE) uninstall); \ 
    42                 (cd ./cron.d && $(MAKE) uninstall); \ 
    43                 (cd ./database && $(MAKE) uninstall); \ 
    44                 (cd ./init.d && $(MAKE) uninstall); \ 
    45                 (cd ./postfix && $(MAKE) uninstall); \ 
    46                 (cd ./courier && $(MAKE) uninstall); \ 
    47                 (cd ./proftpd && $(MAKE) uninstall); \ 
    48                 (cd ./logrotate && $(MAKE) uninstall); \ 
     39                (cd ./apache && $(MAKE) uninstall &); \ 
     40                (cd ./awstats && $(MAKE) uninstall &); \ 
     41                (cd ./bind && $(MAKE) uninstall &); \ 
     42                (cd ./cron.d && $(MAKE) uninstall &); \ 
     43                (cd ./database && $(MAKE) uninstall &); \ 
     44                (cd ./init.d && $(MAKE) uninstall &); \ 
     45                (cd ./postfix && $(MAKE) uninstall &); \ 
     46                (cd ./courier && $(MAKE) uninstall &); \ 
     47                (cd ./proftpd && $(MAKE) uninstall &); \ 
     48                (cd ./logrotate && $(MAKE) uninstall &); \ 
    4949        elif [ $(HOST_OS) == fedora ] ; then \ 
    5050                cd ./dists/fedora && $(MAKE) uninstall ; \ 
  • trunk/configs/fcgi/parts/master/php4/php.ini

    r729 r736  
    204204; 
    205205 
    206 open_basedir = "{WWW_DIR}/{DMN_NAME}/:{CONF_DIR}/:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:{PEAR_DIR}/" 
     206open_basedir = "{WWW_DIR}/{DMN_NAME}/:{CONF_DIR}/:{MR_LOCK_FILE}:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:{PEAR_DIR}/" 
    207207 
    208208; This directive allows you to disable certain functions for security reasons. 
  • trunk/configs/fcgi/parts/master/php5/php.ini

    r729 r736  
    215215; 
    216216 
    217 open_basedir = "{WWW_DIR}/{DMN_NAME}/:{CONF_DIR}/:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:{PEAR_DIR}/" 
     217open_basedir = "{WWW_DIR}/{DMN_NAME}/:{CONF_DIR}/:{MR_LOCK_FILE}:/proc/:/bin/df:/bin/mount:/var/log/rkhunter.log:{PEAR_DIR}/" 
    218218 
    219219; This directive allows you to disable certain functions for security reasons. 
  • trunk/configs/init.d/ispcp_daemon

    r712 r736  
    11#! /bin/sh 
     2 
     3# ispCP ω (OMEGA) a Virtual Hosting Control System 
     4# Copyright (c) 2007 by ispCP 
     5# http://www.isp-control.net 
    26# 
    3 # skeleton      example file to build /etc/init.d/ scripts. 
    4 #               This file should be used to construct scripts for /etc/init.d. 
    57# 
    6 #              Written by Miquel van Smoorenburg <miquels@cistron.nl>. 
    7 #              Modified for Debian GNU/Linux 
    8 #              by Ian Murdock <imurdock@gnu.ai.mit.edu>. 
    9 #              Modified for Debian 
    10 #              by Erik Lehmann <erik.lehmann@ispcp.net> 
     8# License: 
     9#    This program is free software; you can redistribute it and/or 
     10#    modify it under the terms of the MPL Mozilla Public License 
     11#    as published by the Free Software Foundation; either version 1.1 
     12#    of the License, or (at your option) any later version. 
    1113# 
    12 # Version:      @(#)skeleton  1.8  03-Mar-1998  miquels@cistron.nl 
     14#    This program is distributed in the hope that it will be useful, 
     15#    but WITHOUT ANY WARRANTY; without even the implied warranty of 
     16#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     17#    MPL Mozilla Public License for more details. 
    1318# 
    14 # This file was automatically customized by dh-make on Mon, 22 Apr 2002 16:15:28 +0300 
     19#    You may have received a copy of the MPL Mozilla Public License 
     20#    along with this program. 
     21
     22#    An on-line copy of the MPL Mozilla Public License can be found 
     23#    http://www.mozilla.org/MPL/MPL-1.1.html 
     24
     25
     26# The ispCP Home Page is at: 
     27
     28#    http://www.isp-control.net 
     29 
     30set -e 
     31 
     32# Note: do not modify any of these vars here, use /etc/default/$NAME instead 
    1533 
    1634PATH=/sbin:/bin:/usr/sbin:/usr/bin 
    17 DAEMON=/var/www/ispcp/daemon/ispcp_daemon 
    18 PID=/var/run/ispcp-daemon.pid 
    1935NAME=ispcp_daemon 
    20 DESC=ispcp_daemon 
     36DAEMON=/var/www/ispcp/daemon/$NAME 
     37PID=/var/run/$NAME.pid 
     38DESC="ispCP Daemon" 
    2139 
     40START=1 
    2241 
    2342test -f $DAEMON || exit 0 
    2443 
    25 set -e 
     44# Read config file if it is present. 
     45if [ -r /etc/default/$NAME ]; then 
     46        . /etc/default/$NAME 
     47fi 
     48 
     49if [ $START -eq 0 ]; then 
     50        echo "$DESC: not starting, edit /etc/default/$NAME." 
     51        exit 0 
     52fi 
    2653 
    2754case "$1" in 
    2855  start) 
     56    echo "Starting $DESC..." 
    2957        start-stop-daemon --start --verbose --exec $DAEMON -- -p $PID 
    3058        ;; 
     
    3664        start-stop-daemon --stop --verbose --pidfile $PID --exec $DAEMON --retry 5 
    3765        rm $PID 
     66    echo "Starting $DESC..." 
    3867        start-stop-daemon --start --verbose --exec $DAEMON -- -p $PID 
    3968        ;; 
    4069  status) 
     70    set +e 
    4171    if [ -s $PID ]; then 
    4272        RPID=`cat $PID` 
  • trunk/configs/init.d/ispcp_network

    r689 r736  
    11#!/bin/sh 
    22 
     3# ispCP ω (OMEGA) a Virtual Hosting Control System 
     4# Copyright (c) 2007 by ispCP 
     5# http://www.isp-control.net 
     6# 
     7# 
     8# License: 
     9#    This program is free software; you can redistribute it and/or 
     10#    modify it under the terms of the MPL Mozilla Public License 
     11#    as published by the Free Software Foundation; either version 1.1 
     12#    of the License, or (at your option) any later version. 
     13# 
     14#    This program is distributed in the hope that it will be useful, 
     15#    but WITHOUT ANY WARRANTY; without even the implied warranty of 
     16#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     17#    MPL Mozilla Public License for more details. 
     18# 
     19#    You may have received a copy of the MPL Mozilla Public License 
     20#    along with this program. 
     21# 
     22#    An on-line copy of the MPL Mozilla Public License can be found 
     23#    http://www.mozilla.org/MPL/MPL-1.1.html 
     24# 
     25# 
     26# The ispCP Home Page is at: 
     27# 
     28#    http://www.isp-control.net 
     29 
    330set -e 
     31 
     32# Note: do not modify any of these vars here, use /etc/default/$NAME instead 
    433 
    534PATH=/sbin:/bin:/usr/sbin:/usr/bin 
    635DESC="ispCP Network Traffic Logger" 
    736NAME=ispcp_network 
    8  
     37LFILE=/var/run/$NAME 
    938IPTABLES=/sbin/iptables 
    10 LOGDIR=/var/log/ispcp 
     39LOG_DIR=/var/log/ispcp 
    1140 
    1241START=1 
     
    2453add_rules() 
    2554{ 
    26         ${IPTABLES} -N ISPCP_INPUT 2>> "${LOGDIR}/ispcp_network.err.log" 
    27         ${IPTABLES} -N ISPCP_OUTPUT 2>> "${LOGDIR}/ispcp_network.err.log" 
    28          
     55        ${IPTABLES} -N ISPCP_INPUT 2>> "${LOG_DIR}/${NAME}.err.log" 
     56        ${IPTABLES} -N ISPCP_OUTPUT 2>> "${LOG_DIR}/${NAME}.err.log" 
     57 
    2958        # All traffic should jump through ISPCP tables before anything else 
    30         ${IPTABLES} -I INPUT -j ISPCP_INPUT 2>> "${LOGDIR}/ispcp_network.err.log" 
    31         ${IPTABLES} -I OUTPUT -j ISPCP_OUTPUT 2>> "${LOGDIR}/ispcp_network.err.log" 
    32          
     59        ${IPTABLES} -I INPUT -j ISPCP_INPUT 2>> "${LOG_DIR}/${NAME}.err.log" 
     60        ${IPTABLES} -I OUTPUT -j ISPCP_OUTPUT 2>> "${LOG_DIR}/${NAME}.err.log" 
     61 
    3362        # web traffic 
    34          
    35         ${IPTABLES} -I ISPCP_INPUT -p tcp --dport 80 2>> "${LOGDIR}/ispcp_network.err.log" 
    36         ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 80 2>> "${LOGDIR}/ispcp_network.err.log" 
    37          
     63 
     64        ${IPTABLES} -I ISPCP_INPUT -p tcp --dport 80 2>> "${LOG_DIR}/${NAME}.err.log" 
     65        ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 80 2>> "${LOG_DIR}/${NAME}.err.log" 
     66 
    3867        # pop3 traffic 
    39          
    40         ${IPTABLES} -I ISPCP_INPUT -p tcp --dport 110 2>> "${LOGDIR}/ispcp_network.err.log" 
    41         ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 110 2>> "${LOGDIR}/ispcp_network.err.log" 
    42          
     68 
     69        ${IPTABLES} -I ISPCP_INPUT -p tcp --dport 110 2>> "${LOG_DIR}/${NAME}.err.log" 
     70        ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 110 2>> "${LOG_DIR}/${NAME}.err.log" 
     71 
    4372        # imap traffic 
    44          
    45         ${IPTABLES} -I ISPCP_INPUT -p tcp --dport 143 2>> "${LOGDIR}/ispcp_network.err.log" 
    46         ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 143 2>> "${LOGDIR}/ispcp_network.err.log" 
    47          
     73 
     74        ${IPTABLES} -I ISPCP_INPUT -p tcp --dport 143 2>> "${LOG_DIR}/${NAME}.err.log" 
     75        ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 143 2>> "${LOG_DIR}/${NAME}.err.log" 
     76 
    4877        # mail traffic 
    49          
    50         ${IPTABLES} -I ISPCP_INPUT  -p tcp --dport 25 2>> "${LOGDIR}/ispcp_network.err.log" 
    51         ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 25 2>> "${LOGDIR}/ispcp_network.err.log" 
     78 
     79        ${IPTABLES} -I ISPCP_INPUT  -p tcp --dport 25 2>> "${LOG_DIR}/${NAME}.err.log" 
     80        ${IPTABLES} -I ISPCP_OUTPUT -p tcp --sport 25 2>> "${LOG_DIR}/${NAME}.err.log" 
    5281 
    5382        # Explicit return once done 
    5483        ${IPTABLES} -A ISPCP_INPUT -j RETURN 
    5584        ${IPTABLES} -A ISPCP_OUTPUT -j RETURN 
     85 
     86        # Touch lock file 
     87        touch $LFILE 
    5688} 
    5789 
    5890remove_rules() 
    5991{ 
    60         ${IPTABLES} -D INPUT -j ISPCP_INPUT 2>> "${LOGDIR}/ispcp_network.err.log" 
    61         ${IPTABLES} -D OUTPUT -j ISPCP_OUTPUT 2>> "${LOGDIR}/ispcp_network.err.log" 
    62         ${IPTABLES} -F ISPCP_INPUT 2>> "${LOGDIR}/ispcp_network.err.log" 
    63         ${IPTABLES} -F ISPCP_OUTPUT 2>> "${LOGDIR}/ispcp_network.err.log" 
    64         ${IPTABLES} -X ISPCP_INPUT 2>> "${LOGDIR}/ispcp_network.err.log" 
    65         ${IPTABLES} -X ISPCP_OUTPUT 2>> "${LOGDIR}/ispcp_network.err.log" 
     92        ${IPTABLES} -D INPUT -j ISPCP_INPUT 2>> "${LOG_DIR}/${NAME}.err.log" 
     93        ${IPTABLES} -D OUTPUT -j ISPCP_OUTPUT 2>> "${LOG_DIR}/${NAME}.err.log" 
     94        ${IPTABLES} -F ISPCP_INPUT 2>> "${LOG_DIR}/${NAME}.err.log" 
     95        ${IPTABLES} -F ISPCP_OUTPUT 2>> "${LOG_DIR}/${NAME}.err.log" 
     96        ${IPTABLES} -X ISPCP_INPUT 2>> "${LOG_DIR}/${NAME}.err.log" 
     97        ${IPTABLES} -X ISPCP_OUTPUT 2>> "${LOG_DIR}/${NAME}.err.log" 
     98 
     99        # Remove lock file 
     100        rm $LFILE 
    66101} 
    67102 
     
    69104  start) 
    70105        echo -n "Starting $DESC:" 
     106        if [ -e $LFILE ]; then 
     107           echo " ${NAME} is already started" >&2 
     108           exit 1 
     109        fi 
    71110        add_rules 
    72111        echo " $NAME." 
     
    74113  stop) 
    75114        echo -n "Stopping $DESC:" 
     115        if [ ! -e $LFILE ]; then 
     116           echo "${NAME} is already stopped" >&2 
     117           exit 1 
     118        fi 
    76119        remove_rules 
    77120        echo " $NAME." 
     
    79122  restart|force-reload) 
    80123        echo -n "Restarting $DESC:" 
    81         remove_rules 
    82         sleep 2 
     124        if [ ! -e $LFILE ]; then 
     125           echo "${NAME} is already stopped" >&2 
     126        else 
     127           remove_rules 
     128           sleep 2 
     129        fi 
    83130        add_rules 
    84131        echo " $NAME." 
     132        ;; 
     133  status) 
     134        if [ ! -e $LFILE ]; then 
     135           echo "${NAME} is stopped" 
     136        else 
     137           echo "${NAME} is started" 
     138           exit 0 
     139        fi 
    85140        ;; 
    86141  *) 
     
    91146 
    92147exit 0 
    93  
  • trunk/configs/ispcp.conf

    r729 r736  
    2323BASE_SERVER_VHOST = 
    2424 
    25 MR_LOCK_FILE = /tmp/ispcp.lock 
     25MR_LOCK_FILE = /var/run/ispcp.lock 
    2626 
    2727# 
     
    8181# 
    8282 
     83# Don't change this one 
    8384DATABASE_TYPE = mysql 
    8485 
     
    9394DATABASE_DIR = /var/lib/mysql 
    9495 
     96CMD_MYSQLDUMP = /usr/bin/mysqldump 
     97 
    9598# 
    9699# Main variables 
     
    138141# AWSTATS data 
    139142# 
     143 
    140144AWSTATS_ACTIVE = no 
    141145 
     
    368372 
    369373### Deprecated ### 
     374## Note: these settings are not used by default 
    370375## ToDo: Config it by MySQL via Interface! 
    371376### 
  • trunk/engine/backup/ispcp-backup-all

    r713 r736  
    290290                                if ($dbuser && $dbpass) { 
    291291                                        my $db_backup_file = "$dmn_backup_dir/$db_name.sql"; 
    292                                         my $db_backupcmd = "mysqldump --add-drop-table -u\'$dbuser\' -p\'$dbpass\' \'$db_name\' >\'$db_backup_file\'"; 
     292                                        my $db_backupcmd = "$main::cfg{'CMD_MYSQLDUMP'} --add-drop-table -u\'$dbuser\' -p\'$dbpass\' \'$db_name\' >\'$db_backup_file\'"; 
    293293                                        my $db_compresscmd = "$main::cfg{'CMD_BZIP'} --force \'$db_backup_file\'"; 
    294294                                        $rs = sys_command($db_backupcmd); 
     
    324324                } else { 
    325325                        if ( -e "$dmn_dir/$backup_filename" ) { 
    326                          
     326 
    327327                            $rs = del_file("$dmn_dir/$backup_filename"); 
    328328                            return $rs if ($rs != 0); 
    329                              
     329 
    330330                        } 
    331331                } 
  • trunk/engine/ispcp_common_code.pl

    r675 r736  
    4242 
    4343return $rs if ($rs != 0); 
     44 
     45$main::lock_file = $main::cfg{'MR_LOCK_FILE'}; 
    4446 
    4547$main::log_dir = $main::cfg{'LOG_DIR'}; 
  • trunk/engine/ispcp_common_methods.pl

    r719 r736  
    14381438} 
    14391439 
    1440 $main::lock_file = '/tmp/ispcp.lock'; 
    1441  
    14421440sub lock_system { 
    14431441 
  • trunk/engine/setup/ispcp-setup

    r734 r736  
    18581858                                        '{MAIL_DMN}' => $main::cfg{'BASE_SERVER_VHOST'}, 
    18591859                                        '{CONF_DIR}' => $main::cfg{'CONF_DIR'}, 
     1860                                        '{MR_LOCK_FILE}' => $main::cfg{'MR_LOCK_FILE'}, 
    18601861                                        '{PEAR_DIR}' => $main::cfg{'PEAR_DIR'} 
    18611862                                        ); 
     
    18771878                                        '{MAIL_DMN}' => $main::cfg{'BASE_SERVER_VHOST'}, 
    18781879                                        '{CONF_DIR}' => $main::cfg{'CONF_DIR'}, 
     1880                                        '{MR_LOCK_FILE}' => $main::cfg{'MR_LOCK_FILE'}, 
    18791881                                        '{PEAR_DIR}' => $main::cfg{'PEAR_DIR'} 
    18801882                                        ); 
  • trunk/gui/admin/index.php

    r730 r736  
    2424check_login(__FILE__); 
    2525 
    26 global $cfg; 
    2726$theme_color = $cfg['USER_INITIAL_THEME']; 
    2827 
     
    210209gen_server_trafic($tpl, $sql); 
    211210 
     211gen_page_message($tpl); 
     212 
    212213$tpl -> parse('PAGE', 'page'); 
    213214 
  • trunk/gui/client/catchall.php

    r731 r736  
    294294    gen_page_catchall_list($tpl, $sql, $dmn_id, $dmn_name); 
    295295    // gen_page_ftp_list($tpl, $sql, $dmn_id, $dmn_name); 
    296     return $total_mails; 
    297296} 
    298297 
     
    304303    array('TR_CLIENT_MANAGE_USERS_PAGE_TITLE' => tr('ISPCP - Client/Manage Users'), 
    305304        'THEME_COLOR_PATH' => "../themes/$theme_color", 
    306         'THEME_CHARSET' => tr('encoding'),  
     305        'THEME_CHARSET' => tr('encoding'), 
    307306        'ISPCP_LICENSE' => $cfg['ISPCP_LICENSE'], 
    308307        'ISP_LOGO' => get_logo($_SESSION['user_id']) 
  • trunk/gui/client/create_catchall.php

    r730 r736  
    107107      $rs = exec_query($sql, $query, array($item_id, $item_id, $ok_status)); 
    108108      if ($rs -> RecordCount() == 0) { 
    109           $tpl -> parse('MAIL_LIST', ''); 
    110           $tpl -> assign(array('NORMAL_MAIL' => 'disabled', 'FORWARD_MAIL' => 'selected')); 
     109          $tpl -> assign(array('NORMAL_MAIL' => 'disabled', 'FORWARD_MAIL' => 'selected', 'MAIL_LIST' => '')); 
    111110      } else { 
    112111 
     
    150149 
    151150      if ($rs -> RecordCount() == 0) { 
    152           $tpl -> parse('MAIL_LIST', ''); 
    153           $tpl -> assign(array('NORMAL_MAIL' => 'disabled', 'FORWARD_MAIL' => 'selected')); 
     151          $tpl -> assign(array('NORMAL_MAIL' => 'disabled', 'FORWARD_MAIL' => 'selected', 'MAIL_LIST' => '')); 
    154152      } else { 
    155153 
     
    200198 
    201199      if ($rs -> RecordCount() == 0) { 
    202           $tpl -> parse('MAIL_LIST', ''); 
    203           $tpl -> assign(array('NORMAL_MAIL' => 'disabled', 'FORWARD_MAIL' => 'selected')); 
     200          $tpl -> assign(array('NORMAL_MAIL' => 'disabled', 'FORWARD_MAIL' => 'selected', 'MAIL_LIST' => '')); 
    204201      } else { 
    205202 
     
    240237 
    241238  global $cfg; 
    242  
     239  $match = array(); 
    243240  if (isset($_POST['uaction']) && $_POST['uaction'] === 'create_catchall' && $_POST['mail_type'] === 'normal') { 
    244241    if (preg_match("/(\d+);(dmn|als|sub)/", $id, $match) == 1) { 
     
    367364$tpl -> assign(array('TR_CLIENT_CREATE_CATCHALL_PAGE_TITLE' => tr('ISPCP - Client/Create CatchAll Mail Account'), 
    368365                     'THEME_COLOR_PATH' => "../themes/$theme_color", 
    369                      'THEME_CHARSET' => tr('encoding'),  
     366                     'THEME_CHARSET' => tr('encoding'), 
    370367                     'ISPCP_LICENSE' => $cfg['ISPCP_LICENSE'], 
    371368                     'ISP_LOGO' => get_logo($_SESSION['user_id']))); 
  • trunk/gui/client/index.php

    r730 r736  
    344344    ); 
    345345 
     346gen_page_message($tpl); 
     347 
    346348$tpl->parse('PAGE', 'page'); 
    347349 
  • trunk/gui/include/ispcp-functions.php

    r732 r736  
    1818 **/ 
    1919 
    20 function check_for_lock_file() { 
    21     // This function is useless right now 
    22     //The daemon/engine never sets such lock file 
    23     return ; 
     20function check_for_lock_file($wait_lock_timeout = 500000) { 
    2421 
    2522    global $cfg; 
    2623 
    27         $wait_lock_timeout = 500000; 
    28  
    29         $lock_file_name = $cfg['MR_LOCK_FILE']; 
    30  
    3124        set_time_limit(0); 
    32     while(file_exists($lock_file_name)) { 
     25    while(file_exists($cfg['MR_LOCK_FILE'])) { 
    3326 
    3427                usleep($wait_lock_timeout); 
  • trunk/gui/include/ispcp-lib.php

    r730 r736  
    116116 
    117117// The virtual host file from Apache which contains our virtual host entries 
    118 $cfg['SERVER_VHOST_FILE'] = '/etc/apache2/sites-available/ispcp.conf'; 
     118$cfg['SERVER_VHOST_FILE'] = $cfg['APACHE_SITES_DIR'] . '/ispcp.conf'; 
    119119 
    120120require_once(INCLUDEPATH.'/spGzip.php'); 
  • trunk/gui/reseller/edit_user.php

    r682 r736  
    124124if (isset($_POST['Submit']) && isset($_POST['uaction']) && ('save_changes' === $_POST['uaction'])) { 
    125125// Process data 
    126         global $dmn_user_name; 
    127126 
    128127        if (isset($_SESSION['edit_ID'])) { 
     
    406405 
    407406        $admin_login = $_SESSION['user_logged']; 
    408     write_log("$admin_login change data/password for $dmn_user_name!"); 
     407    write_log("$admin_login changed data/password for $dmn_user_name!"); 
    409408 
    410409        if (isset($_POST['send_data']) && !empty($inpass)) { 
  • trunk/gui/reseller/index.php

    r730 r736  
    387387// 
    388388 
    389 // gen_page_message($tpl); 
     389gen_page_message($tpl); 
    390390 
    391391$tpl -> assign('LAYOUT', ''); 
  • trunk/gui/themes/omega_original/admin/index.tpl

    r730 r736  
    4141    <td><!-- BDP: props_list --> 
    4242        <table width="100%" cellpadding="5" cellspacing="5"> 
     43          <!-- BDP: page_message --> 
     44           <tr> 
     45             <td>&nbsp;</td> 
     46             <td colspan="2" class=title><font color="#FF0000">{MESSAGE}</font></td> 
     47           </tr> 
     48          <!-- EDP: page_message --> 
    4349          <tr> 
    4450            <td width="25">&nbsp;</td> 
  • trunk/gui/themes/omega_original/client/create_catchall.tpl

    r729 r736  
    102102                            </tr> 
    103103                            <!-- EDP: page_message --> 
     104                            <!-- BDP: mail_list --> 
    104105                            <tr> 
    105106                              <td nowrap class="content2" width="200"><input type="radio" name="mail_type" value="normal" {NORMAL_MAIL} onClick="changeType('normal');"> 
    106107                                {TR_MAIL_LIST} </td> 
    107108                              <td nowrap class="content"><select name="mail_id"> 
    108                                   <!-- BDP: mail_list --> 
    109109                                  <option value="{MAIL_ID};{MAIL_ACCOUNT_PUNNY};">{MAIL_ACCOUNT}</option> 
    110                                   <!-- EDP: mail_list --> 
    111110                                </select> 
    112111                              </td> 
    113112                            </tr> 
     113                            <!-- EDP: mail_list --> 
    114114                            <tr> 
    115115                              <td nowrap class="content2" colspan="2"><input type="radio" name="mail_type" value="forward" {FORWARD_MAIL} onClick="changeType('forward');"> 
  • trunk/gui/themes/omega_original/client/index.tpl

    r730 r736  
    4747    <td><!-- BDP: props_list --> 
    4848        <table width="100%" cellspacing="7"> 
     49          <!-- BDP: page_message --> 
     50           <tr> 
     51             <td>&nbsp;</td> 
     52             <td colspan="2" class=title><font color="#FF0000">{MESSAGE}</font></td> 
     53           </tr> 
     54          <!-- EDP: page_message --> 
    4955          <tr> 
    5056            <td width="25">&nbsp;</td> 
  • trunk/gui/themes/omega_original/reseller/index.tpl

    r730 r736  
    4747    <td><!-- BDP: props_list --> 
    4848        <table width="100%" cellspacing="7"> 
     49          <!-- BDP: page_message --> 
     50           <tr> 
     51             <td>&nbsp;</td> 
     52             <td colspan="2" class=title><font color="#FF0000">{MESSAGE}</font></td> 
     53           </tr> 
     54          <!-- EDP: page_message --> 
    4955          <tr> 
    5056            <td width="25">&nbsp;</td> 
  • trunk/keys/BSDmakefile

    r659 r736  
    22.include <../Makefile.inc> 
    33 
    4 install:  
    5         perl rpl.pl $(SYSTEM_ROOT)/gui/include/ispcp-db-keys.php $(SYSTEM_ROOT)/engine/ispcp-db-keys.pl $(SYSTEM_ROOT)/engine/messager/ispcp-db-keys.pl 
     4FILES = $(SYSTEM_ROOT)/gui/include/ispcp-db-keys.php $(SYSTEM_ROOT)/engine/ispcp-db-keys.pl $(SYSTEM_ROOT)/engine/messager/ispcp-db-keys.pl 
     5 
     6install: $(FILES) 
     7        perl rpl.pl $(FILES) 
    68 
    79uninstall: 
  • trunk/keys/Makefile

    r659 r736  
    22export 
    33 
    4 install:  
    5         perl rpl.pl $(SYSTEM_ROOT)/gui/include/ispcp-db-keys.php $(SYSTEM_ROOT)/engine/ispcp-db-keys.pl $(SYSTEM_ROOT)/engine/messager/ispcp-db-keys.pl 
     4FILES = $(SYSTEM_ROOT)/gui/include/ispcp-db-keys.php $(SYSTEM_ROOT)/engine/ispcp-db-keys.pl $(SYSTEM_ROOT)/engine/messager/ispcp-db-keys.pl 
     5 
     6install: $(FILES) 
     7        perl rpl.pl $(FILES) 
    68 
    79uninstall: 
  • trunk/tools/daemon/Makefile

    r712 r736  
    22# Copyright (c) 2001-2004 by moleSoftware GmbH 
    33# http://www.molesoftware.com 
     4# Copyright (c) 2007 by ispCP 
     5# http://isp-control.net 
    46# 
    57# 
     
    79#    This program is free software; you can redistribute it and/or 
    810#    modify it under the terms of the MPL Mozilla Public License 
    9 #    as published by the Free Software Foundation; either version 1.1     
     11#    as published by the Free Software Foundation; either version 1.1 
    1012#    of the License, or (at your option) any later version. 
    1113# 
    1214#    This program is distributed in the hope that it will be useful, 
    1315#    but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
     16#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1517#    MPL Mozilla Public License for more details. 
    16 #     
     18# 
    1719#    You may have received a copy of the MPL Mozilla Public License 
    1820#    along with this program. 
    19 #     
     21# 
    2022#    An on-line copy of the MPL Mozilla Public License can be found 
    2123#    http://www.mozilla.org/MPL/MPL-1.1.html 
     
    4042        $(BUILD) ispcp_daemon $(OBJS) 
    4143        $(STRIP) ispcp_daemon 
    42          
     44 
    4345%.o: %.c %.h 
    4446        $(COMPILE) $@ $*.c