From c873ca11da3920170baf3e59b08b01fb06a6299e Mon Sep 17 00:00:00 2001 From: markjcrane Date: Mon, 3 Aug 2015 09:41:58 -0600 Subject: [PATCH] Remove smtp settings entirely from app/settings. --- app/settings/app_config.php | 35 ---------- app/settings/app_defaults.php | 42 ----------- app/settings/setting_edit.php | 127 ---------------------------------- 3 files changed, 204 deletions(-) diff --git a/app/settings/app_config.php b/app/settings/app_config.php index 351824af4e..f2281de75c 100644 --- a/app/settings/app_config.php +++ b/app/settings/app_config.php @@ -94,41 +94,6 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $z++; - $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "smtp_host"; - $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "smtphost"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $z++; - $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "smtp_secure"; - $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "smtpsecure"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $z++; - $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "smtp_auth"; - $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "smtpauth"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $z++; - $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "smtp_username"; - $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "smtpusername"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $z++; - $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "smtp_password"; - $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "smtppassword"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $z++; - $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "smtp_from"; - $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "smtpfrom"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $z++; - $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "smtp_from_name"; - $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "smtpfromname"; - $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; - $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; - $z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = "mod_shout_decoder"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; diff --git a/app/settings/app_defaults.php b/app/settings/app_defaults.php index b054ccb60b..3f12171d26 100644 --- a/app/settings/app_defaults.php +++ b/app/settings/app_defaults.php @@ -76,48 +76,6 @@ if ($domains_processed == 1) { $db->exec(check_sql($sql)); unset($sql); } - else { - //move the smtp settings from v_settings to the v_default_settings table - if (count($_SESSION['email']) == 0) { - //set the variable - $smtp[]['smtp_host'] = check_str($row['smtp_host']); - $smtp[]['smtp_secure'] = check_str($row['smtp_secure']); - $smtp[]['smtp_auth'] = check_str($row['smtp_auth']); - $smtp[]['smtp_username'] = check_str($row['smtp_username']); - $smtp[]['smtp_password'] = check_str($row['smtp_password']); - $smtp[]['smtp_from'] = check_str($row['smtp_from']); - $smtp[]['smtp_from_name'] = check_str($row['smtp_from_name']); - //build the sql inserts - foreach ($smtp as $row) { - foreach ($row as $key => $value) { - //add the provision variable to the default settings table - $sql = "insert into v_default_settings "; - $sql .= "("; - $sql .= "default_setting_uuid, "; - $sql .= "default_setting_category, "; - $sql .= "default_setting_subcategory, "; - $sql .= "default_setting_name, "; - $sql .= "default_setting_value, "; - $sql .= "default_setting_enabled, "; - $sql .= "default_setting_description "; - $sql .= ") "; - $sql .= "values "; - $sql .= "("; - $sql .= "'".uuid()."', "; - $sql .= "'email', "; - $sql .= "'".$key."', "; - $sql .= "'var', "; - $sql .= "'".check_str($value)."', "; - $sql .= "'true', "; - $sql .= "'' "; - $sql .= ")"; - //echo $sql."\n"; - $db->exec(check_sql($sql)); - unset($sql); - } - } - } - } } ?> \ No newline at end of file diff --git a/app/settings/setting_edit.php b/app/settings/setting_edit.php index 21ec080601..ad35ec7a51 100644 --- a/app/settings/setting_edit.php +++ b/app/settings/setting_edit.php @@ -76,13 +76,6 @@ else { $xml_rpc_auth_user = check_str($_POST["xml_rpc_auth_user"]); $xml_rpc_auth_pass = check_str($_POST["xml_rpc_auth_pass"]); //$admin_pin = check_str($_POST["admin_pin"]); - //$smtp_host = check_str($_POST["smtp_host"]); - //$smtp_secure = check_str($_POST["smtp_secure"]); - //$smtp_auth = check_str($_POST["smtp_auth"]); - //$smtp_username = check_str($_POST["smtp_username"]); - //$smtp_password = check_str($_POST["smtp_password"]); - //$smtp_from = check_str($_POST["smtp_from"]); - //$smtp_from_name = check_str($_POST["smtp_from_name"]); $mod_shout_decoder = check_str($_POST["mod_shout_decoder"]); $mod_shout_volume = check_str($_POST["mod_shout_volume"]); } @@ -100,13 +93,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //if (strlen($xml_rpc_auth_user) == 0) { $msg .= "Please provide: XML RPC Auth User
\n"; } //if (strlen($xml_rpc_auth_pass) == 0) { $msg .= "Please provide: XML RPC Auth Password
\n"; } //if (strlen($admin_pin) == 0) { $msg .= "Please provide: Admin PIN Number
\n"; } - //if (strlen($smtp_host) == 0) { $msg .= "Please provide: SMTP Host
\n"; } - //if (strlen($smtp_secure) == 0) { $msg .= "Please provide: SMTP Secure
\n"; } - //if (strlen($smtp_auth) == 0) { $msg .= "Please provide: SMTP Auth
\n"; } - //if (strlen($smtp_username) == 0) { $msg .= "Please provide: SMTP Username
\n"; } - //if (strlen($smtp_password) == 0) { $msg .= "Please provide: SMTP Password
\n"; } - //if (strlen($smtp_from) == 0) { $msg .= "Please provide: SMTP From
\n"; } - //if (strlen($smtp_from_name) == 0) { $msg .= "Please provide: SMTP From Name
\n"; } //if (strlen($mod_shout_decoder) == 0) { $msg .= "Please provide: Mod Shout Decoder
\n"; } //if (strlen($mod_shout_volume) == 0) { $msg .= "Please provide: Mod Shout Volume
\n"; } if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { @@ -306,119 +292,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; - /* - echo "\n"; - echo "\n"; - echo " SMTP Host\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the SMTP host address. TLS example: smtp.gmail.com:587\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo " SMTP Secure\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Select the SMTP security. None, TLS, SSL\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo " SMTP Auth\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Use SMTP Authentication true or false.\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo " SMTP Username\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the SMTP authentication username.\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo " SMTP Password\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the SMTP authentication password.\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo " SMTP From\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the SMTP From email address.\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo " SMTP From Name\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the SMTP From Name.\n"; - echo "\n"; - echo "\n"; - */ - echo "\n"; echo "\n"; echo " ".$text['label-shout-decoder']."\n";