Exemple #1
0
/**
 * Main install script
 */
function gu_install($collective_name, $admin_username, $admin_password, $admin_email, $salt)
{
    gu_config::set('collective_name', $collective_name);
    //gu_config::set('admin_username', $admin_username);
    //gu_config::set('admin_password', $admin_password);
    //gu_config::set('admin_email', $admin_email);
    gu_config::set('salt', $salt);
    return gu_config::save();
}
Exemple #2
0
        gu_config::set('smtp_encryption', get_post_var('smtp_encryption'));
        gu_config::set('smtp_username', get_post_var('smtp_username'));
        gu_config::set('smtp_password', get_post_var('smtp_password'));
        gu_config::set('use_sendmail', is_post_var('use_sendmail'));
        gu_config::set('use_phpmail', is_post_var('use_phpmail'));
        gu_config::set('batch_max_size', (int) get_post_var('batch_max_size'));
        gu_config::set('batch_time_limit', (int) get_post_var('batch_time_limit'));
    } elseif ($section == 'messages') {
        gu_config::set('msg_prefix_subject', is_post_var('msg_prefix_subject'));
        gu_config::set('msg_coll_name_on_multilist', is_post_var('msg_coll_name_on_multilist'));
        gu_config::set('msg_append_signature', is_post_var('msg_append_signature'));
        gu_config::set('msg_admin_copy', is_post_var('msg_admin_copy'));
        gu_config::set('list_send_welcome', is_post_var('list_send_welcome'));
        gu_config::set('list_send_goodbye', is_post_var('list_send_goodbye'));
        gu_config::set('list_subscribe_notify', is_post_var('list_subscribe_notify'));
        gu_config::set('list_unsubscribe_notify', is_post_var('list_unsubscribe_notify'));
    }
    if (gu_config::save()) {
        gu_success(t('Settings successfully saved'));
    }
} elseif (is_post_var('test_settings')) {
    // Don't bother if there is no admin email
    if (gu_config::get('admin_email') != '') {
        gu_sender_test();
    } else {
        gu_error(t('Administrator email must be set before mail can be sent'));
    }
}
function gu_sender_test()
{
    // Get current settings, which may not have been saved