
aol_check_install
By: a guest on
May 6th, 2012 | syntax:
PHP | size: 1.54 KB | hits: 15 | expires: Never
function aol_check_install()
{
global $config, $db, $user, $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/db/db_tools.' . $phpEx);
$aol_db = new phpbb_db_tools($db);
$aol_mod_enabled = 'aol_mod_enabled';
if(!isset($config['aol_mod_installed']) || !$aol_db->sql_column_exists(USERS_TABLE, 'user_aol_fail_only') || !$aol_db->sql_column_exists(USERS_TABLE, 'user_aol_alert') ||
!file_exists($phpbb_root_path . 'language/' . $user->data['user_lang'] . '/email/' . 'alert_on_fail_login.txt') || !file_exists($phpbb_root_path . 'language/' . $user->data['user_lang'] . '/email/' . 'alert_on_fail_login_acp.txt') ||
!file_exists($phpbb_root_path . 'language/' . $user->data['user_lang'] . '/email/' . 'alert_on_fail_login_acp_founder.txt') || !file_exists($phpbb_root_path . 'language/' . $user->data['user_lang'] . '/email/' . 'alert_on_fail_login_founder.txt') ||
!file_exists($phpbb_root_path . 'language/' . $user->data['user_lang'] . '/email/' . 'alert_on_success_login.txt') || !file_exists($phpbb_root_path . 'language/' . $user->data['user_lang'] . '/email/' . 'alert_on_success_login_acp.txt') ||
!file_exists($phpbb_root_path . 'language/' . $user->data['user_lang'] . '/email/' . 'alert_on_success_login_acp_founder.txt'))
{ //disable mod for avoid any error on the board
if(isset($config[$aol_mod_enabled]))
{
set_config($aol_mod_enabled, 0, false);
}
//Install error happenned turn false...
return false;
}
else
{ //Ok all step succefully checked, so we are fine, return true :D
return true;
}
}
?>