change_default_to_root.patch

Davide Principi, 02/07/2014 12:56 PM

Download (1.98 KB)

View differences:

root/etc/e-smith/db/configuration/defaults/backup-data/notifyTo
1
admin@localhost
1
root@localhost
root/usr/share/nethesis/NethServer/Module/BackupData.php
24 24

  
25 25

  
26 26
/**
27
 * Configure Hylafax and modem
27
 * Configure data backup
28 28
 *
29 29
 * @author Giacomo Sanchietti <giacomo.sanchietti@nethesis.it>
30 30
 * @since 1.0
......
138 138
        if ($this->parameters["notifyToType"] === 'custom') {
139 139
             $this->parameters["notifyTo"] = $value;
140 140
        } else {
141
             $this->parameters["notifyTo"] = "admin@localhost";
141
             $this->parameters["notifyTo"] = "root@localhost";
142 142
        }
143 143
        return true;
144 144
    }
......
147 147
    public function readNotifyToType()
148 148
    {
149 149
        $current = $this->getPlatform()->getDatabase('configuration')->getProp('backup-data','notifyTo');
150
        if($current == "admin@localhost") {
150
        if($current == "") {
151 151
            return "admin";
152 152
        } else {
153 153
            return "custom";
......
157 157
    public function writeNotifyToType($value)
158 158
    {
159 159
        if ($this->parameters["notifyToType"] === 'admin') {
160
             $this->parameters["notifyTo"] = 'admin@localhost';
160
             $this->parameters["notifyTo"] = '';
161 161
             return 'admin';
162 162
        } else {
163 163
             return "";