[Easymod-cvs] easymod2/mods/easymod easymod_display_functions.php,1.12,1.13 easymod_install.php,1.18
Status: Beta
Brought to you by:
wgeric
|
From: Jim W. <ter...@us...> - 2005-06-20 22:15:52
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10578/mods/easymod Modified Files: easymod_display_functions.php easymod_install.php Log Message: Added some changes by -=ET=- Fixed a bug or two Index: easymod_display_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_display_functions.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** easymod_display_functions.php 19 Jun 2005 22:46:41 -0000 1.12 --- easymod_display_functions.php 20 Jun 2005 22:15:41 -0000 1.13 *************** *** 363,369 **** function get_install_info( &$variables, $prev_em_version) { ! global $phpEx, $lang, $easymod_install_version, $phpBB_version, $language, $phpbb_root_path, $script_path ; $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.' . $phpEx ; --- 363,407 ---- + // + // Pick a language, any language ... + // + function em_language_select($default, $select_name="language", $dirname="admin/mods/easymod/languages") + { + global $phpEx, $phpbb_root_path; + + $dir = opendir($phpbb_root_path . $dirname); + + $EM_lang = array(); + while ( $file = readdir($dir) ) + { + if (preg_match('#^lang_easymod_#i', $file) && is_file(@phpbb_realpath($phpbb_root_path . $dirname . '/' . $file)) && !is_link(@phpbb_realpath($phpbb_root_path . $dirname . '/' . $file))) + { + $filecode = substr($file, 13, strpos($file, '.')-13); + include @phpbb_realpath($phpbb_root_path . $dirname . '/lang_easymod_' . $filecode . '.' .$phpEx); + $displayname = $lang['EM_lang_name']; + $EM_lang[$displayname] = $filecode; + } + } + + closedir($dir); + + @asort($EM_lang); + @reset($EM_lang); + + $EM_lang_select = '<select name="' . $select_name . '">'; + while ( list($displayname, $filecode) = @each($EM_lang) ) + { + $selected = ( strtolower($default) == strtolower($filecode) ) ? ' selected="selected"' : ''; + $EM_lang_select .= '<option value="' . $filecode . '"' . $selected . '>' . ucwords($displayname) . '</option>'; + } + $EM_lang_select .= '</select>'; + + return $EM_lang_select; + } + + function get_install_info( &$variables, $prev_em_version) { ! global $phpEx, $lang, $easymod_install_version, $phpBB_version, $phpbb_root_path, $script_path, $language ; $variables['U_FORM'] = $phpbb_root_path . $script_path . 'easymod_install.' . $phpEx ; *************** *** 374,392 **** $variables['EM_EasyMOD_version'] = $lang['EM_EasyMOD_version'] ; ! // Read lang directory and build list ! $dir = $phpbb_root_path . $script_path . 'language/'; ! $variables['LANG_OPTIONS'] = ''; ! if ($handle = opendir($dir)) ! { ! while (false !== ($file = @readdir($handle))) ! { ! if ($file != "." && $file != "..") ! { ! $selected = ($file == $language) ? 'selected="selected"': ''; ! $variables['LANG_OPTIONS'] .= '<option value="' . $file . '" ' . $selected . '>' . $file . '</option>'; ! } ! } ! } ! $variables['GO'] = $lang['Go'] ; $variables['SQL_LAYER'] = SQL_LAYER ; --- 412,416 ---- $variables['EM_EasyMOD_version'] = $lang['EM_EasyMOD_version'] ; ! $variables['LANG_OPTIONS'] = em_language_select($language, 'language') ; $variables['GO'] = $lang['Go'] ; $variables['SQL_LAYER'] = SQL_LAYER ; *************** *** 888,892 **** $variables['EM_diagnosis'] = $lang['EM_diagnosis']; $variables['EM_auto_tech_detected'] = $lang['EM_auto_tech_detected']; ! $variables['EM_nowrite_nocopy__desc'] = $lang['EM_nowrite_desc']; $variables['EM_try_ftp'] = $lang['EM_try_ftp']; $variables['EM_perms_mod_rescan'] = $lang['EM_perms_mod_rescan']; --- 912,916 ---- $variables['EM_diagnosis'] = $lang['EM_diagnosis']; $variables['EM_auto_tech_detected'] = $lang['EM_auto_tech_detected']; ! $variables['EM_nowrite_nocopy_desc'] = $lang['EM_nowrite_nocopy__desc']; $variables['EM_try_ftp'] = $lang['EM_try_ftp']; $variables['EM_perms_mod_rescan'] = $lang['EM_perms_mod_rescan']; *************** *** 992,994 **** ! ?> --- 1016,1018 ---- ! ?> \ No newline at end of file Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** easymod_install.php 19 Jun 2005 22:46:41 -0000 1.18 --- easymod_install.php 20 Jun 2005 22:15:41 -0000 1.19 *************** *** 1,1882 **** ! <?php ! /*************************************************************************** ! * easymod_install.php ! * ------------------- ! * begin : Wednesday, March 15, 2002 ! * copyright : (C) 2002-2004 by Nuttzy - Craig Nuttall, 2005 The phpBB Group ! * email : su...@ph... ! * ! * $Id$ ! * [...3545 lines suppressed...] ! echo "<br />\n" ; ! echo "<br />\n" ; ! echo '<br /><br /><h2><span class="ok"><b>' . $lang['EM_install_completed'] . "</b></span></h2>\n" ; ! echo '<p>' . $lang['EM_admin_panel'] . "</p><br />" ; ! ! ! page_footer() ; ! exit ; ! } ! ! ! // this should never happen!! ! else ! { ! echo $lang['EM_err_no_step'] . "<br />\n" ; ! exit ; ! } ! ! ?> \ No newline at end of file |