* $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
* $Author:: $ *
- * Needs to be in all Files and every File needs "svn propset *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* Copyright (c) 2009, 2010 by Mailer Developer Team *
// Display form is default
$FORM = true;
-if ((isPostRequestParameterSet('add')) && (isPostRequestParameterSet('login')) && (isPostRequestParameterSet('email')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2')) && (postRequestParameter('pass1') == postRequestParameter('pass2'))) {
- // Add admin when not added already
- if (addAdminAccount(postRequestParameter('login'), generateHash(postRequestParameter('pass1')), postRequestParameter('email')) == 'done') {
- // Do not ouput any form!
- $FORM = false;
+// Is the form sent?
+if (isFormSent('add')) {
+ // Check all
+ if ((isPostRequestParameterSet('login')) && (isPostRequestParameterSet('email')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2')) && (postRequestParameter('pass1') == postRequestParameter('pass2'))) {
+ // Add admin when not added already
+ if (addAdminAccount(postRequestParameter('login'), generateHash(postRequestParameter('pass1')), postRequestParameter('email')) == 'done') {
+ // Do not ouput any form!
+ $FORM = false;
- // Admin login saved
- loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ADD_DONE'));
+ // Admin login saved
+ loadTemplate('admin_settings_saved', false, '{--ADMIN_ADMINS_ADD_DONE--}');
- // Run filter chain
- runFilterChain('post_admin_added', postRequestArray());
+ // Run filter chain
+ runFilterChain('post_admin_added', postRequestArray());
+ } // END - if
} // END - if
} // END - if
);
// Load form from template
- loadTemplate('admin_admins_add', false, $content);
+ loadTemplate('admin_add_admins', false, $content);
} // END - if
// [EOF]