Commit 9b46a37c authored by Celine Noirot's avatar Celine Noirot

Update installation, add email parameters

parent d67015f2
......@@ -44,7 +44,17 @@ from_password =
#to_address =
#subject =
#message =
#Purge email configuration
#if you want to use purge option, an email is sent
#In purge email you can fix for an extention :
# the minimal duration
min_extension_duration = 1 year
# the minimal size
min_extension_size = 1 Tbite
# the price for min_extension_duration * min_extension_size
min_extension_price = 300 Euros
#delay (in days) after sending an email to indicate that the data will be deleted
delay_purge = 30
[database]
host = localhost
user = typo3
......
This diff is collapsed.
......@@ -105,6 +105,13 @@ if __name__ == '__main__':
f.write("$TYPO3_CONF_VARS['BE']['disable_exec_function'] = '0';\n")
f.write("$TYPO3_CONF_VARS['GFX']['gdlib_png'] = '0';\n")
f.write("$TYPO3_CONF_VARS['GFX']['im_combine_filename'] = 'composite';\n")
f.write("$TYPO3_CONF_VARS['GFX']['im_combine_filename'] = 'composite';\n")
f.write("$TYPO3_CONF_VARS['EXT']['extConf']['ng6']['email_from'] = '" + args["email"] + "';\n")
f.write("$TYPO3_CONF_VARS['EXT']['extConf']['ng6']['delay_purge'] = '" + ng6reader.get('email', 'delay_purge') + "';\n")
f.write("$TYPO3_CONF_VARS['EXT']['extConf']['ng6']['min_extension_duration'] = '" + ng6reader.get('email', 'min_extension_duration') + "';\n")
f.write("$TYPO3_CONF_VARS['EXT']['extConf']['ng6']['min_extension_size'] = '" + ng6reader.get('email', 'min_extension_size') + "';\n")
f.write("$TYPO3_CONF_VARS['EXT']['extConf']['ng6']['min_extension_price'] = '" + ng6reader.get('email', 'min_extension_price') + "';\n")
# Typo3 password hash
random=uuid.uuid4().hex[:10]
install_tool_password_hash = hashlib.md5(random.encode('utf-8')).hexdigest()
......@@ -149,7 +156,7 @@ if __name__ == '__main__':
erase = input('The database already contains a ng6 web site, do you want to DROP it (y/n) ? ')
elif len(tables) > 0 and ("tt_content" in tables and "pages" in tables and "be_users" in tables ):
erase = input('The database already contains a ng6 web site, do you want to DROP it (y/n) ? ')
if erase == "y" :
if erase == "y" or erase == "Y" :
curs.execute("Drop table "+ ",".join(tables) +";")
curs.execute("".join(database))
connection.commit()
......
......@@ -96,11 +96,7 @@ class tx_nG6_pi6 extends tslib_pibase {
$smarty->assign('distribution', $distribution);
$smarty->assign('ng6_admin_users', tx_nG6_db::get_ng6_admin_users() );
//$this->projects_obsolete=tx_nG6_db::select_obsolete_list_retention_data_info();
//$smarty->assign('ng6_purge_projects',$this->projects_obsolete);
//$this->ng6_purge_demands=tx_nG6_db::get_purge_demand_list();
$smarty->assign('ng6_purge_delay',$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ng6']['delay_purge']);
//$smarty->assign('ng6_purge_demands',$this->ng6_purge_demands);
$smarty->assign('ng6_purge_delay',$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ng6']['delay_purge']);
$txNG6Utils = new tx_nG6_utils;
$smarty->assign_by_ref('tx_nG6_utils', $txNG6Utils);
return $smarty->fetch('administration_view.tpl');
......@@ -187,14 +183,14 @@ nG6 team';
$to = $purge_email_to;
$subject = '[nG6 purge] No '.$purge_demand_id.' - Project '.$p[$project_id]["project_name"];
$headers[] = 'From: '.$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ng6']['purge_email_from'];
#$headers[] = 'Cc: '.$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ng6']['purge_email_from'];
$headers[] = 'Reply-To: '.$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ng6']['purge_email_from'];
$headers[] = 'From: '.$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ng6']['email_from'];
#$headers[] = 'Cc: '.$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ng6']['email_from'];
$headers[] = 'Reply-To: '.$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ng6']['email_from'];
$headers[] = 'X-Mailer: PHP/' . phpversion();
#TODO Uncomment
#mail($to, $subject, $mail, implode("\r\n", $headers));
//return $headers ;
}
}
return $mail;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment