easymod-cvs Mailing List for EasyMOD (Page 2)
Status: Beta
Brought to you by:
wgeric
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
(16) |
May
(36) |
Jun
(53) |
Jul
(21) |
Aug
|
Sep
(10) |
Oct
(4) |
Nov
(69) |
Dec
(57) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(8) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
(5) |
Oct
(3) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(12) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Eric F. <wg...@us...> - 2006-09-30 17:59:14
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv5136/easymod/includes Modified Files: admin_easymod.php.txt Log Message: Bug fixes. - append_sid() used in install now - and some others Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** admin_easymod.php.txt 8 Jun 2006 04:08:08 -0000 1.47 --- admin_easymod.php.txt 30 Sep 2006 17:59:09 -0000 1.48 *************** *** 22,26 **** // entries to be displayed in the ACP index ! if (!empty($setmodules)) { if ( @file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_easymod.' . $phpEx) ) --- 22,26 ---- // entries to be displayed in the ACP index ! if (defined('IN_PHPBB') && !empty($setmodules)) { if ( @file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_easymod.' . $phpEx) ) *************** *** 405,409 **** 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, } --- 405,409 ---- 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; } |
From: Eric F. <wg...@us...> - 2006-09-30 17:59:14
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv5136/easymod/em_includes Modified Files: em_modio.php Log Message: Bug fixes. - append_sid() used in install now - and some others Index: em_modio.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_modio.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** em_modio.php 8 Jun 2006 04:08:07 -0000 1.8 --- em_modio.php 30 Sep 2006 17:59:09 -0000 1.9 *************** *** 542,545 **** --- 542,546 ---- // return a success message if the copy works + echo $from . ' | ' . $to . '<br />'; if ( copy( $from, $to)) { |
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)) { |
From: Eric F. <wg...@us...> - 2006-06-08 04:08:12
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv28189/mods/easymod/em_includes Modified Files: em_ftp.php em_functions.php em_modio.php 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: em_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_functions.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** em_functions.php 6 Nov 2005 13:30:52 -0000 1.22 --- em_functions.php 8 Jun 2006 04:08:07 -0000 1.23 *************** *** 40,43 **** --- 40,46 ---- define('FIND_FAIL_CRITICAL', 2); + define('TEXT', 0); + define('MODX', 1); + /// /// Interface to crypt class *************** *** 766,770 **** // using a file that we know is present ! if ($fin = fopen( 'languages/lang_easymod_'.$language.'.'.$phpEx, 'r')) { // just make sure the first line is what we were expecting --- 769,773 ---- // using a file that we know is present ! if ($fin = fopen( 'languages/lang_easymod_'.$language.'.'.$phpEx, 'rb')) { // just make sure the first line is what we were expecting *************** *** 798,802 **** // see if we can create a new file ! if ($fout = fopen( 'EM_test.txt', 'w')) { fwrite( $fout, 'EM can write!\n') ; --- 801,805 ---- // see if we can create a new file ! if ($fout = fopen( 'EM_test.txt', 'wb')) { fwrite( $fout, 'EM can write!\n') ; *************** *** 820,824 **** // see if we can open the index.php for writing; not making any changes though!! ! if ($fout = fopen( $phpbb_root_path . 'index.'.$phpEx, 'a')) { fclose( $fout) ; --- 823,827 ---- // see if we can open the index.php for writing; not making any changes though!! ! if ($fout = fopen( $phpbb_root_path . 'index.'.$phpEx, 'ab')) { fclose( $fout) ; *************** *** 917,921 **** // see if we can create and write to this file ! if ($fp = @fopen($tmpfname, 'w')) { // remember to clean up! --- 920,924 ---- // see if we can create and write to this file ! if ($fp = @fopen($tmpfname, 'wb')) { // remember to clean up! Index: em_modio.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_modio.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** em_modio.php 31 Oct 2005 17:57:15 -0000 1.7 --- em_modio.php 8 Jun 2006 04:08:07 -0000 1.8 *************** *** 245,249 **** if (!$create_command) { ! if (!$this->pread_file = fopen ( $phpbb_root_path . $this->path . trim($this->filename), 'r')) { // restore error handling --- 245,249 ---- if (!$create_command) { ! if (!$this->pread_file = fopen ( $phpbb_root_path . $this->path . trim($this->filename), 'rb')) { // restore error handling *************** *** 280,284 **** // open the file on the server ! if ( $this->pfile = fopen( $install_path . $process . $this->path . trim($this->filename) . $ext, 'w')) { // restore error handling --- 280,284 ---- // open the file on the server ! if ( $this->pfile = fopen( $install_path . $process . $this->path . trim($this->filename) . $ext, 'wb')) { // restore error handling Index: em_ftp.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_ftp.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** em_ftp.php 10 Nov 2005 01:57:43 -0000 1.15 --- em_ftp.php 8 Jun 2006 04:08:07 -0000 1.16 *************** *** 307,311 **** $tmpfname = @tempnam($phpbb_root_path . 'admin/em_includes/cache', 'txt'); @unlink($tmpfname); // unlink for safety on php4.0.3+ ! if( $fp = @fopen($tmpfname, 'w') ) { @fwrite($fp, ">>$easymod_install_version<<\n"); --- 307,311 ---- $tmpfname = @tempnam($phpbb_root_path . 'admin/em_includes/cache', 'txt'); @unlink($tmpfname); // unlink for safety on php4.0.3+ ! if( $fp = @fopen($tmpfname, 'wb') ) { @fwrite($fp, ">>$easymod_install_version<<\n"); *************** *** 1157,1161 **** @unlink($tmpfname); // unlink for safety on php4.0.3+ ! $fp = @fopen($tmpfname, 'w'); for ($i=0; $i<count($array_lines); $i++) { --- 1157,1161 ---- @unlink($tmpfname); // unlink for safety on php4.0.3+ ! $fp = @fopen($tmpfname, 'wb'); for ($i=0; $i<count($array_lines); $i++) { |
From: Eric F. <wg...@us...> - 2006-02-07 02:28:56
|
Update of /cvsroot/easymod/easymod/install/em_files/includes/em In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21538/includes/em Modified Files: em_parser_xml.php Log Message: Fixing a bug with XML parser and newlines Index: em_parser_xml.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_parser_xml.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** em_parser_xml.php 9 Jan 2006 00:38:39 -0000 1.4 --- em_parser_xml.php 7 Feb 2006 02:28:46 -0000 1.5 *************** *** 98,111 **** function _tag_data($parser, $tag_data) { ! if(trim($tag_data)) { ! if(isset($this->data[count($this->data)-1]['data'])) ! { ! $this->data[count($this->data)-1]['data'] .= unhtmlspecialchars($tag_data); ! } ! else ! { ! $this->data[count($this->data)-1]['data'] = unhtmlspecialchars($tag_data); ! } } } --- 98,108 ---- function _tag_data($parser, $tag_data) { ! if(isset($this->data[count($this->data)-1]['data'])) { ! $this->data[count($this->data)-1]['data'] .= unhtmlspecialchars($tag_data); ! } ! else ! { ! $this->data[count($this->data)-1]['data'] = unhtmlspecialchars($tag_data); } } |
From: Eric F. <wg...@us...> - 2006-01-20 22:50:44
|
Update of /cvsroot/easymod/easymod/install/em_files/includes/em In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24178/em_files/includes/em Modified Files: em_parser_text.php Log Message: better handling of history in text parser Index: em_parser_text.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_parser_text.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** em_parser_text.php 15 Jan 2006 05:29:59 -0000 1.7 --- em_parser_text.php 20 Jan 2006 22:50:36 -0000 1.8 *************** *** 194,207 **** { $line2 = trim(htmlspecialchars(substr($this->mod_contents[$i], strpos($this->mod_contents[$i], '##')+2))); ! $date = explode('-', $line2); if ( sizeof($date) > 3 ) { $j++; ! $this->header['history'][$j]['date'] = trim($date[0]) . '-' . trim($date[1]) . '-' . trim($date[2]); ! $this->header['history'][$j]['version'] = trim($date[3]); } else if ( !empty($line2) ) { ! $this->header['history'][$j]['change'][] = trim($date[1]); } $i++; --- 194,210 ---- { $line2 = trim(htmlspecialchars(substr($this->mod_contents[$i], strpos($this->mod_contents[$i], '##')+2))); ! preg_match('#([0-9]{4})-([0-9]{2})-([0-9]{2})\s-\s[a-z]*\s([0-9a-z.]*)#i', $line2, $date); if ( sizeof($date) > 3 ) { $j++; ! ! $temp = explode('.', $date[4]); ! $this->header['history'][$j]['date'] = trim($date[1]) . '-' . trim($date[2]) . '-' . trim($date[3]); ! $this->header['history'][$j]['version'] = (int) $temp[0] . '.' . (int) $temp[1] . '.' . $temp[2]; ! unset($temp); } else if ( !empty($line2) ) { ! $this->header['history'][$j]['change'][] = substr(trim($line2), 2); } $i++; |
From: Eric F. <wg...@us...> - 2006-01-15 05:30:11
|
Update of /cvsroot/easymod/easymod/install/em_files/includes/em In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24170/em_files/includes/em Modified Files: em_actions.php em_parser_text.php Log Message: - Fixed bug 1403875, Actions can now have as unlimited whitespace before and after the code. Whitespace is trimmed off of FINDs - Fixed a bug that I added in my last commit. I think I hit a wrong key combination. Index: em_actions.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_actions.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** em_actions.php 15 Jan 2006 04:56:32 -0000 1.4 --- em_actions.php 15 Jan 2006 05:29:59 -0000 1.5 *************** *** 92,96 **** $this->filename = $filename; $this->contents = open_file($this->filename); ! $this->contents = preg_split("/(\r|\n|)/", $this->contents, -1, PREG_SPLIT_DELIM_CAPTURE); $this->size_contents = count($this->contents); $this->start = $this->end = 0; --- 92,96 ---- $this->filename = $filename; $this->contents = open_file($this->filename); ! $this->contents = preg_split("/(\r|\n|\r\n)/", $this->contents, -1, PREG_SPLIT_DELIM_CAPTURE); $this->size_contents = count($this->contents); $this->start = $this->end = 0; *************** *** 201,205 **** foreach ($lines as $line) { ! // linux uses "\n", apples use "\r", and windows uses "" to represent new lines. of these, only "" // will be interpreted as a new line character on all systems. phpBB uses "\n" for line endings (linux) so // EasyMOD will also use that. --- 201,205 ---- foreach ($lines as $line) { ! // linux uses "\n", apples use "\r", and windows uses "\r\n" to represent new lines. of these, only "" // will be interpreted as a new line character on all systems. phpBB uses "\n" for line endings (linux) so // EasyMOD will also use that. Index: em_parser_text.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_parser_text.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** em_parser_text.php 15 Jan 2006 04:56:32 -0000 1.6 --- em_parser_text.php 15 Jan 2006 05:29:59 -0000 1.7 *************** *** 139,143 **** // Split file contents into an array of lines (dealing with LF, CRLF and CR). ! $this->mod_contents = preg_split("/\r?\n|\r/", $this->mod_contents); $this->mod_lines = count($this->mod_contents); $this->mod_loaded = true; --- 139,143 ---- // Split file contents into an array of lines (dealing with LF, CRLF and CR). ! $this->mod_contents = preg_split("/\r?\n|\r/", trim($this->mod_contents)); $this->mod_lines = count($this->mod_contents); $this->mod_loaded = true; *************** *** 247,252 **** $line = trim($this->mod_contents[$i]); ! // Empty lines and lines starting with 3 consecutive hashes (ignoring leading whitespaces) are ignored. ! if( !empty($line) && !preg_match('@^#{3}@', $line) ) { // How do we know whether it's a MOD Action command? --- 247,252 ---- $line = trim($this->mod_contents[$i]); ! // lines starting with 3 consecutive hashes (ignoring leading whitespaces) are ignored. ! if( !preg_match('@^#{3}@', $line) ) { // How do we know whether it's a MOD Action command? *************** *** 259,271 **** { $current_action = $match[1]; - /*should we say they are invalid here or put them in the unproccess actions section? - if( !isset($this->valid_actions[$current_action]) ) - { - // @TODO: An error triggered here would say something like "Invalid MOD action" - return false; - }*/ $current_line = $i + 1; } ! elseif( $line{0} != '#' ) { if( !isset($current_action) ) --- 259,265 ---- { $current_action = $match[1]; $current_line = $i + 1; } ! elseif( !empty($current_action) && $line{0} != '#' ) { if( !isset($current_action) ) *************** *** 295,298 **** --- 289,293 ---- } } + if( !isset($current_action) || $this->valid_actions[$current_action] != 'save-close-files' ) { *************** *** 310,314 **** $edit_number = -1; $inline_edit_number = -1; ! vd($mod_actions); $mod_actions_count = count($mod_actions); for( $i = 0; $i < $mod_actions_count; $i++ ) --- 305,309 ---- $edit_number = -1; $inline_edit_number = -1; ! $mod_actions_count = count($mod_actions); for( $i = 0; $i < $mod_actions_count; $i++ ) *************** *** 363,374 **** return false; } $inline_edit_number = -1; $edit_number++; ! $find = array(); ! for( $j = 0; $j < count($mod_actions[$i]['lines']); $j++ ) ! { ! $find[] = $mod_actions[$i]['lines'][$j]; ! } ! $this->actions['open'][$current_file]['edit'][$edit_number]['find'] = implode("\n", $find); unset($j, $find); } --- 358,365 ---- return false; } + $inline_edit_number = -1; $edit_number++; ! $this->actions['open'][$current_file]['edit'][$edit_number]['find'] = trim(implode("\n", $mod_actions[$i]['lines'])); unset($j, $find); } *************** *** 380,392 **** return false; } ! $code = array(); ! for( $j = 0; $j < count($mod_actions[$i]['lines']); $j++ ) ! { ! $code[] = $mod_actions[$i]['lines'][$j]; ! } $this->actions['open'][$current_file]['edit'][$edit_number]['action'][] = array( 'line' => $current_mod_line, 'type' => $current_action, ! 'code' => implode("\n", $code) ); unset($j, $code); --- 371,379 ---- return false; } ! $this->actions['open'][$current_file]['edit'][$edit_number]['action'][] = array( 'line' => $current_mod_line, 'type' => $current_action, ! 'code' => implode("\n", $mod_actions[$i]['lines']) ); unset($j, $code); *************** *** 463,472 **** else { ! $code = array(); ! for( $j = 0; $j < count($mod_actions[$i]['lines']); $j++ ) ! { ! $code[] = trim($mod_actions[$i]['lines'][$j]); ! } ! $this->actions[$current_action][] = implode("\n", $code); unset($j, $code); } --- 450,454 ---- else { ! $this->actions[$current_action][] = implode("\n", $mod_actions[$i]['lines']); unset($j, $code); } |
From: Eric F. <wg...@us...> - 2006-01-15 04:56:44
|
Update of /cvsroot/easymod/easymod/install/em_files/includes/em In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18623/em_files/includes/em Modified Files: em_actions.php em_parser_text.php Log Message: bug 1403872, changed line endings to \n because that is what the phpBB files use. Index: em_actions.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_actions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** em_actions.php 25 Dec 2005 20:48:38 -0000 1.3 --- em_actions.php 15 Jan 2006 04:56:32 -0000 1.4 *************** *** 92,96 **** $this->filename = $filename; $this->contents = open_file($this->filename); ! $this->contents = preg_split("/(\r|\n|\r\n)/", $this->contents, -1, PREG_SPLIT_DELIM_CAPTURE); $this->size_contents = count($this->contents); $this->start = $this->end = 0; --- 92,96 ---- $this->filename = $filename; $this->contents = open_file($this->filename); ! $this->contents = preg_split("/(\r|\n|)/", $this->contents, -1, PREG_SPLIT_DELIM_CAPTURE); $this->size_contents = count($this->contents); $this->start = $this->end = 0; *************** *** 121,127 **** $size_find = 0; - // remove empty lines from $lines $temp = array(); - foreach ($lines as $current_line) { --- 121,125 ---- *************** *** 198,212 **** if ( !is_array($lines) ) { ! $lines = explode("\n", $lines); } foreach ($lines as $line) { ! // linux uses "\n", apples use "\r", and windows uses "\r\n" to represent new lines. of these, only "\r\n" ! // will be interpreted as a new line character on all systems. granted, each new line will be preceeded or ! // followed by an odd character, but chances are good that that character won't even be shown by the ! // editor. $this->target_contents[] = $line; ! $this->target_contents[] = "\r\n"; } --- 196,209 ---- if ( !is_array($lines) ) { ! $lines = explode("\n", str_replace("\r", '', $lines)); } foreach ($lines as $line) { ! // linux uses "\n", apples use "\r", and windows uses "" to represent new lines. of these, only "" ! // will be interpreted as a new line character on all systems. phpBB uses "\n" for line endings (linux) so ! // EasyMOD will also use that. $this->target_contents[] = $line; ! $this->target_contents[] = "\n"; } *************** *** 218,222 **** if ( !is_array($lines) ) { ! $lines = explode("\n", $lines); } --- 215,219 ---- if ( !is_array($lines) ) { ! $lines = explode("\n", str_replace("\r", '', $lines)); } *************** *** 226,230 **** { $this->target_contents[] = $line; ! $this->target_contents[] = "\r\n"; } foreach ($temp as $line) --- 223,227 ---- { $this->target_contents[] = $line; ! $this->target_contents[] = "\n"; } foreach ($temp as $line) *************** *** 240,244 **** if ( !is_array($lines) ) { ! $lines = explode("\n", $lines); } --- 237,241 ---- if ( !is_array($lines) ) { ! $lines = explode("\n", str_replace("\r", '', $lines)); } *************** *** 247,251 **** { $this->target_contents[] = $line; ! $this->target_contents[] = "\r\n"; } --- 244,248 ---- { $this->target_contents[] = $line; ! $this->target_contents[] = "\n"; } Index: em_parser_text.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_parser_text.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** em_parser_text.php 25 Dec 2005 20:48:38 -0000 1.5 --- em_parser_text.php 15 Jan 2006 04:56:32 -0000 1.6 *************** *** 310,314 **** $edit_number = -1; $inline_edit_number = -1; ! $mod_actions_count = count($mod_actions); for( $i = 0; $i < $mod_actions_count; $i++ ) --- 310,314 ---- $edit_number = -1; $inline_edit_number = -1; ! vd($mod_actions); $mod_actions_count = count($mod_actions); for( $i = 0; $i < $mod_actions_count; $i++ ) |
From: Eric F. <wg...@us...> - 2006-01-09 00:38:49
|
Update of /cvsroot/easymod/easymod/install/em_files/includes/em In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13373/em_files/includes/em Modified Files: em_common.php em_functions.php em_parser_xml.php Log Message: - XML parsers history now - probably some other changes in there, its been a while I can't remember what all I have done Index: em_common.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_common.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** em_common.php 24 Dec 2005 01:43:42 -0000 1.2 --- em_common.php 9 Jan 2006 00:38:39 -0000 1.3 *************** *** 79,81 **** --- 79,84 ---- } + $unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#'); + $unhtml_specialchars_replace = array('>', '<', '"', '&'); + ?> \ No newline at end of file Index: em_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_functions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** em_functions.php 24 Dec 2005 01:43:42 -0000 1.3 --- em_functions.php 9 Jan 2006 00:38:39 -0000 1.4 *************** *** 22,26 **** /** ! * Opens a file */ function open_file($file) --- 22,45 ---- /** ! * Reverseres htmlspecialchars ! * ! * @see http://www.php.net/htmlspecialchars ! * @access public ! * @param $string string The string to reverse the changes on ! * @return string The string with htmlspecialchars reversed ! */ ! function unhtmlspecialchars($string) ! { ! global $unhtml_specialchars_match, $unhtml_specialchars_replace; ! ! return preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, $string); ! } ! ! /** ! * Opens a file. ! * ! * @access public ! * @param $file string File to open. ! * @return string Contents of the file. */ function open_file($file) *************** *** 53,57 **** /** ! * Get all extensions and return a list of corresponding parsers to use */ function load_parsers($force_update = false) --- 72,80 ---- /** ! * Loads the avaliable Template parsers. ! * ! * @access public ! * @param $force_update bool Update the cache. ! * @return array List of extensions and the corresponding parsers to use. */ function load_parsers($force_update = false) *************** *** 59,65 **** global $board_config, $db, $phpbb_root_path, $phpEx; ! if ( !$force_update && !empty($board_config['em_extensions']) ) { ! return unserialize($board_config['em_extensions']); } --- 82,88 ---- global $board_config, $db, $phpbb_root_path, $phpEx; ! if ( !$force_update && !empty($board_config['em_extensions_cache']) ) { ! return unserialize($board_config['em_extensions_cache']); } *************** *** 80,87 **** $sql = 'UPDATE ' . CONFIG_TABLE . " SET config_value = '$serialized_array' ! WHERE config_name = 'em_extensions'"; if ( !$db->sql_query($sql) ) { ! em_trigger_error(EM_ERR_CRITICAL,'err_update_ext', array($sql, __LINE__, __FILE__)); } --- 103,110 ---- $sql = 'UPDATE ' . CONFIG_TABLE . " SET config_value = '$serialized_array' ! WHERE config_name = 'em_extensions_cache'"; if ( !$db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not update extension cache', '', __LINE__, __FILE__, $sql); } *************** *** 90,99 **** /** ! * load the avaliable methods */ ! function load_methods($path = '') { ! global $phpbb_root_path, $phpEx; $methods = array(); $set_methods = true; --- 113,131 ---- /** ! * Loads the avaliable move/write methods. ! * ! * @access public ! * @param $force_update bool Update the cache. ! * @return array List of the avaliable methods. */ ! function load_methods($path = '', $force_update = false) { ! global $board_config, $db, $phpbb_root_path, $phpEx; + if ( !$force_update && !empty($board_config['em_methods_cache']) ) + { + return unserialize($board_config['em_methods_cache']); + } + $methods = array(); $set_methods = true; *************** *** 115,123 **** @closedir($dir); return $methods; } /** ! * Load an return the correct parser object */ function &new_parser($file) --- 147,168 ---- @closedir($dir); + $serialized_array = serialize($methods); + $sql = 'UPDATE ' . CONFIG_TABLE . " SET + config_value = '$serialized_array' + WHERE config_name = 'em_methods_cache'"; + if ( !$db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, 'Could not update method cache', '', __LINE__, __FILE__, $sql); + } + return $methods; } /** ! * Load/Create a Template parser. ! * ! * @access public ! * @param $file string The MOD file that the parser will parse. ! * @return object The parser object. */ function &new_parser($file) *************** *** 137,141 **** /** ! * Load an return the correct IO method object */ function new_io($init = true) --- 182,190 ---- /** ! * Load/Create a move/write method. ! * ! * @access public ! * @param $init bool Initializes the method. ! * @return object The method's object. */ function new_io($init = true) *************** *** 149,153 **** if ( $result !== true ) { ! em_trigger_error(EM_ERR_CRITICAL,$result); } } --- 198,202 ---- if ( $result !== true ) { ! em_trigger_error(EM_ERR_CRITICAL, $result); } } *************** *** 156,160 **** /** ! * Chop a string into the specified letter count */ function str_cut($string, $cutoff) --- 205,214 ---- /** ! * Chop a string into the specified letter count. ! * ! * @access public ! * @param $string string The string to chop. ! * @param $cutoff integer How many characters long to make the string. ! * @return string The string cut with '...' on the end. */ function str_cut($string, $cutoff) *************** *** 232,237 **** /** ! * Returns true or false, on wether a MOD needs a style update ! * Pass the serialiaze array of MOD styles (as a reference) */ function styles_outdated(&$mod_styles) --- 286,294 ---- /** ! * Tells whether a MOD needs a style update. ! * ! * @access public ! * @param $mod_styles string A serialized array of the style ids a MOD was installed on. ! * @return bool true if the style needs updates, false if it doesn't. */ function styles_outdated(&$mod_styles) *************** *** 282,286 **** /** ! * Scans a folder and returns an array of ALL (including sub folders) MODs within */ function mod_scan($dirname, &$installed_mods) --- 339,348 ---- /** ! * Gets MODs that need to be installed. ! * ! * @access public ! * @param $dirname string The directory where MODs are going to be looked for. It will look three levels deep in the directory for MODs to install. ! * @param $installed_mods array The MOD files that have already been installed. ! * @return array A list of MODs that haven't been installed but have install files. */ function mod_scan($dirname, &$installed_mods) *************** *** 421,426 **** ! /* ! * Displays EasyMOD errors */ function em_trigger_error($err_type, $msg_text) --- 483,498 ---- ! /** ! * Displays errors in EasyMOD ! * ! * @access public ! * @param $err_type integer The type of error. Can be EM_ERR_INSTALL, EM_ERR_WARNING, or EM_ERR_CRITICAL. ! * @param $msg_txt string The error message. Can be the full error message or the key to be used in the $lang array. ! * ! * If there are more than three arguments, then the extra arguments are formatted in $msg_text using sprintf ! * @see http://www.php.net/sprintf ! * ! * If the error type isn't EM_ERR_INSTALL, then the first argument after $msg_text is displayed as code (in >pre< tags). ! * The rest of the arguments are formatted, as above, in sprintf. */ function em_trigger_error($err_type, $msg_text) Index: em_parser_xml.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_parser_xml.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** em_parser_xml.php 22 Dec 2005 00:33:31 -0000 1.3 --- em_parser_xml.php 9 Jan 2006 00:38:39 -0000 1.4 *************** *** 102,110 **** if(isset($this->data[count($this->data)-1]['data'])) { ! $this->data[count($this->data)-1]['data'] .= $tag_data; } else { ! $this->data[count($this->data)-1]['data'] = $tag_data; } } --- 102,110 ---- if(isset($this->data[count($this->data)-1]['data'])) { ! $this->data[count($this->data)-1]['data'] .= unhtmlspecialchars($tag_data); } else { ! $this->data[count($this->data)-1]['data'] = unhtmlspecialchars($tag_data); } } *************** *** 150,153 **** --- 150,174 ---- } + // history + $history_info = $header_info['HISTORY'][0]['children']['ENTRY']; + for($i = 0, $total = sizeof($history_info); $i < $total; $i++) + { + $changes = array(); + $entry = $history_info[$i]['children']; + $changelog = $entry['CHANGELOG'][0]['children']['CHANGE']; + $version = $entry['REV-VERSION'][0]['children']; + + for($j = 0, $change_total = sizeof($changelog); $j < $change_total; $j++) + { + $changes[] = $changelog[$j]['data']; + } + + $this->header['history'][] = array( + 'date' => $entry['DATE'][0]['data'], + 'version' => intval($version['MAJOR'][0]['data']) . '.' . intval($version['MINOR'][0]['data']) . '.' . intval($version['REVISION'][0]['data']) . $version['RELEASE'][0]['data'], + 'changes' => $changes, + ); + } + return $this->header; } |
From: Eric F. <wg...@us...> - 2006-01-09 00:38:48
|
Update of /cvsroot/easymod/easymod/install/schemas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13373/schemas Modified Files: easymod_mysql.sql Log Message: - XML parsers history now - probably some other changes in there, its been a while I can't remember what all I have done Index: easymod_mysql.sql =================================================================== RCS file: /cvsroot/easymod/easymod/install/schemas/easymod_mysql.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** easymod_mysql.sql 24 Dec 2005 03:35:59 -0000 1.3 --- easymod_mysql.sql 9 Jan 2006 00:38:39 -0000 1.4 *************** *** 4,12 **** ALTER TABLE `phpbb_sessions` ADD `session_em` TINYINT(1) DEFAULT '0' NOT NULL; - INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('em_extensions', ''); - INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('em_mod_dir', 'mods/'); - INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('em_url', 'http://area51.phpbb.com'); - - CREATE TABLE `phpbb_em_mods` ( `mod_id` mediumint(8) NOT NULL auto_increment, --- 4,7 ---- |
From: Eric F. <wg...@us...> - 2006-01-09 00:38:47
|
Update of /cvsroot/easymod/easymod/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13373 Modified Files: em_install.php Log Message: - XML parsers history now - probably some other changes in there, its been a while I can't remember what all I have done Index: em_install.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_install.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** em_install.php 25 Dec 2005 20:48:37 -0000 1.5 --- em_install.php 9 Jan 2006 00:38:38 -0000 1.6 *************** *** 104,107 **** --- 104,108 ---- $password_confirm = request_var('password_confirm', ''); $sel_method = request_var('method', ( !empty($board_config['em_method']) ) ? $board_config['em_method'] : ''); + $mod_dir = str_replace('\\', '/', request_var('mod_dir', 'mods')); $board_config['em_tmp_path'] = $tmp_path = request_var('tmp_path', ''); $board_config['em_ftp_host'] = $ftp_host = request_var('ftp_host', 'localhost'); *************** *** 112,115 **** --- 113,119 ---- $board_config['em_ftp_root_path'] = $ftp_root_path = request_var('ftp_root_path', implode('/', array_slice(explode('/', $HTTP_SERVER_VARS['SCRIPT_FILENAME']), 0, -2))); + $mod_dir = ( $mod_dir{0} == '/' ) ? substr($mod_dir, 1) : $mod_dir; + $mod_dir = ( substr($mod_dir, -1, 1) == '/' ) ? substr($mod_dir, 0, -1) : $mod_dir; + if ( $step == 2 ) { *************** *** 129,140 **** if ( $step != 5 ) { ! $hidden_fields .= '<input type="hidden" name="method" value="' . $sel_method . '" />'; ! $hidden_fields .= '<input type="hidden" name="tmp_path" value="' . $tmp_path . '" />'; ! $hidden_fields .= '<input type="hidden" name="ftp_host" value="' . $ftp_host . '" />'; ! $hidden_fields .= '<input type="hidden" name="ftp_port" value="' . $ftp_port . '" />'; ! $hidden_fields .= '<input type="hidden" name="ftp_timeout" value="' . $ftp_timeout . '" />'; ! $hidden_fields .= '<input type="hidden" name="ftp_username" value="' . $ftp_username . '" />'; ! $hidden_fields .= '<input type="hidden" name="ftp_password" value="' . $ftp_password . '" />'; ! $hidden_fields .= '<input type="hidden" name="ftp_root_path" value="' . $ftp_root_path . '" />'; } --- 133,147 ---- if ( $step != 5 ) { ! $hidden_fields .= build_hidden_fields(array( ! 'mod_dir' => $mod_dir, ! 'method' => $sel_method, ! 'tmp_path' => $tmp_path, ! 'ftp_host' => $ftp_host, ! 'ftp_port' => $ftp_port, ! 'ftp_timeout' => $ftp_timeout, ! 'ftp_username' => $ftp_username, ! 'ftp_password' => $ftp_password, ! 'ftp_root_path' => $ftp_root_path) ! ); } *************** *** 352,358 **** --- 359,369 ---- $sql = array(); + $sql[] = build_config_query('em_support_url', 'http://area51.phpbb.com'); + $sql[] = build_config_query('em_mod_dir', (string) $mod_dir); $sql[] = build_config_query('em_version', EM_INSTALL_VERSION); $sql[] = build_config_query('em_pass', (string) $password); $sql[] = build_config_query('em_method', (string) $sel_method); + $sql[] = build_config_query('em_extensions_cache', ''); + $sql[] = build_config_query('em_methods_cache', ''); $sql[] = build_config_query('em_tmp_path', (string) $tmp_path); $sql[] = build_config_query('em_ftp_host', (string) $ftp_host); *************** *** 360,366 **** $sql[] = build_config_query('em_ftp_timeout', (int) $ftp_timeout); $sql[] = build_config_query('em_ftp_username', (string) $ftp_username); - /** - * @TODO encrypt the ftp password somehow, blowfish? - */ $sql[] = build_config_query('em_ftp_password', (string) $ftp_password); $sql[] = build_config_query('em_ftp_root_path', (string) $ftp_root_path); --- 371,374 ---- *************** *** 570,573 **** --- 578,585 ---- </tr> <tr> + <td class="row1"><span class="gen">MOD Directory</span></td> + <td class="row1"><span class="gen"><input type="text" name="mod_dir" value="<?php echo $mod_dir; ?>" class="post" /></td> + </tr> + <tr> <td class="row1"><span class="gen">Temporary Path</span></td> <td class="row1"><span class="gen"><input type="text" name="tmp_path" value="/tmp" class="post" /> <a href="javascript:help_popup('tmp_path');">Help</a></span></td> *************** *** 766,770 **** // load the methods and the debug information $method_files = array(); ! $methods = load_methods('install/em_files/'); for($i = 0, $total = sizeof($methods); $i < $total; $i++) { --- 778,782 ---- // load the methods and the debug information $method_files = array(); ! $methods = load_methods('install/em_files/', true); for($i = 0, $total = sizeof($methods); $i < $total; $i++) { |
From: Markus P. <mar...@us...> - 2006-01-06 00:14:18
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13188 Modified Files: admin_easymod.php.txt Log Message: Fixed display of SQL Parser warnings. It's curious that no one reported this one. Is it that people write 99% correct SQL statements? The warnings block was repeat for each message. Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** admin_easymod.php.txt 5 Jan 2006 15:51:56 -0000 1.45 --- admin_easymod.php.txt 6 Jan 2006 00:14:05 -0000 1.46 *************** *** 3067,3080 **** { // Display warnings generated by the SQL Parser, if any ! for( $i = 0; $i < count($sql_warnings); $i++ ) { - $sql_warnings_count = count($sql_warnings); $template->assign_block_vars('warnings_block', array( ! 'TITLE' => sprintf($lang['EM_sql_warnings_reported'], $sql_warnings_count) )); ! for( $j = 0; $j < $sql_warnings_count; $j++ ) { $template->assign_block_vars('warnings_block.line', array( ! 'TEXT' => $sql_warnings[$j]['message'] )); } --- 3067,3080 ---- { // Display warnings generated by the SQL Parser, if any ! $sql_warnings_count = count($sql_warnings); ! if ($sql_warnings_count > 0) { $template->assign_block_vars('warnings_block', array( ! 'TITLE' => sprintf($lang['EM_sql_warnings_reported'], $sql_warnings_count) )); ! for( $i = 0; $i < $sql_warnings_count; $i++ ) { $template->assign_block_vars('warnings_block.line', array( ! 'TEXT' => $sql_warnings[$i]['message'] )); } |
From: Markus P. <mar...@us...> - 2006-01-05 15:52:11
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16726 Modified Files: admin_easymod.php.txt Log Message: Fix double htmlspecialchars applied to SQL statements. Bug reported by -=ET=- (merci ;-) http://area51.phpbb.com/phpBB/viewtopic.php?sid=&f=43&t=21660 http://sourceforge.net/tracker/index.php?func=detail&aid=1396713&group_id=136984&atid=737391 Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** admin_easymod.php.txt 8 Nov 2005 16:52:41 -0000 1.44 --- admin_easymod.php.txt 5 Jan 2006 15:51:56 -0000 1.45 *************** *** 3100,3104 **** { $formatted_sql[$i] = htmlspecialchars($formatted_sql[$i]) . ';'; ! $hidden_sql = '<input type="hidden" name="SQL' . $steps . '" value="' . htmlspecialchars($formatted_sql[$i]) . '" />'; $check = '<input type="checkbox" name="check_SQL' . $steps . '" checked="checked" />'; $steps++; --- 3100,3104 ---- { $formatted_sql[$i] = htmlspecialchars($formatted_sql[$i]) . ';'; ! $hidden_sql = '<input type="hidden" name="SQL' . $steps . '" value="' . $formatted_sql[$i] . '" />'; $check = '<input type="checkbox" name="check_SQL' . $steps . '" checked="checked" />'; $steps++; |
From: Eric F. <wg...@us...> - 2005-12-25 20:48:47
|
Update of /cvsroot/easymod/easymod/install/em_files/includes/em In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18079/em_files/includes/em Modified Files: em_actions.php em_parser_text.php Log Message: /me is a n00b Index: em_actions.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_actions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** em_actions.php 24 Dec 2005 05:28:21 -0000 1.2 --- em_actions.php 25 Dec 2005 20:48:38 -0000 1.3 *************** *** 1,10 **** <?php ! /** * * @package EasyMOD * @version $Id$ ! * @copyright (c) 2005 phpBB Group ! * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ --- 1,10 ---- <?php ! /** * * @package EasyMOD * @version $Id$ ! * @copyright (c) 2005 phpBB Group ! * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ *************** *** 29,33 **** var $user_search; var $io; ! function actions($mod_io) { --- 29,33 ---- var $user_search; var $io; ! function actions($mod_io) { *************** *** 38,45 **** { global $mod_dir; ! $files = array(); $filename = basename($from_file); ! if ( strstr($filename, '*') ) { --- 38,45 ---- { global $mod_dir; ! $files = array(); $filename = basename($from_file); ! if ( strstr($filename, '*') ) { *************** *** 58,62 **** $directory .= '/'; } ! if ( $filename == '*.*' || $filename == '*' ) { --- 58,62 ---- $directory .= '/'; } ! if ( $filename == '*.*' || $filename == '*' ) { *************** *** 67,72 **** $max_levels = 1; } ! ! $pattern = str_replace('\*', '.*', preg_quote($filename)); $files_temp = em_find_files($directory, $pattern, $max_levels); for( $i = 0, $total = sizeof($files_temp); $i < $total; $i++ ) --- 67,72 ---- $max_levels = 1; } ! ! $pattern = str_replace('\*', '.*', preg_quote($filename)); $files_temp = em_find_files($directory, $pattern, $max_levels); for( $i = 0, $total = sizeof($files_temp); $i < $total; $i++ ) *************** *** 79,93 **** // normal copy, nothing special about it else ! { $files[] = array( 'to' => $to_file, 'from' => $from_file); } ! return $files; } function open($filename) ! { $this->filename = $filename; $this->contents = open_file($this->filename); --- 79,93 ---- // normal copy, nothing special about it else ! { $files[] = array( 'to' => $to_file, 'from' => $from_file); } ! return $files; } function open($filename) ! { $this->filename = $filename; $this->contents = open_file($this->filename); *************** *** 98,109 **** $this->target_contents = array(); $this->inline_target_contents = ''; ! return ( empty($this->contents) ) ? false : true; } function close() ! { global ${$this->io}; ! $this->commit_block_changes(); ${$this->io}->write_file($this->filename,implode('',$this->contents)); --- 98,109 ---- $this->target_contents = array(); $this->inline_target_contents = ''; ! return ( empty($this->contents) ) ? false : true; } function close() ! { global ${$this->io}; ! $this->commit_block_changes(); ${$this->io}->write_file($this->filename,implode('',$this->contents)); *************** *** 116,120 **** $lines = explode("\n", $lines); } ! $this->commit_block_changes(); --- 116,120 ---- $lines = explode("\n", $lines); } ! $this->commit_block_changes(); *************** *** 141,145 **** { $desired_line = trim($lines[($line_inum - $line_num) / 2]); ! $current_line = trim($this->contents[$line_inum]); // if the desired line is blank, skip it --- 141,145 ---- { $desired_line = trim($lines[($line_inum - $line_num) / 2]); ! $current_line = trim($this->contents[$line_inum]); // if the desired line is blank, skip it *************** *** 200,204 **** $lines = explode("\n", $lines); } ! foreach ($lines as $line) { --- 200,204 ---- $lines = explode("\n", $lines); } ! foreach ($lines as $line) { *************** *** 210,214 **** $this->target_contents[] = "\r\n"; } ! return true; } --- 210,214 ---- $this->target_contents[] = "\r\n"; } ! return true; } *************** *** 220,224 **** $lines = explode("\n", $lines); } ! $temp = $this->target_contents; $this->target_contents = array(); --- 220,224 ---- $lines = explode("\n", $lines); } ! $temp = $this->target_contents; $this->target_contents = array(); *************** *** 232,236 **** $this->target_contents[] = $line; } ! return true; } --- 232,236 ---- $this->target_contents[] = $line; } ! return true; } *************** *** 242,246 **** $lines = explode("\n", $lines); } ! $this->target_contents = array(); foreach ($lines as $line) --- 242,246 ---- $lines = explode("\n", $lines); } ! $this->target_contents = array(); foreach ($lines as $line) *************** *** 249,253 **** $this->target_contents[] = "\r\n"; } ! return true; } --- 249,253 ---- $this->target_contents[] = "\r\n"; } ! return true; } Index: em_parser_text.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_parser_text.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** em_parser_text.php 24 Dec 2005 05:28:21 -0000 1.4 --- em_parser_text.php 25 Dec 2005 20:48:38 -0000 1.5 *************** *** 484,488 **** return false; } ! if (isset($this->valid_actions[trim(preg_replace('@##([a-z ]+):(.*)@i', '\\1', $this->mod_contents[1]))]) || isset($this->valid_actions[trim(preg_replace('@##([a-z ]+):(.*)@i', '\\1', $this->mod_contents[2]))])) { --- 484,488 ---- return false; } ! if (isset($this->valid_actions[trim(preg_replace('@##([a-z ]+):(.*)@i', '\\1', $this->mod_contents[1]))]) || isset($this->valid_actions[trim(preg_replace('@##([a-z ]+):(.*)@i', '\\1', $this->mod_contents[2]))])) { |
From: Eric F. <wg...@us...> - 2005-12-25 20:48:46
|
Update of /cvsroot/easymod/easymod/install/em_files/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18079/em_files/admin Modified Files: em_manage.php Log Message: /me is a n00b Index: em_manage.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/admin/em_manage.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** em_manage.php 24 Dec 2005 05:28:21 -0000 1.7 --- em_manage.php 25 Dec 2005 20:48:38 -0000 1.8 *************** *** 160,164 **** $err = true; em_trigger_error(EM_ERR_CRITICLAL, 'EM_Err_mkdir', $processed_dir . '/' . $file_dir); ! break; } --- 160,164 ---- $err = true; em_trigger_error(EM_ERR_CRITICLAL, 'EM_Err_mkdir', $processed_dir . '/' . $file_dir); ! break 3; } *************** *** 167,171 **** $err = true; em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_move', $target_file . ' -> ' . $edit_file); ! break; } --- 167,171 ---- $err = true; em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_move', $target_file . ' -> ' . $edit_file); ! break 3; } *************** *** 174,178 **** em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_open', $target_file); $err = true; ! break; } --- 174,178 ---- em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_open', $target_file); $err = true; ! break 3; } *************** *** 187,191 **** em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_find', $actions_data['find'], $target_file); $err = true; ! break; } display_mod_action('processed', 'find', $actions_data['find']); --- 187,191 ---- em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_find', $actions_data['find'], $target_file); $err = true; ! break 4; } display_mod_action('processed', 'find', $actions_data['find']); *************** *** 202,206 **** em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_' . $action_func, $action_data['code']); $err = true; ! break; } $block = 'processed'; --- 202,206 ---- em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_' . $action_func, $action_data['code']); $err = true; ! break 5; } $block = 'processed'; *************** *** 223,227 **** em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_inline_find', $actions_data['find'], $target_file); $err = true; ! break; } display_mod_action('processed', 'in-line-find', $inlines_data['in-line-find']); --- 223,227 ---- em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_inline_find', $actions_data['find'], $target_file); $err = true; ! break 5; } display_mod_action('processed', 'in-line-find', $inlines_data['in-line-find']); *************** *** 238,242 **** em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_' . $action_func, $action_data['code']); $err = true; ! break; } $block = 'processed'; --- 238,242 ---- em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_' . $action_func, $action_data['code']); $err = true; ! break 6; } $block = 'processed'; *************** *** 248,269 **** display_mod_action($block, $inline_data['type'], $inline_data['code']); } - - if ( $err == true ) - { - break; - } - } - - if ( $err === true ) - { - break; } } $modder->close(); - - if ( $err === true ) - { - break; - } } break; --- 248,254 ---- *************** *** 288,296 **** } } - - if ( $err === true ) - { - break; - } } --- 273,276 ---- *************** *** 611,623 **** em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_copy', $mod_dir . $copy_files[$k]['from']. ' -> ' . $copy_files[$k]['to']); $err = true; ! break; } $copy_actions[] = 'copy ' . $copy_files[$k]['from'] . ' to ' . $copy_files[$k]['to']; } - - if ( $err === true ) - { - break; - } } display_mod_action('processed', $action, implode("\n", $copy_actions)); --- 591,598 ---- em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_copy', $mod_dir . $copy_files[$k]['from']. ' -> ' . $copy_files[$k]['to']); $err = true; ! break 4; } $copy_actions[] = 'copy ' . $copy_files[$k]['from'] . ' to ' . $copy_files[$k]['to']; } } display_mod_action('processed', $action, implode("\n", $copy_actions)); *************** *** 631,635 **** em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_open', $target_file); $err = true; ! break; } display_mod_action('processed', $action, $target_file); --- 606,610 ---- em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_open', $target_file); $err = true; ! break 3; } display_mod_action('processed', $action, $target_file); *************** *** 644,648 **** em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_find', $actions_data['find'], $target_file); $err = true; ! break; } display_mod_action('processed', 'find', $actions_data['find']); --- 619,623 ---- em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_find', $actions_data['find'], $target_file); $err = true; ! break 4; } display_mod_action('processed', 'find', $actions_data['find']); *************** *** 673,677 **** em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_inline_find', $actions_data['find'], $target_file); $err = true; ! break; } display_mod_action('processed', 'in-line-find', $inlines_data['in-line-find']); --- 648,652 ---- em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_inline_find', $actions_data['find'], $target_file); $err = true; ! break 5; } display_mod_action('processed', 'in-line-find', $inlines_data['in-line-find']); *************** *** 692,705 **** } } - - if ( $err === true ) - { - break; - } - } - - if ( $err === true ) - { - break; } } --- 667,670 ---- *************** *** 725,733 **** } } - - if ( $err === true ) - { - break; - } } --- 690,693 ---- |
From: Eric F. <wg...@us...> - 2005-12-25 20:48:46
|
Update of /cvsroot/easymod/easymod/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18079 Modified Files: em_install.php Log Message: /me is a n00b Index: em_install.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_install.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** em_install.php 24 Dec 2005 01:43:42 -0000 1.4 --- em_install.php 25 Dec 2005 20:48:37 -0000 1.5 *************** *** 105,114 **** $sel_method = request_var('method', ( !empty($board_config['em_method']) ) ? $board_config['em_method'] : ''); $board_config['em_tmp_path'] = $tmp_path = request_var('tmp_path', ''); ! $board_config['em_ftp_host'] = $ftp_host = request_var('ftp_host', ''); $board_config['em_ftp_port'] = $ftp_port = request_var('ftp_port', 21); ! $board_config['em_ftp_timeout'] = $ftp_timeout = request_var('ftp_timeout', 10); $board_config['em_ftp_username'] = $ftp_username = request_var('ftp_username', ''); $board_config['em_ftp_password'] = $ftp_password = request_var('ftp_password', ''); ! $board_config['em_ftp_root_path'] = $ftp_root_path = request_var('ftp_root_path', ''); if ( $step == 2 ) --- 105,114 ---- $sel_method = request_var('method', ( !empty($board_config['em_method']) ) ? $board_config['em_method'] : ''); $board_config['em_tmp_path'] = $tmp_path = request_var('tmp_path', ''); ! $board_config['em_ftp_host'] = $ftp_host = request_var('ftp_host', 'localhost'); $board_config['em_ftp_port'] = $ftp_port = request_var('ftp_port', 21); ! $board_config['em_ftp_timeout'] = $ftp_timeout = request_var('ftp_timeout', 10); $board_config['em_ftp_username'] = $ftp_username = request_var('ftp_username', ''); $board_config['em_ftp_password'] = $ftp_password = request_var('ftp_password', ''); ! $board_config['em_ftp_root_path'] = $ftp_root_path = request_var('ftp_root_path', implode('/', array_slice(explode('/', $HTTP_SERVER_VARS['SCRIPT_FILENAME']), 0, -2))); if ( $step == 2 ) *************** *** 586,594 **** <tr> <td class="row1"><span class="gen">Host</span></td> ! <td class="row1"><span class="gen"><input type="text" name="ftp_host" class="post" /></span></td> </tr> <tr> <td class="row1"><span class="gen">Path to phpBB</span></td> ! <td class="row1"><span class="gen"><input type="text" name="ftp_root_path" class="post" /></span></td> </tr> <tr> --- 586,594 ---- <tr> <td class="row1"><span class="gen">Host</span></td> ! <td class="row1"><span class="gen"><input type="text" name="ftp_host" value="<?php echo $ftp_host; ?>" class="post" /></span></td> </tr> <tr> <td class="row1"><span class="gen">Path to phpBB</span></td> ! <td class="row1"><span class="gen"><input type="text" name="ftp_root_path" value="<?php echo $ftp_root_path; ?>" class="post" /></span></td> </tr> <tr> |
From: Eric F. <wg...@us...> - 2005-12-24 05:28:31
|
Update of /cvsroot/easymod/easymod/install/em_files/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25972/admin Modified Files: em_manage.php Log Message: Bug fixes Index: em_manage.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/admin/em_manage.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** em_manage.php 24 Dec 2005 01:43:42 -0000 1.6 --- em_manage.php 24 Dec 2005 05:28:21 -0000 1.7 *************** *** 926,930 **** $mod_info = array( ! 'mod_name' => htmlspecialchars($mod_row['mod_name']), 'mod_author' => array( 'username' => $mod_row['mod_author_username'], --- 926,930 ---- $mod_info = array( ! 'mod_name' => $mod_row['mod_name'], 'mod_author' => array( 'username' => $mod_row['mod_author_username'], *************** *** 932,936 **** 'realname' => $mod_row['mod_author_realname'], 'website' => $mod_row['mod_author_website']), ! 'mod_description' => htmlspecialchars($mod_row['mod_desc']), 'mod_version' => $mod_row['mod_version'], 'mod_file' => $mod_row['mod_file'], --- 932,936 ---- 'realname' => $mod_row['mod_author_realname'], 'website' => $mod_row['mod_author_website']), ! 'mod_description' => $mod_row['mod_desc'], 'mod_version' => $mod_row['mod_version'], 'mod_file' => $mod_row['mod_file'], *************** *** 942,946 **** { $mod_header = $mod_parser->parse_header(); ! $mod_info['author_notes'] = str_replace("\n", '<br />', htmlspecialchars($mod_header['author-notes'])); } } --- 942,946 ---- { $mod_header = $mod_parser->parse_header(); ! $mod_info['author_notes'] = str_replace("\n", '<br />', $mod_header['author-notes']); } } *************** *** 966,970 **** { $mod_info = array( ! 'mod_name' => htmlspecialchars($mod_header['name']), 'mod_author' => array( 'username' => $mod_header['author'][0]['username'], --- 966,970 ---- { $mod_info = array( ! 'mod_name' => $mod_header['name'], 'mod_author' => array( 'username' => $mod_header['author'][0]['username'], *************** *** 972,979 **** 'realname' => $mod_header['author'][0]['realname'], 'website' => $mod_header['author'][0]['website']), ! 'mod_description' => htmlspecialchars($mod_header['desc']), 'mod_version' => $mod_header['version'], 'mod_file' => basename($mod_file), ! 'author_notes' => str_replace("\n", '<br />', htmlspecialchars($mod_header['author-notes'])), ); } --- 972,979 ---- 'realname' => $mod_header['author'][0]['realname'], 'website' => $mod_header['author'][0]['website']), ! 'mod_description' => $mod_header['desc'], 'mod_version' => $mod_header['version'], 'mod_file' => basename($mod_file), ! 'author_notes' => str_replace("\n", '<br />', $mod_header['author-notes']), ); } |
From: Eric F. <wg...@us...> - 2005-12-24 05:28:31
|
Update of /cvsroot/easymod/easymod/install/em_files/includes/em In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25972/includes/em Modified Files: em_actions.php em_parser_text.php Log Message: Bug fixes Index: em_actions.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_actions.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_actions.php 4 Dec 2005 03:12:30 -0000 1.1 --- em_actions.php 24 Dec 2005 05:28:21 -0000 1.2 *************** *** 165,169 **** } // break out of this for loop if there isn't a match. ! $search_pattern = preg_replace('#\\\\\\{%\\\\\\:(\\d+)\\\\\\}#','(\\d+|\\{%\\:$1\\})', preg_quote($desired_line, '#')); if (!preg_match("#{$search_pattern}#", $current_line)) { --- 165,169 ---- } // break out of this for loop if there isn't a match. ! $search_pattern = preg_replace('#\\\\\\{%\\\\\\:(\\d+)\\\\\\}#','(\\d+|\\{%\\:$1\\})', preg_quote($desired_line, '#')); if (!preg_match("#{$search_pattern}#", $current_line)) { *************** *** 185,189 **** $this->start = $line_num; ! $this->end = $line_inum; for (;$line_num<$this->end;$line_num++) { --- 185,189 ---- $this->start = $line_num; ! $this->end = $line_inum-2; for (;$line_num<$this->end;$line_num++) { Index: em_parser_text.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_parser_text.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** em_parser_text.php 24 Dec 2005 01:43:42 -0000 1.3 --- em_parser_text.php 24 Dec 2005 05:28:21 -0000 1.4 *************** *** 338,342 **** { // @TODO need to make it so copy and to are translatable ! if( !preg_match('#^copy\s*(.+?)\s*to\s*(.*)$#i', $line, $match) ) { // @TODO: An error triggered here would say something like "Invalid syntax in COPY action" --- 338,342 ---- { // @TODO need to make it so copy and to are translatable ! if( !preg_match('#^copy\s*(\S*)\s*to\s*(.*)$#i', $line, $match) ) { // @TODO: An error triggered here would say something like "Invalid syntax in COPY action" *************** *** 344,349 **** } $this->actions['copy'][] = array( ! 'from' => str_replace('\\', '/', $match[1]), ! 'to' => str_replace('\\', '/', $match[2])); } } --- 344,349 ---- } $this->actions['copy'][] = array( ! 'from' => str_replace('\\', '/', trim($match[1])), ! 'to' => str_replace('\\', '/', trim($match[2]))); } } *************** *** 368,372 **** for( $j = 0; $j < count($mod_actions[$i]['lines']); $j++ ) { ! $find[] = trim($mod_actions[$i]['lines'][$j]); } $this->actions['open'][$current_file]['edit'][$edit_number]['find'] = implode("\n", $find); --- 368,372 ---- for( $j = 0; $j < count($mod_actions[$i]['lines']); $j++ ) { ! $find[] = $mod_actions[$i]['lines'][$j]; } $this->actions['open'][$current_file]['edit'][$edit_number]['find'] = implode("\n", $find); *************** *** 383,387 **** for( $j = 0; $j < count($mod_actions[$i]['lines']); $j++ ) { ! $code[] = trim($mod_actions[$i]['lines'][$j]); } $this->actions['open'][$current_file]['edit'][$edit_number]['action'][] = array( --- 383,387 ---- for( $j = 0; $j < count($mod_actions[$i]['lines']); $j++ ) { ! $code[] = $mod_actions[$i]['lines'][$j]; } $this->actions['open'][$current_file]['edit'][$edit_number]['action'][] = array( *************** *** 484,489 **** return false; } ! ! if( strpos($this->mod_contents[1], 'MOD Title') !== false ) { return true; --- 484,489 ---- return false; } ! ! if (isset($this->valid_actions[trim(preg_replace('@##([a-z ]+):(.*)@i', '\\1', $this->mod_contents[1]))]) || isset($this->valid_actions[trim(preg_replace('@##([a-z ]+):(.*)@i', '\\1', $this->mod_contents[2]))])) { return true; |
From: Eric F. <wg...@us...> - 2005-12-24 03:36:07
|
Update of /cvsroot/easymod/easymod/install/schemas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10831 Modified Files: easymod_mysql.sql Log Message: - added a missing comma, this file will probably be deleted for an alternate method. If upgrading, the tables will already be there so we can't create them again.] Index: easymod_mysql.sql =================================================================== RCS file: /cvsroot/easymod/easymod/install/schemas/easymod_mysql.sql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** easymod_mysql.sql 9 Dec 2005 23:22:37 -0000 1.2 --- easymod_mysql.sql 24 Dec 2005 03:35:59 -0000 1.3 *************** *** 4,13 **** ALTER TABLE `phpbb_sessions` ADD `session_em` TINYINT(1) DEFAULT '0' NOT NULL; ! INSERT INTO `phpbb_config` (`config_name`, `config_value`) ! VALUES ('em_extensions', ''); ! INSERT INTO `phpbb_config` (`config_name`, `config_value`) ! VALUES ('em_mod_dir', 'mods/'); ! INSERT INTO `phpbb_config` (`config_name`, `config_value`) ! VALUES ('em_url', 'http://area51.phpbb.com'); --- 4,10 ---- ALTER TABLE `phpbb_sessions` ADD `session_em` TINYINT(1) DEFAULT '0' NOT NULL; ! INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('em_extensions', ''); ! INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('em_mod_dir', 'mods/'); ! INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('em_url', 'http://area51.phpbb.com'); *************** *** 15,19 **** `mod_id` mediumint(8) NOT NULL auto_increment, `mod_file` varchar(255) NOT NULL default '', ! `mod_install_time` INT(11) NOT NULL `mod_name` varchar(255) NOT NULL default '', `mod_version` varchar(100) NOT NULL default '', --- 12,16 ---- `mod_id` mediumint(8) NOT NULL auto_increment, `mod_file` varchar(255) NOT NULL default '', ! `mod_install_time` INT(11) NOT NULL, `mod_name` varchar(255) NOT NULL default '', `mod_version` varchar(100) NOT NULL default '', |
From: Eric F. <wg...@us...> - 2005-12-24 01:44:07
|
Update of /cvsroot/easymod/easymod/install/em_files/includes/em In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29382/em_files/includes/em Modified Files: em_common.php em_functions.php em_parser_text.php Log Message: - a semi decent error reporting system - semi decent debug information for installer - remove trailing white space on the ends of lines, haven't done every file - some minor bug fixes Index: em_common.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_common.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_common.php 4 Dec 2005 03:12:30 -0000 1.1 --- em_common.php 24 Dec 2005 01:43:42 -0000 1.2 *************** *** 68,82 **** { em_auth(); ! $template->set_filenames(array( 'em_head' => 'admin/em_header.tpl') ); ! // EM's Header! $template->assign_vars(array( 'VERSION' => sprintf($lang['EM_Version'], $board_config['em_version'])) ); - - $template->pparse('em_head'); } --- 68,80 ---- { em_auth(); ! $template->set_filenames(array( 'em_head' => 'admin/em_header.tpl') ); ! // EM's Header! $template->assign_vars(array( 'VERSION' => sprintf($lang['EM_Version'], $board_config['em_version'])) ); } Index: em_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_functions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** em_functions.php 22 Dec 2005 00:33:31 -0000 1.2 --- em_functions.php 24 Dec 2005 01:43:42 -0000 1.3 *************** *** 35,45 **** { $contents = implode('', file($file)); ! } } else { // ERROR, file doesn't exsist ! } ! if(empty($contents)) { --- 35,45 ---- { $contents = implode('', file($file)); ! } } else { // ERROR, file doesn't exsist ! } ! if(empty($contents)) { *************** *** 95,102 **** { global $phpbb_root_path, $phpEx; ! $methods = array(); $set_methods = true; ! $dir = @opendir($phpbb_root_path . $path . 'includes/em'); while( $file = @readdir($dir) ) --- 95,102 ---- { global $phpbb_root_path, $phpEx; ! $methods = array(); $set_methods = true; ! $dir = @opendir($phpbb_root_path . $path . 'includes/em'); while( $file = @readdir($dir) ) *************** *** 114,118 **** } @closedir($dir); ! return $methods; } --- 114,118 ---- } @closedir($dir); ! return $methods; } *************** *** 246,259 **** $mod_styles = unserialize($mod_styles); ! if( !is_array($mod_styles) ) { return true; } ! // Get syle list if( empty($installed_styles) ) { ! $sql = "SELECT themes_id FROM " . THEMES_TABLE; if( !($result = $db->sql_query($sql)) ) --- 246,259 ---- $mod_styles = unserialize($mod_styles); ! if( !is_array($mod_styles) ) { return true; } ! // Get syle list if( empty($installed_styles) ) { ! $sql = "SELECT themes_id FROM " . THEMES_TABLE; if( !($result = $db->sql_query($sql)) ) *************** *** 277,281 **** } } ! return false; } --- 277,281 ---- } } ! return false; } *************** *** 419,423 **** } ! /* --- 419,423 ---- } ! /* *************** *** 426,436 **** function em_trigger_error($err_type, $msg_text) { ! global $lang; ! $msg_text = ( isset($lang[$msg_text]) ) ? $lang[$msg_text] : $msg_text; $args = func_get_args(); ! switch($err_type) ! { case EM_ERR_INSTALL: page_header(); --- 426,446 ---- function em_trigger_error($err_type, $msg_text) { ! global $lang, $template; ! $msg_text = ( isset($lang[$msg_text]) ) ? $lang[$msg_text] : $msg_text; $args = func_get_args(); ! if ( sizeof($args) > 3 ) ! { ! $eval = '$msg_text = sprintf(\'' . $msg_text . '\', '; ! for($i = 3, $total = sizeof($args); $i < $total; $i++ ) ! { ! $eval .= '\'' . addslashes($args[$i]) . '\'' . (( ($i+1) != $total ) ? ', ' : ''); ! } ! $eval .= ');'; ! eval($eval); ! } ! switch($err_type) ! { case EM_ERR_INSTALL: page_header(); *************** *** 439,442 **** --- 449,461 ---- <table border="0" cellpadding="3" cellspacing="1" class="forumline" width="100%"> <tr> + <th>Error</th> + </tr> + <tr> + <td class="row1"><span class="gen"> <br /><?php echo $msg_text; ?><br /> </span></td> + </tr> + </table> + <br clear="all" /> + <table border="0" cellpadding="3" cellspacing="1" class="forumline" width="100%"> + <tr> <th>Error - Debug Information</th> </tr> *************** *** 444,450 **** <td class="row1"><span class="gen"> Formatted for forum posting<br /><br /> ! [quote="the error"]<strong><?php echo $msg_text; ?></strong>[/quote] ! <h3>[size=18]Debug Information[/size]</h3> <?php em_debug_display(); ?> </span></td> </tr> --- 463,470 ---- <td class="row1"><span class="gen"> Formatted for forum posting<br /><br /> ! [quote][quote="the error"]<?php echo $msg_text; ?>[/quote] ! <h2>[size=20]Debug Information[/size]</h2><br /> <?php em_debug_display(); ?> + [/quote] </span></td> </tr> *************** *** 452,474 **** <?php break; ! case EM_ERR_WARNING: ! echo '<strong>Warning!</strong><br />'; ! echo $msg_text; ! vd($args); ! ! break; ! ! case EM_ERR_CRITICAL: ! echo '<strong>Critical error!</strong><br />'; ! echo $msg_text; ! vd($args); break; ! default: // no error type found break; } ! return; } --- 472,491 ---- <?php break; ! case EM_ERR_WARNING: ! case EM_ERR_CRITICAL: ! $template->assign_block_vars('switch_error', array( ! 'TITLE' => ( $err_type == EM_ERR_WARNING ) ? $lang['EM_Err_warning'] : $lang['EM_Err_critical'], ! 'EXPLAIN' => ( $err_type == EM_ERR_WARNING ) ? $lang['EM_Err_warning_explain'] : $lang['EM_Err_critical_explain'], ! 'MESSAGE' => $msg_text, ! 'CODE' => htmlspecialchars(stripslashes($args[2]))) ! ); break; ! default: // no error type found break; } ! return; } Index: em_parser_text.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_parser_text.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** em_parser_text.php 9 Dec 2005 23:35:33 -0000 1.2 --- em_parser_text.php 24 Dec 2005 01:43:42 -0000 1.3 *************** *** 156,159 **** --- 156,160 ---- { $line = trim($this->mod_contents[$i]); + $line_one = false; if ( strstr($line, '##') && !strstr($line, '###') ) *************** *** 163,169 **** { $current_action = $this->valid_actions[$action]; } ! $contents = ( strstr($line, ':') && $current_action != 'desc' && $current_action != 'author-notes' ) ? trim(htmlspecialchars(substr($line, strpos($line, ':')+1))) : trim(htmlspecialchars(substr($line, 2))); if ( $current_action == 'desc' || $current_action == 'author-notes' ) --- 164,171 ---- { $current_action = $this->valid_actions[$action]; + $line_one = true; } ! $contents = ( (strstr($line, ':') && $current_action != 'desc' && $current_action != 'author-notes') || (($current_action == 'desc' || $current_action == 'author-notes') && $line_one == true) ) ? trim(htmlspecialchars(substr($line, strpos($line, ':')+1))) : trim(htmlspecialchars(substr($line, 2))); if ( $current_action == 'desc' || $current_action == 'author-notes' ) |
From: Eric F. <wg...@us...> - 2005-12-24 01:44:07
|
Update of /cvsroot/easymod/easymod/install/em_files/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29382/em_files/admin Modified Files: em_general.php em_history.php em_logs.php em_manage.php Log Message: - a semi decent error reporting system - semi decent debug information for installer - remove trailing white space on the ends of lines, haven't done every file - some minor bug fixes Index: em_general.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/admin/em_general.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** em_general.php 7 Dec 2005 00:31:20 -0000 1.2 --- em_general.php 24 Dec 2005 01:43:42 -0000 1.3 *************** *** 44,48 **** --- 44,50 ---- } + $template->assign_var_from_handle('EM_HEADER', 'em_head'); $template->pparse('body'); + include('page_footer_admin.'.$phpEx); exit; } *************** *** 170,173 **** --- 172,176 ---- // Show Page // + $template->assign_var_from_handle('EM_HEADER', 'em_head'); $template->pparse('body'); include('page_footer_admin.'.$phpEx); Index: em_logs.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/admin/em_logs.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_logs.php 4 Dec 2005 03:12:30 -0000 1.1 --- em_logs.php 24 Dec 2005 01:43:42 -0000 1.2 *************** *** 1,8 **** <?php ! /** * * @package EasyMOD * @version $Id$ ! * @copyright (c) 2005 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU General Public License * --- 1,8 ---- <?php ! /** * * @package EasyMOD * @version $Id$ ! * @copyright (c) 2005 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU General Public License * *************** *** 157,164 **** 'L_DELETE_ALL' => $lang['Delete_all'] )); ! // // Show Page // $template->pparse('body'); include('page_footer_admin.'.$phpEx); --- 157,165 ---- 'L_DELETE_ALL' => $lang['Delete_all'] )); ! // // Show Page // + $template->assign_var_from_handle('EM_HEADER', 'em_head'); $template->pparse('body'); include('page_footer_admin.'.$phpEx); Index: em_manage.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/admin/em_manage.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** em_manage.php 22 Dec 2005 01:02:10 -0000 1.5 --- em_manage.php 24 Dec 2005 01:43:42 -0000 1.6 *************** *** 124,127 **** --- 124,128 ---- // Display MOD actions + $err = false; foreach( $mod_parser->actions as $action => $action_data ) { *************** *** 154,164 **** $file_dir = dirname($target_file); $edit_file = $processed_dir . '/' . $file_dir . '/' . basename($target_file) . '.txt'; ! $mod_io->make_dir($processed_dir . '/' . $file_dir); ! $mod_io->copy_file($target_file, $edit_file); if ( !$modder->open($edit_file) ) { em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_open', $target_file); } display_mod_action('processed', $action, $target_file); for( $i = 0, $total = sizeof($target_actions['edit']); $i < $total; $i++ ) --- 155,180 ---- $file_dir = dirname($target_file); $edit_file = $processed_dir . '/' . $file_dir . '/' . basename($target_file) . '.txt'; ! ! if (!$mod_io->make_dir($processed_dir . '/' . $file_dir)) ! { ! $err = true; ! em_trigger_error(EM_ERR_CRITICLAL, 'EM_Err_mkdir', $processed_dir . '/' . $file_dir); ! break; ! } ! ! if (!$mod_io->copy_file($target_file, $edit_file)) ! { ! $err = true; ! em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_move', $target_file . ' -> ' . $edit_file); ! break; ! } if ( !$modder->open($edit_file) ) { em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_open', $target_file); + $err = true; + break; } + display_mod_action('processed', $action, $target_file); for( $i = 0, $total = sizeof($target_actions['edit']); $i < $total; $i++ ) *************** *** 170,173 **** --- 186,191 ---- { em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_find', $actions_data['find'], $target_file); + $err = true; + break; } display_mod_action('processed', 'find', $actions_data['find']); *************** *** 183,186 **** --- 201,206 ---- { em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_' . $action_func, $action_data['code']); + $err = true; + break; } $block = 'processed'; *************** *** 202,205 **** --- 222,227 ---- { em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_inline_find', $actions_data['find'], $target_file); + $err = true; + break; } display_mod_action('processed', 'in-line-find', $inlines_data['in-line-find']); *************** *** 215,218 **** --- 237,242 ---- { em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_' . $action_func, $action_data['code']); + $err = true; + break; } $block = 'processed'; *************** *** 224,230 **** --- 248,269 ---- display_mod_action($block, $inline_data['type'], $inline_data['code']); } + + if ( $err == true ) + { + break; + } + } + + if ( $err === true ) + { + break; } } $modder->close(); + + if ( $err === true ) + { + break; + } } break; *************** *** 249,252 **** --- 288,301 ---- } } + + if ( $err === true ) + { + break; + } + } + + if ( $err === false ) + { + $template->assign_block_vars('switch_next_step', array()); } *************** *** 280,283 **** --- 329,333 ---- { $sql = $mod_parser->actions['sql']; + $err = false; for( $i = 0, $total = sizeof($sql); $i < $total; $i++ ) *************** *** 289,293 **** if( $result & SQL_PARSER_ERROR ) { ! message_die(GENERAL_ERROR, '<b>Error:</b><br />' . $sql_parser->error_message['message'] . '<br /><br /><b>SQL:</b><br />' . $sql_parser->sql_input[$sql_parser->sql_count]); } if( $result & SQL_PARSER_WARNINGS ) --- 339,344 ---- if( $result & SQL_PARSER_ERROR ) { ! em_trigger_error(EM_ERR_CRTICAL, $sql_parser->error_message['message'], $sql_parser->sql_input[$sql_parser->sql_count]); ! $err = true; } if( $result & SQL_PARSER_WARNINGS ) *************** *** 295,299 **** for( $i = 0, $total = sizeof($sql_parser->warnings); $i < $total; $i++ ) { ! em_trigger_error(EM_ERR_WARNING, 'SQL Warning', $sql_parser->warnings[$i]); } } --- 346,350 ---- for( $i = 0, $total = sizeof($sql_parser->warnings); $i < $total; $i++ ) { ! em_trigger_error(EM_ERR_WARNING, $sql_parser->warnings[$i]['message']); } } *************** *** 314,317 **** --- 365,373 ---- } + if ( $err === false ) + { + $template->assign_block_vars('switch_next_step', array()); + } + $hidden_ary = array( 'mode' => 'install', *************** *** 354,358 **** { $status = false; ! vd(array($sql[$i], $db->sql_error())); } --- 410,414 ---- { $status = false; ! em_trigger_error(EM_ERR_WARNING, 'EM_Err_executing_sql', $sql[$i] . "\n\n" . $db->sql_error()); } *************** *** 429,433 **** if ( !$mod_io->make_dir($backup_dir . '/' . dirname($target_file)) ) { ! em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_mkdir_backup', $backup_dir . '/' . dirname($target_file)); } --- 485,490 ---- if ( !$mod_io->make_dir($backup_dir . '/' . dirname($target_file)) ) { ! em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_mkdir', $backup_dir . '/' . dirname($target_file)); ! break; } *************** *** 435,439 **** if ( !$mod_io->copy_file($target_file, $backup_dir . '/' . $target_file . '.txt') ) { ! em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_move_backup', $target_file); } --- 492,497 ---- if ( !$mod_io->copy_file($target_file, $backup_dir . '/' . $target_file . '.txt') ) { ! em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_move', $target_file); ! break; } *************** *** 468,477 **** if ( !$mod_io->make_dir(dirname($copy_files[$i]['to'])) ) { ! em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_mkdir_file', dirname($copy_files[$i]['to'])); } if ( !$mod_io->copy_file($copy_files[$i]['from'], $copy_files[$i]['to']) ) { ! em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_move_file', $copy_files[$i]['from']); } --- 526,537 ---- if ( !$mod_io->make_dir(dirname($copy_files[$i]['to'])) ) { ! em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_mkdir', dirname($copy_files[$i]['to'])); ! break; } if ( !$mod_io->copy_file($copy_files[$i]['from'], $copy_files[$i]['to']) ) { ! em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_move', $copy_files[$i]['from']); ! break; } *************** *** 527,530 **** --- 587,591 ---- // Display MOD actions + $err = false; foreach( $mod_parser->actions as $action => $action_data ) { *************** *** 548,555 **** if ( !file_exists($mod_dir . $copy_files[$k]['from']) ) { ! em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_copy', $mod_dir . $copy_files[$k]['from'], $copy_files[$k]['to']); } $copy_actions[] = 'copy ' . $copy_files[$k]['from'] . ' to ' . $copy_files[$k]['to']; } } display_mod_action('processed', $action, implode("\n", $copy_actions)); --- 609,623 ---- if ( !file_exists($mod_dir . $copy_files[$k]['from']) ) { ! em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_copy', $mod_dir . $copy_files[$k]['from']. ' -> ' . $copy_files[$k]['to']); ! $err = true; ! break; } $copy_actions[] = 'copy ' . $copy_files[$k]['from'] . ' to ' . $copy_files[$k]['to']; } + + if ( $err === true ) + { + break; + } } display_mod_action('processed', $action, implode("\n", $copy_actions)); *************** *** 562,565 **** --- 630,635 ---- { em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_open', $target_file); + $err = true; + break; } display_mod_action('processed', $action, $target_file); *************** *** 573,576 **** --- 643,648 ---- { em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_find', $actions_data['find'], $target_file); + $err = true; + break; } display_mod_action('processed', 'find', $actions_data['find']); *************** *** 600,603 **** --- 672,677 ---- { em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_inline_find', $actions_data['find'], $target_file); + $err = true; + break; } display_mod_action('processed', 'in-line-find', $inlines_data['in-line-find']); *************** *** 618,621 **** --- 692,705 ---- } } + + if ( $err === true ) + { + break; + } + } + + if ( $err === true ) + { + break; } } *************** *** 641,648 **** } } } ! // temp ! display_mod_action('processed', 'mod-parser-class', var_export($mod_parser, true)); $hidden_ary = array( --- 725,739 ---- } } + + if ( $err === true ) + { + break; + } } ! if ( $err === false ) ! { ! $template->assign_block_vars('switch_next_step', array()); ! } $hidden_ary = array( *************** *** 677,681 **** redirect(append_sid("{$phpbb_root_path}admin/em_history.$phpEx")); } ! $step = request_var('step', 0); switch($step) --- 768,772 ---- redirect(append_sid("{$phpbb_root_path}admin/em_history.$phpEx")); } ! $step = request_var('step', 0); switch($step) *************** *** 810,813 **** --- 901,905 ---- // Show Page // + $template->assign_var_from_handle('EM_HEADER', 'em_head'); $template->pparse('body'); include('page_footer_admin.'.$phpEx); Index: em_history.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/admin/em_history.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** em_history.php 9 Dec 2005 23:22:37 -0000 1.2 --- em_history.php 24 Dec 2005 01:43:42 -0000 1.3 *************** *** 1,8 **** <?php ! /** * * @package EasyMOD * @version $Id$ ! * @copyright (c) 2005 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU General Public License * --- 1,8 ---- <?php ! /** * * @package EasyMOD * @version $Id$ ! * @copyright (c) 2005 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU General Public License * *************** *** 32,36 **** $installed_mods = array(); $mods_count = 0; ! $sql = 'SELECT mod_id, mod_file, mod_install_time, mod_name, mod_version, mod_desc, mod_styles FROM ' . EM_MODS_TABLE . ' ORDER BY mod_install_time DESC'; --- 32,36 ---- $installed_mods = array(); $mods_count = 0; ! $sql = 'SELECT mod_id, mod_file, mod_install_time, mod_name, mod_version, mod_desc, mod_styles FROM ' . EM_MODS_TABLE . ' ORDER BY mod_install_time DESC'; *************** *** 98,101 **** --- 98,102 ---- // Show Page // + $template->assign_var_from_handle('EM_HEADER', 'em_head'); $template->pparse('body'); include('page_footer_admin.'.$phpEx); |
From: Eric F. <wg...@us...> - 2005-12-24 01:44:07
|
Update of /cvsroot/easymod/easymod/install/em_files/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29382/em_files/templates/subSilver/admin Modified Files: em_check_install.tpl em_check_sql.tpl em_general.tpl em_header.tpl em_help_popup.tpl em_login.tpl em_logs.tpl em_manage_history.tpl em_manage_install.tpl em_mod_info.tpl em_post_process.tpl Log Message: - a semi decent error reporting system - semi decent debug information for installer - remove trailing white space on the ends of lines, haven't done every file - some minor bug fixes Index: em_manage_install.tpl =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/templates/subSilver/admin/em_manage_install.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_manage_install.tpl 4 Dec 2005 03:12:30 -0000 1.1 --- em_manage_install.tpl 24 Dec 2005 01:43:42 -0000 1.2 *************** *** 8,11 **** --- 8,13 ---- //--></script> + {EM_HEADER} + <h1>{L_EASYMOD} - {L_MANAGE}</h1> Index: em_login.tpl =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/templates/subSilver/admin/em_login.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_login.tpl 4 Dec 2005 03:12:30 -0000 1.1 --- em_login.tpl 24 Dec 2005 01:43:42 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + {EM_HEADER} + <div align="center"><h1>{L_EM_WELCOME}</h1></div> Index: em_check_sql.tpl =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/templates/subSilver/admin/em_check_sql.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** em_check_sql.tpl 6 Dec 2005 23:55:06 -0000 1.2 --- em_check_sql.tpl 24 Dec 2005 01:43:42 -0000 1.3 *************** *** 1,2 **** --- 1,4 ---- + {EM_HEADER} + <h1>{L_TITLE}</h1> <p class="gen">{L_DESCRIPTION}</p> Index: em_post_process.tpl =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/templates/subSilver/admin/em_post_process.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_post_process.tpl 4 Dec 2005 03:12:30 -0000 1.1 --- em_post_process.tpl 24 Dec 2005 01:43:42 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + {EM_HEADER} + <h1>{L_TITLE}</h1> <p class="gen">{L_DESCRIPTION}</p> Index: em_check_install.tpl =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/templates/subSilver/admin/em_check_install.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_check_install.tpl 4 Dec 2005 03:12:30 -0000 1.1 --- em_check_install.tpl 24 Dec 2005 01:43:42 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + {EM_HEADER} + <h1>{L_TITLE}</h1> <p class="gen">{L_DESCRIPTION}</p> *************** *** 8,13 **** </tr> {MOD_INFO_ROWS} <tr> ! <td class="catbottom" colspan="2">{S_HIDDEN_FIELDS}<input type="submit" value="{L_CONTINUE}" class="mainoption" /> </table> </form> --- 10,18 ---- </tr> {MOD_INFO_ROWS} + <!-- BEGIN switch_next_step --> <tr> ! <td class="catbottom" colspan="2">{S_HIDDEN_FIELDS}<input type="submit" value="{L_CONTINUE}" class="mainoption" /></td> ! </tr> ! <!-- END switch_next_step --> </table> </form> Index: em_logs.tpl =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/templates/subSilver/admin/em_logs.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_logs.tpl 4 Dec 2005 03:12:30 -0000 1.1 --- em_logs.tpl 24 Dec 2005 01:43:42 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + {EM_HEADER} + <h1>{L_EASYMOD} - {L_LOGS}</h1> Index: em_general.tpl =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/templates/subSilver/admin/em_general.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** em_general.tpl 7 Dec 2005 00:31:20 -0000 1.2 --- em_general.tpl 24 Dec 2005 01:43:42 -0000 1.3 *************** *** 8,11 **** --- 8,13 ---- </script> + {EM_HEADER} + <h1>{L_EASYMOD} - {L_GENERAL}</h1> Index: em_help_popup.tpl =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/templates/subSilver/admin/em_help_popup.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_help_popup.tpl 7 Dec 2005 00:32:03 -0000 1.1 --- em_help_popup.tpl 24 Dec 2005 01:43:42 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + {EM_HEADER} + <table width="100%" border="0" cellspacing="0" cellpadding="10" align="center"> <tr> *************** *** 11,15 **** </tr> <tr> ! <td class="{help_row.ROW_CLASS}"><span class="gen">{help_row.DESC}><br /><br /><a href="javascript:window.close();">{L_CLOSE_WINDOW}</a></span></td> </tr> <tr> --- 13,17 ---- </tr> <tr> ! <td class="{help_row.ROW_CLASS}"><span class="gen">{help_row.DESC}<br /><br /><a href="javascript:window.close();">{L_CLOSE_WINDOW}</a></span></td> </tr> <tr> Index: em_header.tpl =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/templates/subSilver/admin/em_header.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_header.tpl 4 Dec 2005 03:12:30 -0000 1.1 --- em_header.tpl 24 Dec 2005 01:43:42 -0000 1.2 *************** *** 8,10 **** </tr> </table> ! <br clear="all" /> \ No newline at end of file --- 8,25 ---- </tr> </table> ! <br clear="all" /> ! ! <!-- BEGIN switch_error --> ! <table border="0" cellpadding="3" cellspacing="1" class="forumline" width="100%"> ! <tr> ! <th>{switch_error.TITLE}</th> ! </tr> ! <tr> ! <td class="row2"><span class="genmed">{switch_error.EXPLAIN}</span></td> ! </tr> ! <tr> ! <td class="row1"><span class="gen">{switch_error.MESSAGE}<pre style="margin: 2em;">{switch_error.CODE}</pre></span></td> ! </tr> ! </table> ! <br clear="all" /> ! <!-- END switch_error --> \ No newline at end of file Index: em_manage_history.tpl =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/templates/subSilver/admin/em_manage_history.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** em_manage_history.tpl 9 Dec 2005 23:22:37 -0000 1.2 --- em_manage_history.tpl 24 Dec 2005 01:43:42 -0000 1.3 *************** *** 8,11 **** --- 8,13 ---- //--></script> + {EM_HEADER} + <h1>{L_EASYMOD} - {L_MANAGE}</h1> Index: em_mod_info.tpl =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/templates/subSilver/admin/em_mod_info.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_mod_info.tpl 4 Dec 2005 03:12:30 -0000 1.1 --- em_mod_info.tpl 24 Dec 2005 01:43:42 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + {EM_HEADER} + <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> |
From: Eric F. <wg...@us...> - 2005-12-24 01:44:03
|
Update of /cvsroot/easymod/easymod/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29382 Modified Files: em_install.php Log Message: - a semi decent error reporting system - semi decent debug information for installer - remove trailing white space on the ends of lines, haven't done every file - some minor bug fixes Index: em_install.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_install.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** em_install.php 22 Dec 2005 00:33:31 -0000 1.3 --- em_install.php 24 Dec 2005 01:43:42 -0000 1.4 *************** *** 502,551 **** // general debug information // ! $debug = array(); ! ! // php version ! $debug['general']['php_version'] = phpversion(); ! ! // phpbb version ! $debug['general']['phpbb_version'] = '2' . $board_config['version']; ! ! // easymod version ! $debug['general']['em_version'] = ( !empty($board_config['em_version']) ) ? $board_config['em_version'] : $lang['EM_Not_installed']; ! $debug['general']['em_install_version'] = EM_INSTALL_VERSION; ! ! // check writing temp files ! $tmp = true; ! if ( $tmpfname = @tempnam(( ( !empty($board_config['em_tmp_path']) ) ? $board_config['em_tmp_path'] : '/tmp'), 'em_')) ! { ! @unlink($tmpfname); ! ! if ( $fp = @fopen($tmpfname, 'w') ) ! { ! // remember to clean up! ! @fwrite($fp, "EM TEST\n"); ! @fclose($fp); ! @unlink($tmpfname); ! ! $debug['general']['tmp_write'] = true; ! } ! else ! { ! $debug['general']['tmp_write'] = false; ! } ! } ! else ! { ! $debug['general']['tmp_write'] = false; ! } ! ! // safe mode? ! if ( @ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'on' ) ! { ! $debug['general']['safe_mode'] = $lang['EM_On']; ! } ! else ! { ! $debug['general']['safe_mode'] = $lang['EM_Off']; ! } ?> <tr valign="top"> --- 502,509 ---- // general debug information // ! $temp = load_debug(); ! $debug = $temp['debug']; ! $method_files = $temp['methods']; ! unset($temp); ?> <tr valign="top"> *************** *** 557,570 **** <?php - // load the methods and the debug information - $method_files = array(); - $methods = load_methods('install/em_files/'); - for($i = 0, $total = sizeof($methods); $i < $total; $i++) - { - include($phpbb_root_path . $em_dir . 'includes/em/em_methods_' . $methods[$i]['file'] . '.'. $phpEx); - $mod_io->test($debug, $methods[$i]['name']); - $method_files[$methods[$i]['name']] = $methods[$i]['file']; - } - $allowed_methods = '<select name="method">'; foreach($debug as $method => $options) --- 515,518 ---- *************** *** 761,772 **** } ! function em_debug_display() { ! global $board_config, $lang, $mod_io; ! global $sel_method, $tmp_path; ! global $ftp_host, $ftp_port, $ftp_timeout, $ftp_username, $ftp_password, $ftp_root_path; ! $tmp_write = false; ! if ( $tmpfname = @tempnam(( ( !empty($tmp_path) ) ? $tmp_path : '/tmp'), 'em_')) { @unlink($tmpfname); --- 709,735 ---- } ! ! function load_debug() { ! global $board_config, $phpEx, $phpbb_root_path, $em_dir, $lang, $mod_io; ! // ! // general debug information ! // ! $debug = array(); ! ! // php version ! $debug['general']['php_version'] = phpversion(); ! ! // phpbb version ! $debug['general']['phpbb_version'] = '2' . $board_config['version']; ! ! // easymod version ! $debug['general']['em_version'] = ( !empty($board_config['em_version']) ) ? $board_config['em_version'] : $lang['EM_Not_installed']; ! $debug['general']['em_install_version'] = EM_INSTALL_VERSION; ! ! // check writing temp files ! $tmp = true; ! if ( $tmpfname = @tempnam(( ( !empty($board_config['em_tmp_path']) ) ? $board_config['em_tmp_path'] : '/tmp'), 'em_')) { @unlink($tmpfname); *************** *** 779,829 **** @unlink($tmpfname); ! $tmp_write = true; } else { ! $tmp_write = false; } } else { ! $tmp_write = false; } - ?> - <strong>[b]PHP Version[/b]</strong>: <?php echo phpversion(); ?><br /> - <strong>[b]phpBB Version[/b]</strong>: 2.<?php echo $board_config['version']; ?><br /> - <strong>[b]EM Version[/b]</strong>: <?php echo ( !empty($board_config['em_version']) ) ? $board_config['em_version'] : $lang['EM_Not_installed']; ?><br /> - <strong>[b]EM Install Version[/b]</strong>: <?php echo EM_INSTALL_VERSION; ?><br /> - <strong>[b]TMP Write Access[/b]</strong>: <?php echo ( $tmp_write ) ? '[color=green]' . $lang['EM_Passed'] . '[/color]': '[color=red]' . $lang['EM_Failed'] . '[/color]'; ?><br /> - <strong>[b]Safe Mode[/b]</strong>: <?php echo ( @ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'on' ) ? 'On' : 'Off'; ?><br /><br /> ! <strong>[b]Selected Method[/b]</strong>: <?php echo $sel_method; ?><br /> ! <strong>[b]Tmp Path[/b]</strong>: <?php echo $tmp_path; ?><br /> ! <strong>[b]FTP Host[/b]</strong>: <?php echo $ftp_host; ?><br /> ! <strong>[b]FTP Port[/b]</strong>: <?php echo $ftp_port; ?><br /> ! <strong>[b]FTP Timeout[/b]</strong>: <?php echo $ftp_timeout; ?><br /> ! <strong>[b]FTP Username[/b]</strong>: <?php echo $ftp_username; ?><br /> ! <strong>[b]FTP Password[/b]</strong>: <?php echo ( !empty($ftp_password) ) ? '********' : 'None'; ?><br /> ! <strong>[b]FTP Root Path[/b]</strong>: <?php echo $ftp_root_path; ?><br /><br /> ! <?php ! $test_results = $mod_io->test_connection(); ! ?> ! <br /><br /> ! <?php ! $debug = array(); ! $mod_io->test($debug, 'temp'); ! foreach($debug['temp'] as $option => $allowed) { ! if ( $option == 'allowed' ) { ! continue; ! } ?> ! <strong>[b]<?php echo ( isset($lang['EM_' . $option]) ) ? $lang['EM_' . $option] : str_replace('_', ' ', $option); ?>[/b]</strong>: <?php if ( is_bool($allowed) ) { echo ( $allowed ) ? '[color=green]' . $lang['EM_Passed'] . '[/color]': '[color=red]' . $lang['EM_Failed'] . '[/color]'; } else { echo $allowed; } ?><br /> <?php } - - return; } --- 742,826 ---- @unlink($tmpfname); ! $debug['general']['tmp_write'] = true; } else { ! $debug['general']['tmp_write'] = false; } } else { ! $debug['general']['tmp_write'] = false; } ! // safe mode? ! if ( @ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'on' ) ! { ! $debug['general']['safe_mode'] = $lang['EM_On']; ! } ! else ! { ! $debug['general']['safe_mode'] = $lang['EM_Off']; ! } ! // load the methods and the debug information ! $method_files = array(); ! $methods = load_methods('install/em_files/'); ! for($i = 0, $total = sizeof($methods); $i < $total; $i++) { ! include($phpbb_root_path . $em_dir . 'includes/em/em_methods_' . $methods[$i]['file'] . '.'. $phpEx); ! $mod_io->test($debug, $methods[$i]['name']); ! $method_files[$methods[$i]['name']] = $methods[$i]['file']; ! } ! ! return array('debug' => $debug, 'methods' => $method_files); ! } ! ! function em_debug_display() ! { ! global $lang, $board_config; ! global $sel_method, $tmp_path; ! global $ftp_host, $ftp_port, $ftp_timeout, $ftp_username, $ftp_password, $ftp_root_path; ! ! $debug['settings'] = array( ! 'sel_method' => $sel_method, ! 'ftp_host' => $ftp_host, ! 'ftp_port' => $ftp_port, ! 'ftp_username' => $ftp_username, ! 'ftp_password' => ( !empty($ftp_password) ) ? '*******' : $lang['EM_No_password'], ! 'ftp_timeout' => $ftp_timeout, ! 'ftp_root_path' => $ftp_root_path, ! ); ! $debug['system'] = array( ! 'domain' => $board_config['server_name'], ! 'script_path' => $board_config['script_path'], ! 'current_file' => $_SERVER['SCRIPT_FILENAME'], ! 'register_globals' => ( @ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' ) ? $lang['EM_On'] : $lang['EM_Off'], ! 'magic_quote_gpc' => ( @get_magic_quotes_gpc() ) ? $lang['EM_On'] : $lang['EM_Off'], ! 'magic_quotes_runtime' => ( @get_magic_quotes_runtime() ) ? $lang['EM_On'] : $lang['EM_Off'], ! 'loaded_extensions' => implode(', ', @get_loaded_extensions()), ! ); ! ! $temp = load_debug(); ! $debug = array_merge($debug, $temp['debug']); ! $methods = $temp['methods']; ! ! foreach($debug as $method => $options) ! { ! $method_lang = ( isset($lang['EM_' . $method]) ) ? $lang['EM_' . $method] : str_replace('_', ' ', $method); ! ?> ! <h3>[size=18][b]<?php echo $method_lang; ?>[/b][/size]</h3> ! <?php ! foreach($options as $option => $allowed) { ! if ( $option != 'allowed' ) ! { ?> ! <strong>[b]<?php echo ( isset($lang['EM_' . $option]) ) ? $lang['EM_' . $option] : str_replace('_', ' ', $option); ?>[/b]</strong>: <?php if ( is_bool($allowed) ) { echo ( $allowed ) ? '[color=green]' . $lang['EM_Passed'] . '[/color]' : '[color=red]' . $lang['EM_Failed'] . '[/color]'; } else { echo $allowed; } ?><br /> <?php + } + } + echo '<br />'; } } |
From: Eric F. <wg...@us...> - 2005-12-24 01:44:03
|
Update of /cvsroot/easymod/easymod/install/em_files/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29382/em_files/language/lang_english Modified Files: lang_easymod.php Log Message: - a semi decent error reporting system - semi decent debug information for installer - remove trailing white space on the ends of lines, haven't done every file - some minor bug fixes Index: lang_easymod.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/language/lang_english/lang_easymod.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lang_easymod.php 9 Dec 2005 23:22:37 -0000 1.3 --- lang_easymod.php 24 Dec 2005 01:43:42 -0000 1.4 *************** *** 1,8 **** <?php ! /** * * @package EasyMOD * @version $Id$ ! * @copyright (c) 2005 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU General Public License * --- 1,8 ---- <?php ! /** * * @package EasyMOD * @version $Id$ ! * @copyright (c) 2005 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU General Public License * *************** *** 31,34 **** --- 31,54 ---- $lang['EM_To'] = 'To'; + // Errors + $lang['EM_Err_warning'] = 'Warning'; + $lang['EM_Err_warning_explain'] = 'EasyMOD has encountered a warning. Warnings are not critical and EasyMOD can continue to process if there is a warning.'; + $lang['EM_Err_critical'] = 'Critical Error'; + $lang['EM_Err_critical_explain'] = 'EasyMOD has encountered a critical error. EasyMOD can not continue to process until the critical error is fixed.'; + $lang['EM_Err_copy'] = 'Error <strong>copying</strong> files. The file you are trying to copy doesn\'t exist.'; + $lang['EM_Err_open'] = 'Error <strong>opening</strong> file. The file you are trying to open doesn\'t exist.'; + $lang['EM_Err_find'] = 'Can not <strong>find</strong> the following code in <strong>%s</strong>.'; + $lang['EM_Err_before_add'] = 'Error adding the following code <strong>before</strong> the find.'; + $lang['EM_Err_after_add'] = 'Error adding the following code <strong>after</strong> the find.'; + $lang['EM_Err_replace_with'] = 'Error <strong>replacing</strong> the find with the following code.'; + $lang['EM_Err_increment'] = 'Error <strong>incrementing</strong> the code in the find with the following.'; + $lang['EM_Err_inline_find'] = 'Can not <strong>find</strong> the following code within the previous find in <strong>%s</strong>.'; + $lang['EM_Err_in_line_before_add'] = 'Can not add the following code <strong>before</strong> the code found within the in-line find previous to this action.'; + $lang['EM_Err_in_line_after_add'] = 'Can not add the following code <strong>after</strong> the code found within the in-line find previous to this action.'; + $lang['EM_Err_in_line_replace_with'] = 'Can not the <strong>replace</strong> code within the in-line find previous to this action with the following code.'; + $lang['EM_Err_executing_sql'] = 'Error <strong>executing</strong> the following sql query.'; + $lang['EM_Err_mkdir'] = 'Error making directory.'; + $lang['EM_Err_move'] = 'Error moving file.'; + // MOD Management $lang['EM_Install_MODs'] = 'Install MODs'; |
From: Eric F. <wg...@us...> - 2005-12-22 01:02:19
|
Update of /cvsroot/easymod/easymod/install/em_files/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4387/admin Modified Files: em_manage.php Log Message: grumble Index: em_manage.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/admin/em_manage.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** em_manage.php 22 Dec 2005 00:33:31 -0000 1.4 --- em_manage.php 22 Dec 2005 01:02:10 -0000 1.5 *************** *** 546,552 **** for( $k = 0, $copy_total = sizeof($copy_files); $k < $copy_total; $k++ ) { ! if ( !file_exists($copy_files[$k]['from']) ) { ! em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_copy', $copy_files[$k]['from'], $copy_files[$k]['to']); } $copy_actions[] = 'copy ' . $copy_files[$k]['from'] . ' to ' . $copy_files[$k]['to']; --- 546,552 ---- for( $k = 0, $copy_total = sizeof($copy_files); $k < $copy_total; $k++ ) { ! if ( !file_exists($mod_dir . $copy_files[$k]['from']) ) { ! em_trigger_error(EM_ERR_CRITICAL, 'EM_Err_copy', $mod_dir . $copy_files[$k]['from'], $copy_files[$k]['to']); } $copy_actions[] = 'copy ' . $copy_files[$k]['from'] . ' to ' . $copy_files[$k]['to']; |