[Easymod-cvs] easymod2/mods/easymod/includes admin_easymod.php.txt, 1.46, 1.47
Status: Beta
Brought to you by:
wgeric
From: Eric F. <wg...@us...> - 2006-06-08 04:08:13
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv28189/mods/easymod/includes Modified Files: admin_easymod.php.txt Log Message: @_@ a commit! - making fopen binary, should hopefully fix problems with multiple lines being inserted. Will have to do more testing. - starts for MODX, decided to hack this version so that MODX works in it instead of releasing the rewrite. Too many bugs in it! Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** admin_easymod.php.txt 6 Jan 2006 00:14:05 -0000 1.46 --- admin_easymod.php.txt 8 Jun 2006 04:08:08 -0000 1.47 *************** *** 95,99 **** /// /// ! define('EASYMOD_VER', 'beta (0.3.0)'); define('FAQ_LINK', '<a href="http://easymod.sourceforge.net/readme/" target="_blank">'); define('REPORT_LINK', '<a href="http://area51.phpbb.com/phpBB/viewtopic.php?t=12143" target="_blank">'); --- 95,99 ---- /// /// ! define('EASYMOD_VER', 'beta (0.3.5)'); define('FAQ_LINK', '<a href="http://easymod.sourceforge.net/readme/" target="_blank">'); define('REPORT_LINK', '<a href="http://area51.phpbb.com/phpBB/viewtopic.php?t=12143" target="_blank">'); *************** *** 216,220 **** function get_mod_properties($file, &$mod_title, &$mod_author_handle, &$mod_author_email, &$mod_author_name, &$mod_author_url, &$mod_description, &$mod_version, &$compliant) { ! global $phpbb_root_path, $script_path; // used to add a little tolerance on the Author line --- 216,220 ---- function get_mod_properties($file, &$mod_title, &$mod_author_handle, &$mod_author_email, &$mod_author_name, &$mod_author_url, &$mod_description, &$mod_version, &$compliant) { ! global $phpbb_root_path, $script_path, $mod_type; // used to add a little tolerance on the Author line *************** *** 224,228 **** // open the file and grab the first line check_file_scope($file, $phpbb_root_path . $script_path); ! $f_mod_script = fopen($file, 'r'); if (!$f_mod_script) { --- 224,228 ---- // open the file and grab the first line check_file_scope($file, $phpbb_root_path . $script_path); ! $f_mod_script = fopen($file, 'rb'); if (!$f_mod_script) { *************** *** 231,234 **** --- 231,240 ---- $buffer = fgets($f_mod_script, 1024); + if ($mod_type == MODX) + { + get_modx_properties($buffer, &$mod_title, &$mod_author_handle, &$mod_author_email, &$mod_author_name, &$mod_author_url, &$mod_description, &$mod_version, &$compliant); + return true; + } + // see if it is EMC right away; first line starts with ## on it and contains "easymod" $compliant = false; *************** *** 397,400 **** --- 403,412 ---- } + function get_modx_properties($buffer, &$mod_title, &$mod_author_handle, &$mod_author_email, &$mod_author_name, &$mod_author_url, &$mod_description, &$mod_version, &$compliant) + { + global $phpbb_root_path, $script_path, + + } + // strip the body array of a command down to the minimum *************** *** 1637,1641 **** $files = array(); check_file_scope($install_path . $install_file, $phpbb_root_path . $script_path); ! $f_mod_script = fopen($install_path . $install_file, 'r'); while (!feof($f_mod_script)) { --- 1649,1653 ---- $files = array(); check_file_scope($install_path . $install_file, $phpbb_root_path . $script_path); ! $f_mod_script = fopen($install_path . $install_file, 'rb'); while (!feof($f_mod_script)) { *************** *** 1744,1748 **** // open the core file check_file_scope($process_file, $phpbb_root_path . $script_path, true); ! if (!$read_file = fopen($process_file, 'r')) { // gotta echo out the message since message_die is not an option --- 1756,1760 ---- // open the core file check_file_scope($process_file, $phpbb_root_path . $script_path, true); ! if (!$read_file = fopen($process_file, 'rb')) { // gotta echo out the message since message_die is not an option *************** *** 1800,1804 **** check_file_scope($install_path . $install_file, $phpbb_root_path . $script_path); ! $f_mod_script = fopen($install_path . $install_file, 'r'); while (!feof($f_mod_script)) { --- 1812,1816 ---- check_file_scope($install_path . $install_file, $phpbb_root_path . $script_path); ! $f_mod_script = fopen($install_path . $install_file, 'rb'); while (!feof($f_mod_script)) { |