easymod-cvs Mailing List for EasyMOD (Page 11)
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: Brendan K. <bk...@us...> - 2005-06-03 22:59:22
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10447/mods/easymod/includes Modified Files: admin_easymod.php.txt mod_complete.tpl mod_settings.tpl mod_sql_body.tpl Log Message: Working through the hardcoded langauge vars. Hope everythings ok ;) Index: mod_complete.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/mod_complete.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mod_complete.tpl 8 May 2005 03:04:19 -0000 1.2 --- mod_complete.tpl 3 Jun 2005 22:59:12 -0000 1.3 *************** *** 92,97 **** </tr> <tr> ! <td class="row1" align="left" width="25%"><span class="gen">Database Alterations:</span></td> ! <td class="row2" align="left" width="75%"><span class="gen">Tables Added: N/A Tables Altered: N/A Rows Added: N/A</span></td> </tr> </table> --- 92,98 ---- </tr> <tr> ! <td class="row1" align="left" width="25%"><span class="gen">{L_DB_ALTERATIONS}:</span></td> ! <!-- Need info for db alterations below! --> ! <td class="row2" align="left" width="75%"><span class="gen">{L_TABLES_ADDED}: N/A {L_TABLES_ALTERED}: N/A {L_ROWS_ADDED}: N/A</span></td> </tr> </table> *************** *** 119,123 **** <br /> <table width="100%"> ! <tr><td><span class="gen">THIS TEXT WILL DEPEND ON MOVE METHOD:</span></td></tr> <tr><td> <form action="{S_ACTION}" method="post"> --- 120,124 ---- <br /> <table width="100%"> ! <tr><td><span class="gen">{L_DEPENDS_ON_MOVE}:</span></td></tr> <tr><td> <form action="{S_ACTION}" method="post"> Index: mod_sql_body.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/mod_sql_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mod_sql_body.tpl 24 Apr 2005 14:59:53 -0000 1.1 --- mod_sql_body.tpl 3 Jun 2005 22:59:12 -0000 1.2 *************** *** 7,11 **** <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> ! <th height="25" class="thHead" nowrap="nowrap">URGENT WARNING</th> </tr> <tr> --- 7,11 ---- <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> ! <th height="25" class="thHead" nowrap="nowrap">{L_URGENT_WARNING}</th> </tr> <tr> *************** *** 15,22 **** </tr> <tr> ! <td width="100%" align="center"><span class="gen">SQL commands for dropping either a column or an entire ! table have been detected. Although these commands may be legitamate, you should double check that you want this. Dropping ! a table or column is irreversable. You are strongly urged to backup your database before proceeding even if the commands ! are legitamate!</span></td> </tr> <tr> --- 15,19 ---- </tr> <tr> ! <td width="100%" align="center"><span class="gen">{L_SQL_DROP_WARN}</span></td> </tr> <tr> *************** *** 33,37 **** <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> ! <th height="25" class="thHead" nowrap="nowrap">Notice</th> </tr> <tr> --- 30,34 ---- <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> ! <th height="25" class="thHead" nowrap="nowrap">{L_NOTICE}</th> </tr> <tr> *************** *** 41,48 **** </tr> <tr> ! <td width="100%" align="center"><span class="gen">You have a MS Access database. EM should perform most ! SQL properly for Access. However, when creating tables or adding columns there is no way to assign default values. You ! will have to do this manually in Access. Without default values, the MOD may not function as intended and the consequences ! could be severe. If you know how to automate this, be sure to contact me (Nuttzy)!</span></td> </tr> <tr> --- 38,42 ---- </tr> <tr> ! <td width="100%" align="center"><span class="gen">{L_SQL_MSACCESS_WARN}</span></td> </tr> <tr> *************** *** 59,63 **** <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> ! <th height="25" class="thHead" nowrap="nowrap">SQL ERROR</th> </tr> <tr> --- 53,57 ---- <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> ! <th height="25" class="thHead" nowrap="nowrap">{L_SQL_ERROR}</th> </tr> <tr> *************** *** 67,81 **** </tr> <tr> ! <td width="100%" align="center"><span class="gen"><b>SQL PROCESSING HALTED</b><br> ! <br> ! An error was encountered while processing the SQL commands. Further SQL processing has been halted. You ! may choose to complete the MOD installation anyway and perform the SQL commands manually yourself. However, at this point ! EM cannot guarantee the MOD will work correctly so you are best off seeking support from the Author before continuing ! further.<br> <br> ! The failed line was:<br> {sql_error.LINE}<br> <br> ! SQL Error: {sql_error.ERROR_CODE}<br> {sql_error.ERROR_MSG}</span></td> </tr> --- 61,71 ---- </tr> <tr> ! <td width="100%" align="center"><span class="gen"><b>{L_SQL_HALTED}</b><br> ! <br>{L_SQL_ERROR_EXPLAIN}<br> <br> ! {L_FAILED_LINE}:<br> {sql_error.LINE}<br> <br> ! {L_SQL_ERROR}: {sql_error.ERROR_CODE}<br> {sql_error.ERROR_MSG}</span></td> </tr> *************** *** 93,97 **** <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> ! <th height="25" class="thHead" nowrap="nowrap">Notice</th> </tr> <tr> --- 83,87 ---- <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> ! <th height="25" class="thHead" nowrap="nowrap">{L_NOTICE}</th> </tr> <tr> *************** *** 101,108 **** </tr> <tr> ! <td width="100%" align="center"><span class="gen">You have a {experimental.DB_TYPE} database. Most ! likely EM isn't generating the SQL properly. The reason is simply because I (Nuttzy) don't know what it is supposed to ! look like. If you know what the SQL should look like, please let me know on <a href="{experimental.DB_LINK}" ! target="_sql">this topic</a>. Otherwise just expect that maybe this won't work so well ;-)</span></td> </tr> <tr> --- 91,95 ---- </tr> <tr> ! <td width="100%" align="center"><span class="gen">{L_EXPERIMENTAL_EXPLAIN}</span></td> </tr> <tr> *************** *** 131,139 **** <tr> <td width="100%" align="center"><span class="gen"> ! <b>SQL PROCESSING ERROR:</b><br> ! <b>No SQL alterations will be performed.</b> However, you may skip SQL processing, continue ! installing the MOD, and deal with the SQL manually.<br> <br> ! The following error occured:<br> <br> {error.ERROR_MSG} --- 118,125 ---- <tr> <td width="100%" align="center"><span class="gen"> ! <b>{L_SQL_PROCESS_ERROR}:</b><br> ! <b>{L_NO_SQL_PREFORMED}<br> <br> ! {L_FOLLOWING_ERROR}:<br> <br> {error.ERROR_MSG} *************** *** 157,161 **** <tr> <td width="100%" align="center"><span class="gen"> ! No SQL to process. Click 'Complete Installation' to proceed. </span></td> </tr> --- 143,147 ---- <tr> <td width="100%" align="center"><span class="gen"> ! {L_NO_SQL} </span></td> </tr> Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** admin_easymod.php.txt 27 May 2005 08:10:50 -0000 1.10 --- admin_easymod.php.txt 3 Jun 2005 22:59:12 -0000 1.11 *************** *** 165,168 **** --- 165,174 ---- } + $template->assign_vars(array( + 'L_SQL_PROCESS_ERROR' => $lang['EM_sql_process_error'], + 'L_NO_SQL_PREFORMED' => $lang['EM_no_sql_preformed'], + 'L_FOLLOWING_ERROR' => $lang['EM_following_error'], + )); + $template->assign_block_vars('error', array( 'L_TITLE' => $lang['EM_error_detail'], *************** *** 875,881 **** 'L_PW_SET' => $lang['EM_password_set'], 'L_PW_CONFIRM' => $lang['EM_password_confirm'], ! // hard coded lang ! 'L_EM_VERSION' => 'EasyMOD Version', ! 'L_EMV_DESC' => 'If you need to reinstall EM, then you might need to change the version. You can do so here.', 'L_FILE_TITLE' => $lang['EM_file_title'], --- 881,886 ---- 'L_PW_SET' => $lang['EM_password_set'], 'L_PW_CONFIRM' => $lang['EM_password_confirm'], ! 'L_EM_VERSION' => $lang['EM_easymod_version'], ! 'L_EMV_DESC' => $lang['EM_emv_description'], 'L_FILE_TITLE' => $lang['EM_file_title'], *************** *** 895,898 **** --- 900,904 ---- 'L_FTP_EXT_WARN' => $lang['EM_ftp_ext_not'], 'L_FTP_CACHE' => $lang['EM_ftp_cache'], + 'L_SUPPLY_CHANGE' => $lang['EM_supply_on_change'], 'L_YES' => $lang['EM_yes'], 'L_NO' => $lang['EM_no'], *************** *** 2488,2491 **** --- 2494,2498 ---- { $template->assign_block_vars( 'no_sql', array()); + $template->assign_vars(array('L_NO_SQL' => $lang['EM_no_sql'])); $error = 'none' ; } *************** *** 2525,2528 **** --- 2532,2539 ---- { $template->assign_block_vars( 'drop_warning', array()); + $template->assign_vars(array( + 'L_SQL_DROP_WARN' => $lang['EM_sql_drop_warning'], + 'L_URGENT_WARNING' => $lang['EM_urgent_warning'], + )); $drop_warning = true ; } *************** *** 2544,2551 **** $link .= (SQL_LAYER == 'postgresql') ? '15388' : '15389' ; ! $template->assign_block_vars( 'experimental', array( ! 'DB_LINK' => $link, ! 'DB_TYPE' => SQL_LAYER) ! ); } --- 2555,2562 ---- $link .= (SQL_LAYER == 'postgresql') ? '15388' : '15389' ; ! $template->assign_block_vars('experimental', array()); ! $template->assign_vars(array( ! 'L_EXPERIMENTAL_EXPLAIN' => sprintf($lang['EM_experimental_explain'], SQL_LAYER, $link) ! )); } *************** *** 2554,2557 **** --- 2565,2569 ---- { $template->assign_block_vars( 'msaccess', array()); + $template->assign_vars(array('L_SQL_MSACCESS_WARN' => $lang['EM_sql_msaccess_warning'])); } *************** *** 2563,2584 **** 'L_STEP' => $lang['EM_sql_step2'], 'L_SQL_ALPHA2' => $lang['EM_SQL_Alpha2'], ! //remove lang ! // 'L_SQL_INTRO' => $lang['EM_SQL_Intro'], ! 'L_SQL_INTRO' => "EasyMOD will now make changes to your database if you command it to. Any SQL with a check next to it will be performed ! by EM. If you are reinstalling a MOD, you probably <b>do not</b> want to run the SQL a second time, <b>so be careful!</b><br> ! <br> ! <b>Official Warning:</b> This is a DUMB process. Commands you check off will be executed but EM does NOT check to see ! if these changes will negatively impact your database. You are STRONGLY advised to <b>backup your database</b> before making ! any changes. Prior to executing, you are advised to examine each command thoroughly or ask for feedback from experienced ! MOD installers. Again, if you are reinstalling a MOD, multiple executions of the same SQL lines could adversely effect ! your database.", ! 'L_ALTERATIONS' => $lang['EM_Alterations'], ! //remove lang ! // 'L_PSEUDO' => $lang['EM_Pseudo'], ! 'L_PSEUDO' => 'Proposed Database Alterations for your ' . SQL_LAYER . ' Database', 'L_ALLOW' => $lang['EM_Allow'], 'L_PERFORM' => $lang['EM_Perform'], 'L_COMPLETE' => $lang['EM_complete_install'], 'THEMES' => $themes, --- 2575,2585 ---- 'L_STEP' => $lang['EM_sql_step2'], 'L_SQL_ALPHA2' => $lang['EM_SQL_Alpha2'], ! 'L_SQL_INTRO' => $lang['EM_sql_intro_explain'], 'L_ALTERATIONS' => $lang['EM_Alterations'], ! 'L_PSEUDO' => sprintf($lang['EM_proposed_alerations'], SQL_LAYER), 'L_ALLOW' => $lang['EM_Allow'], 'L_PERFORM' => $lang['EM_Perform'], 'L_COMPLETE' => $lang['EM_complete_install'], + 'L_NOTICE' => $lang['EM_notice'], 'THEMES' => $themes, *************** *** 2638,2642 **** if ($failure) { ! $sql[] = array('command' => $sql_line, 'status' => '<b>Not Attempted</b>') ; } else if ($sql_allow) --- 2639,2643 ---- if ($failure) { ! $sql[] = array('command' => $sql_line, 'status' => '<b>' . $lang['EM_not_attempted'] . '</b>') ; } else if ($sql_allow) *************** *** 2646,2650 **** { // set the status ! $sql[] = array('command' => $sql_line, 'status' => '<b>FAILED</b>') ; $failure = true ; --- 2647,2651 ---- { // set the status ! $sql[] = array('command' => $sql_line, 'status' => '<b>' . $lang['EM_failed'] . '</b>') ; $failure = true ; *************** *** 2659,2671 **** 'ERROR_MSG' => $error['message']) ); } else { ! $sql[] = array('command' => $sql_line, 'status' => 'Success') ; } } else { ! $sql[] = array('command' => $sql_line, 'status' => '<b>Skipped</b>') ; } } --- 2660,2678 ---- 'ERROR_MSG' => $error['message']) ); + $template->assign_vars(array( + 'L_SQL_ERROR' => $lang['EM_sql_msaccess_warning'], + 'L_SQL_ERROR_EXPLAIN' => $lang['EM_sql_error_explain'], + 'L_FAILED_LINE' => $lang['EM_failed_line'], + 'L_SQL_HALTED' => $lang['EM_sql_halted'], + )); } else { ! $sql[] = array('command' => $sql_line, 'status' => $lang['EM_success']) ; } } else { ! $sql[] = array('command' => $sql_line, 'status' => '<b>' . $lang['EM_skipped'] . '</b>') ; } } *************** *** 2690,2695 **** ); } ! $sql_intro = 'The following is the result for each line of SQL executed.' ; ! $sql_intro .= (!$failure) ? ' - <b>ALL LINES EXECUTED SUCCESSFULLY</b>' : ' - <b>ERRORS DETECTED</b>' ; // fill the template --- 2697,2702 ---- ); } ! $sql_intro = $lang['EM_line_results']; ! $sql_intro .= (!$failure) ? ' - <b>' . $lang['EM_all_lines_successfull'] . '</b>' : ' - <b>' . $lang['EM_errors_detected'] . '</b>' ; // fill the template *************** *** 2698,2705 **** 'L_SQL_ALPHA2' => $lang['EM_SQL_Alpha2'], 'L_SQL_INTRO' => $sql_intro, ! // 'L_ALTERATIONS' => $lang['EM_Alterations'], ! 'L_ALTERATIONS' => 'SQL Processing Results', ! // 'L_PSEUDO' => $lang['EM_Pseudo'], ! 'L_PSEUDO' => 'The following SQL was attempted:', 'L_ALLOW' => $lang['EM_Allow'], 'L_PERFORM' => $lang['EM_Perform'], --- 2705,2710 ---- 'L_SQL_ALPHA2' => $lang['EM_SQL_Alpha2'], 'L_SQL_INTRO' => $sql_intro, ! 'L_ALTERATIONS' => $lang['EM_processing_results'], ! 'L_PSEUDO' => $lang['EM_sql_attempted'], 'L_ALLOW' => $lang['EM_Allow'], 'L_PERFORM' => $lang['EM_Perform'], *************** *** 2924,2927 **** --- 2929,2937 ---- 'L_PROCESSED' => $lang['EM_processed_commands'], 'L_UNPROCESSED' => $lang['EM_unprocessed_commands'], + 'L_DB_ALTERATIONS' => $lang['EM_database_alterations'], + 'L_TABLES_ADDED' => $lang['EM_tables_added'], + 'L_TABLES_ALTERED' => $lang['EM_tables_altered'], + 'L_ROWS_ADDED' => $lang['EM_rows_added'], + 'L_DEPENDS_ON_MOVE' => $lang['EM_text_depend_move'], 'L_DIY_INSTRUCTIONS' => $lang['DIY_Instructions'], Index: mod_settings.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/mod_settings.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mod_settings.tpl 25 May 2005 01:10:51 -0000 1.3 --- mod_settings.tpl 3 Jun 2005 22:59:12 -0000 1.4 *************** *** 54,58 **** <tr> <td class="row1" align="right"><span class="gen">{L_FTP_PASS}</span></td> ! <td class="row2"><input type="password" name="ftp_pass" value="{FTP_PASS}" /> Only supply if you want to change it</td> </tr> <tr> --- 54,58 ---- <tr> <td class="row1" align="right"><span class="gen">{L_FTP_PASS}</span></td> ! <td class="row2"><input type="password" name="ftp_pass" value="{FTP_PASS}" /> {L_SUPPLY_CHANGE}</td> </tr> <tr> |
From: Brendan K. <bk...@us...> - 2005-06-03 22:59:21
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10447/mods/easymod Modified Files: lang_easymod.php Log Message: Working through the hardcoded langauge vars. Hope everythings ok ;) Index: lang_easymod.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/lang_easymod.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lang_easymod.php 8 May 2005 03:04:19 -0000 1.6 --- lang_easymod.php 3 Jun 2005 22:59:13 -0000 1.7 *************** *** 60,63 **** --- 60,66 ---- $lang['EM_pass_updated'] = '(EM password updated)' ; $lang['EM_pass_not_updated'] = '(EM password not updated)' ; + $lang['EM_supply_on_change'] = 'Only supply if you want to change it'; + $lang['EM_emv_description'] = 'If you need to reinstall EM, then you might need to change the version. You can do so here.'; + $lang['EM_easymod_version'] = 'EasyMOD Version'; // EasyMOD install *************** *** 99,102 **** --- 102,106 ---- $lang['EM_proc_failed'] = 'Installation Failed' ; $lang['EM_proc_failed_desc'] = 'EasyMOD encountered the following error(s). A general error could be ABC. A critical error means D and you should do XYZ.' ; + $lang['EM_text_depend_move'] = 'THIS TEXT WILL DEPEND ON MOVE METHOD'; // process + post process *************** *** 115,118 **** --- 119,150 ---- $lang['EM_Perform'] = 'Perform DB alterations' ; $lang['EM_complete_install'] = 'Complete Installation' ; + $lang['EM_proposed_alterations'] = 'Proposed Database Alterations for your %s Database'; + $lang['EM_sql_intro_explain'] = 'EasyMOD will now make changes to your database if you command it to. Any SQL with a check next to it will be performed by EM. If you are reinstalling a MOD, you probably <b>do not</b> want to run the SQL a second time, <b>so be careful!</b><br><br><b>Official Warning:</b> This is a DUMB process. Commands you check off will be executed but EM does NOT check to seeif these changes will negatively impact your database. You are STRONGLY advised to <b>backup your database</b> before makingany changes. Prior to executing, you are advised to examine each command thoroughly or ask for feedback from experienced MOD installers. Again, if you are reinstalling a MOD, multiple executions of the same SQL lines could adversely effect your database.'; + $lang['EM_sql_error'] = 'SQL ERROR'; + $lang['EM_not_attempted'] = 'Not Attempted'; + $lang['EM_success'] = 'Success'; + $lang['EM_skipped'] = 'Skipped'; + $lang['EM_processing_results'] = 'SQL Processing Results'; + $lang['EM_sql_attempted'] = 'The following SQL was attempted:'; + $lang['EM_all_lines_successfull'] = 'ALL LINES EXECUTED SUCCESSFULLY'; + $lang['EM_errors_detected'] = 'ERRORS DETECTED'; + $lang['EM_failed'] = 'FAILED'; + $lang['EM_line_results'] = 'The following is the result for each line of SQL executed.'; + $lang['EM_sql_error_explain'] = 'An error was encountered while processing the SQL commands. Further SQL processing has been halted. You may choose to complete the MOD installation anyway and perform the SQL commands manually yourself. However, at this point EM cannot guarantee the MOD will work correctly so you are best off seeking support from the Author before continuing further.'; + $lang['EM_sql_halted'] = 'SQL PROCESSING HALTED'; + $lang['EM_sql_process_error'] = 'SQL PROCESSING ERROR'; + $lang['EM_failed_line'] = 'The failed line was'; + $lang['EM_no_sql_preformed'] = 'No SQL alterations will be performed.</b> However, you may skip SQL processing, continue installing the MOD, and deal with the SQL manually'; + $lang['EM_following_error'] = 'The following error occured'; + $lang['EM_no_sql'] = 'No SQL to process. Click \'Complete Installation\' to proceed.'; + $lang['EM_notice'] = 'Notice'; + $lang['EM_urgent_warning'] = 'URGENT WARNING'; + $lang['EM_sql_drop_warning'] = 'SQL commands for dropping either a column or an entire table have been detected. Although these commands may be legitamate, you should double check that you want this. Dropping a table or column is irreversable. You are strongly urged to backup your database before proceeding even if the commands are legitamate!'; + $lang['EM_sql_msaccess_warning'] = 'You have a MS Access database. EM should perform most SQL properly for Access. However, when creating tables or adding columns there is no way to assign default values. You will have to do this manually in Access. Without default values, the MOD may not function as intended and the consequences could be severe. If you know how to automate this, be sure to contact us!'; + $lang['EM_experimental_explain'] = 'You have a %s database. Most likely EM isn\'t generating the SQL properly. The reason is simply because we don\'t know what it is supposed to look like. If you know what the SQL should look like, please let us know in <a href="%s" target="_sql">this topic</a>. Otherwise just expect that maybe this won\'t work so well ;-)'; + $lang['EM_database_alterations'] = 'Database Alterations'; + $lang['EM_tables_added'] = 'Tables Added'; + $lang['EM_tables_altered'] = 'Tables Altered'; + $lang['EM_rows_added'] = 'Rows Added'; // post process |
From: Brendan K. <bk...@us...> - 2005-05-30 20:19:21
|
Update of /cvsroot/easymod/easymod2/dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7887/dev Added Files: xml_to_array.php Log Message: Some XML to Array parsing code. One method is using a function, another, better method (IMO), is a class based approach using php xml functions. --- NEW FILE: xml_to_array.php --- <?php // // XML to Array // // get XML $XML_string = implode('', file('mod_template.xml')); /* // parse to array $results = XMLtoArray($XML); */ // parse to array $XML = new XMLtoArray(); $XML_array = $XML->parse($XML_string); // show array echo '<pre>'; var_dump($XML_array); echo '</pre>'; /* function XMLtoArray($XML) { $XML = str_replace('<', '<![CDATA[<]]>', $XML); $XML = str_replace('>', '<![CDATA[>]]>', $XML); $xml_parser = xml_parser_create(); xml_parse_into_struct($xml_parser, $XML, $vals); xml_parser_free($xml_parser); $_tmp = ''; foreach ($vals as $xml_elem) { $x_tag = $xml_elem['tag']; $x_level = $xml_elem['level']; $x_type = $xml_elem['type']; if(($x_level != 1) && ($x_type == 'close')) { if(isset($multi_key[$x_tag][$x_level])) { $multi_key[$x_tag][$x_level] = 1; } else { $multi_key[$x_tag][$x_level] = 0; } } if(($x_level != 1) && ($x_type == 'complete')) { if($_tmp == $x_tag) { $multi_key[$x_tag][$x_level] = 1; } $_tmp = $x_tag; } } foreach($vals as $xml_elem) { $x_tag = $xml_elem['tag']; $x_level = $xml_elem['level']; $x_type = $xml_elem['type']; if($x_type == 'open') { $level[$x_level] = $x_tag; } $start_level = 1; $php_stmt = '$xml_array'; if($x_type == 'close' && ($x_level != 1)) { $multi_key[$x_tag][$x_level]++; } while($start_level < $x_level) { $php_stmt .= '[$level[' . $start_level . ']]'; if((isset($multi_key[$level[$start_level]][$start_level])) && ($multi_key[$level[$start_level]][$start_level])) { $php_stmt .= '[' . ($multi_key[$level[$start_level]][$start_level]-1) . ']'; } $start_level++; } $add = ''; if((isset($multi_key[$x_tag][$x_level])) && ($multi_key[$x_tag][$x_level]) && ($x_type == 'open' || $x_type == 'complete')) { if(!isset($multi_key2[$x_tag][$x_level])) { $multi_key2[$x_tag][$x_level] = 0; } else { $multi_key2[$x_tag][$x_level]++; } $add = '[' . $multi_key2[$x_tag][$x_level] . ']'; } if((isset($xml_elem['value'])) && (trim($xml_elem['value']) != '') && (!array_key_exists('attributes',$xml_elem))) { if($x_type == 'open') { $php_stmt_main = $php_stmt . '[$x_type]' . $add . '[\'content\'] = $xml_elem[\'value\'];'; } else { $php_stmt_main = $php_stmt . '[$x_tag]' . $add . ' = $xml_elem[\'value\'];'; } eval($php_stmt_main); } if(array_key_exists('attributes',$xml_elem)) { if(isset($xml_elem['value'])) { $php_stmt_main = $php_stmt . '[$x_tag]' . $add . '[\'content\'] = $xml_elem[\'value\'];'; eval($php_stmt_main); } foreach($xml_elem['attributes'] as $key => $value) { $php_stmt_att = $php_stmt . '[$x_tag]'.$add.'[$key] = $value;'; eval($php_stmt_att); } } } return $xml_array; } // END XMLtoArray */ class XMLtoArray { var $output = array(); var $parser; var $XML; function parse($XML) { $this->parser = xml_parser_create(); xml_set_object($this->parser,$this); xml_set_element_handler($this->parser, "tag_open", "tag_closed"); xml_set_character_data_handler($this->parser, "tag_data"); $XML = str_replace('<', '<![CDATA[<]]>', $XML); $XML = str_replace('>', '<![CDATA[>]]>', $XML); $this->XML = xml_parse($this->parser,$XML ); if(!$this->XML) { die(sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($this->parser)), xml_get_current_line_number($this->parser))); } xml_parser_free($this->parser); return $this->output; } function tag_open($parser, $name, $attrs) { $tag = array("name" => $name, "attrs" => $attrs); array_push($this->output, $tag); } function tag_data($parser, $tag_data) { if(trim($tag_data)) { if(isset($this->output[count($this->output)-1]['data'])) { $this->output[count($this->output)-1]['data'] .= $tag_data; } else { $this->output[count($this->output)-1]['data'] = $tag_data; } } } function tag_closed($parser, $name) { $this->output[count($this->output)-2]['children'][] = $this->output[count($this->output)-1]; array_pop($this->output); } } ?> |
From: Eric F. <wg...@us...> - 2005-05-30 17:01:09
|
Update of /cvsroot/easymod/easymod2/dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31862/dev Added Files: mysql.php sql_template_parser.php Log Message: Mock-up of using a template for sql parsing --- NEW FILE: mysql.php --- <?php $tpl['create'] = 'CREATE TABLE {NAME} ( {COLUMNS} );'; $tpl['create_columns'] = '{NAME} {TYPE} ({LENGTH}) {SIGNED} {NULL} {DEFAULT} {INCREMENT}'; $tpl['create_key'] = 'KEY {COLUMN1} ({COLUMN2})'; $tpl['create_primary_key'] = 'PRIMARY KEY ({COLUMN})'; // // array( // 'mysql_type' => 'db_type'); // $types = array( 'varchar' => 'varchar', 'int' => 'int', 'text' => 'text'); ?> --- NEW FILE: sql_template_parser.php --- <?php if ( $_POST['submit'] ) { $sql = new em_sql_parser; $sql->load_sql_template(); $query = $sql->parse_sql($_POST['query']); echo 'The Query: '; vd($query); } else { ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <textarea name="query"><?php echo $_POST['query']; ?></textarea> <input type="submit" name="submit" value="Go" /> </form> <?php } class em_sql_parser { var $sql_tpls = array(); var $sql_types = array(); function load_sql_template() { global $phpbb_root_path, $phpEx; //$tpl_filename = $phpbb_root_path . 'admin/em_includes/schema/' . SQL_LAYER . '.' . $phpEx; $tpl_filename = 'mysql.php'; include($tpl_filename); $this->sql_tpls = $tpl; $this->sql_types = $types; return; } /* CREATE TABLE mytable ( FirstName varchar(40) NOT NULL DEFAULT '', `LastName` varchar(40), DateOfBirth int(11) NULL, `SSN` int(11) UNSIGNED DEFAULT '0' auto_increment, KEY DateOfBirth (DateOfBirth), PRIMARY KEY (SSN) ); ALTER TABLE `mytable` ADD nut_test int(8) NULL DEFAULT '0', abool tinyint(1) ; ALTER TABLE mytable ADD nut_test2 int(8) ; ALTER TABLE mytable MODIFY nut_test varchar(10) NULL DEFAULT '' auto_increment; ALTER TABLE mytable DROP nut_test ; DROP TABLE mytable; */ // // REQUIREMENTS // // - Each query end in ; // - Queries start out for MySQL // function parse_sql($query) { // explode the query so we can see whether it is CREATE, UPDATE, ALTER, etc $temp = explode(' ', $query); $type = $temp[0]; unset($temp); $parsed_query = ''; switch($type) { case 'CREATE': $parsed_query = $this->parse_sql_create($query); break; case 'ALTER': $parsed_query = $this->parse_sql_alter($query); break; // be careful with this case 'DROP': $parsed_query = $this->parse_sql_drop($query); break; // do these really need to be translated to other DB types? // maybe a separate case for DELETE so we can add extra precautions for it case 'INSERT': case 'UPDATE': case 'DELETE': $parsed_query = $query; break; } return $parsed_query; } function parse_sql_create($query) { preg_match('#CREATE TABLE (.*?) \((.*?)\);#s', $query, $matches); $parsed_query = str_replace('{NAME}', $matches[1], $this->sql_tpls['create']); $columns_array = explode(',', trim($matches[2])); $parsed_columns = array(); foreach($columns_array as $column) { //$column = str_replace(',', '', $column); $temp = explode(' ', trim($column)); // normal key if ( $temp[0] == 'KEY' ) { $temp[2] = str_replace('(', '', str_replace(')', '', $temp[2])); $parsed_columns[] = str_replace('{COLUMN1}', $temp[1], str_replace('{COLUMN2}', $temp[2], $this->sql_tpls['create_key'])); } // primary key else if ( $temp[0] == 'PRIMARY' ) { $temp[2] = str_replace('(', '', str_replace(')', '', $temp[2])); $parsed_columns[] = str_replace('{COLUMN}', $temp[2], $this->sql_tpls['create_primary_key']); } // normal column to create else { // this will require some work in order to figure out what is what on each line $parsed_columns[] = str_replace('`', '', stripslashes(trim($column))); } } $parsed_query = str_replace('{COLUMNS}', implode(",\n", $parsed_columns), $parsed_query); return $parsed_query; } function parse_sql_alter($query) { } function parse_sql_drop($query) { } } function vd($data) { echo '<pre>'; var_dump($data); echo '</pre>'; } ?> |
From: Jim W. <ter...@us...> - 2005-05-27 09:24:48
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32665/mods/easymod Modified Files: easymod_install.php Log Message: - Fixed bug #1204619 Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** easymod_install.php 25 May 2005 01:10:39 -0000 1.11 --- easymod_install.php 27 May 2005 09:24:26 -0000 1.12 *************** *** 227,231 **** if ( $rescan) { ! $install_step = 1 ; } --- 227,232 ---- if ( $rescan) { ! //$install_step = 1 ; ! display_step1b_idunno() ; } *************** *** 434,438 **** else if ( $option == 'idunno') { ! display_step1_substep_b() ; } else if ( $option == 'post_process') --- 435,439 ---- else if ( $option == 'idunno') { ! display_step1b_idunno() ; } else if ( $option == 'post_process') |
From: Jim W. <ter...@us...> - 2005-05-27 08:11:12
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17992/mods/easymod/includes Modified Files: admin_easymod.php.txt Log Message: - CREATE TABLE queries with INDEXes should now work. - Actions with IN-LINE as a substring now get reported as unprocessed commands as appropriate. - Fixed some random bug introduced in 1.7 of admin_easymod.php.txt. Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admin_easymod.php.txt 25 May 2005 01:10:50 -0000 1.9 --- admin_easymod.php.txt 27 May 2005 08:10:50 -0000 1.10 *************** *** 1563,1566 **** --- 1563,1567 ---- // a catch all at the end will switch to false if we fail to process $processed = true ; + $bad_command = false; // protect against malformed script that didn't perform a FIND first; this acts as a gatekeeper to ensure *************** *** 1794,1808 **** $result = perform_inline_add( $find_array, $file_list, $search_fragment, $body[$i][0], 'replace') ; } - - // strip off white space and get our search fragment (we already know it is not an empty string) ! if ($commands[$i]['command'] == 'IN-LINE FIND') { $search_fragment = trim($body[$i][0]) ; } // display any errors; if it was critical, terminate processing; if warn, remove file from list // the command will also close the files that we were writing ! else if ( handle_error( $result, $file_list, $commands[$i]['line'], true, $find_array)) { break ; --- 1795,1811 ---- $result = perform_inline_add( $find_array, $file_list, $search_fragment, $body[$i][0], 'replace') ; } // strip off white space and get our search fragment (we already know it is not an empty string) ! else if ($commands[$i]['command'] == 'IN-LINE FIND') { $search_fragment = trim($body[$i][0]) ; } + else + { + $bad_command = true; + } // display any errors; if it was critical, terminate processing; if warn, remove file from list // the command will also close the files that we were writing ! if ( handle_error( $result, $file_list, $commands[$i]['line'], true, $find_array)) { break ; *************** *** 2108,2116 **** $exec_close = true ; } // // where unloved commands go ;-) // ! else { $processed = false ; --- 2111,2123 ---- $exec_close = true ; } + else + { + $bad_command = true; + } // // where unloved commands go ;-) // ! if ($bad_command) { $processed = false ; *************** *** 2841,2845 **** // create the directory before moving files into it ! $command_file->modio_mkdirs_copy(dirname($parms[2])); // now the magic happens ;-) --- 2848,2857 ---- // create the directory before moving files into it ! // could be optimized such that modio_mkdirs_copy is only called once per ! // new directory, as opposed to once per original COPY action, but oh well... ! if ((substr($parms[1],0,9) != "processed") && (substr($parms[1],0,9) != "../../../")) ! { ! $command_file->modio_mkdirs_copy( substr(dirname($parms[2]),9).'/' ) ; ! } // now the magic happens ;-) |
From: Jim W. <ter...@us...> - 2005-05-27 08:11:11
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17992/mods/easymod/em_includes Modified Files: em_schema.php Log Message: - CREATE TABLE queries with INDEXes should now work. - Actions with IN-LINE as a substring now get reported as unprocessed commands as appropriate. - Fixed some random bug introduced in 1.7 of admin_easymod.php.txt. Index: em_schema.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_schema.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** em_schema.php 20 May 2005 23:39:31 -0000 1.5 --- em_schema.php 27 May 2005 08:10:50 -0000 1.6 *************** *** 263,266 **** --- 263,273 ---- */ + // KEY is normally a synonym for INDEX, as per the following link: + // http://dev.mysql.com/doc/mysql/en/create-table.html#id3038496 + if (strtoupper($name) == 'INDEX') + { + $name = 'KEY'; + } + // let's see if it's a key or primary key; if it's a malformed key, then the checks after this block should catch it if (((strtoupper($name) == 'KEY') || (strtoupper($name) == 'PRIMARY')) && ($type == 'undefined') && (!is_numeric( $length))) |
From: Eric F. <wg...@us...> - 2005-05-25 01:11:31
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3259/mods/easymod Modified Files: easymod_display_functions.php easymod_install.php Log Message: - Fixed bug #1188771 - Workaround for bug #1204617 , can't really fix this since we can't delete the directory - Other minor updates Index: easymod_display_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_display_functions.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** easymod_display_functions.php 18 May 2005 22:12:16 -0000 1.7 --- easymod_display_functions.php 25 May 2005 01:10:39 -0000 1.8 *************** *** 285,289 **** { // either copy or suggest FTP; never suggest exec b/c i don't want to explain it tp dumbasses ;-) ! $values['move_rec'] = (($access['root_write']) && ($access['copy_access'])) ? $lang['EM_move_copy'] : $lang['EM_move_ftp'] ; } --- 285,289 ---- { // either copy or suggest FTP; never suggest exec b/c i don't want to explain it tp dumbasses ;-) ! $values['move_rec'] = (($access['root_write']) && ($access['copy_access']) && ($can_write)) ? $lang['EM_move_copy'] : $lang['EM_move_ftp'] ; } Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** easymod_install.php 22 May 2005 00:29:36 -0000 1.10 --- easymod_install.php 25 May 2005 01:10:39 -0000 1.11 *************** *** 375,379 **** else if ( $install_step == 1) { ! $install_style = (isset($HTTP_GET_VARS['setup'])) ? ($HTTP_GET_VARS['setup'] == 'advanced') ? 'advanced' : 'simple' : 'simple' ; $substep = (isset($HTTP_POST_VARS['substep'])) ? htmlspecialchars( $HTTP_POST_VARS['substep']) : '' ; if ($substep != 'a' && $substep != 'b' && $substep != 'c') --- 375,379 ---- else if ( $install_step == 1) { ! $install_style = ( ( isset($HTTP_GET_VARS['setup']) && $HTTP_GET_VARS['setup'] == 'advanced' ) || ( isset($HTTP_POST_VARS['setup']) && $HTTP_POST_VARS['setup'] == 'advanced' ) ) ? 'advanced' : 'simple'; $substep = (isset($HTTP_POST_VARS['substep'])) ? htmlspecialchars( $HTTP_POST_VARS['substep']) : '' ; if ($substep != 'a' && $substep != 'b' && $substep != 'c') |
From: Eric F. <wg...@us...> - 2005-05-25 01:11:11
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3259/mods/easymod/includes Modified Files: admin_easymod.php.txt mod_settings.tpl Log Message: - Fixed bug #1188771 - Workaround for bug #1204617 , can't really fix this since we can't delete the directory - Other minor updates Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_easymod.php.txt 9 May 2005 22:40:52 -0000 1.8 --- admin_easymod.php.txt 25 May 2005 01:10:50 -0000 1.9 *************** *** 907,911 **** 'FTP_USER' => $command_file->ftp_user, ! 'FTP_PASS' => $command_file->ftp_pass, 'FTP_PATH' => $command_file->ftp_path, 'FTP_HOST' => $command_file->ftp_host, --- 907,911 ---- 'FTP_USER' => $command_file->ftp_user, ! 'FTP_PASS' => '', // don't send FTP password to page, is unsecure $command_file->ftp_pass, 'FTP_PATH' => $command_file->ftp_path, 'FTP_HOST' => $command_file->ftp_host, *************** *** 938,942 **** // ftp settings $ftp_user = (isset($HTTP_POST_VARS['ftp_user'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_user']) : '' ; ! $ftp_pass = (isset($HTTP_POST_VARS['ftp_pass'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_pass']) : '' ; $ftp_host = (isset($HTTP_POST_VARS['ftp_host'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_host']) : '' ; $ftp_port = (isset($HTTP_POST_VARS['ftp_port'])) ? intval( $HTTP_POST_VARS['ftp_port']) : 0 ; --- 938,942 ---- // ftp settings $ftp_user = (isset($HTTP_POST_VARS['ftp_user'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_user']) : '' ; ! $ftp_pass = (isset($HTTP_POST_VARS['ftp_pass']) && !empty($HTTP_POST_VARS['ftp_pass'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_pass']) : $command_file->ftp_pass ; $ftp_host = (isset($HTTP_POST_VARS['ftp_host'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_host']) : '' ; $ftp_port = (isset($HTTP_POST_VARS['ftp_port'])) ? intval( $HTTP_POST_VARS['ftp_port']) : 0 ; *************** *** 946,949 **** --- 946,952 ---- $ftp_dir == ( $ftp_dir == '') ? '/' : $ftp_dir ; + // if user is removing ftp server, then remove the password as well + $ftp_pass = ( !empty($ftp_host) ) ? $ftp_pass : ''; + // confirm passwords match and update pw if needed Index: mod_settings.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/mod_settings.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mod_settings.tpl 1 May 2005 07:22:50 -0000 1.2 --- mod_settings.tpl 25 May 2005 01:10:51 -0000 1.3 *************** *** 12,20 **** <tr> <td class="row1" align="right"><span class="gen">{L_PW_SET}</span></td> ! <td class="row2"><input type="password" name="em_pass" value="{EM_PASS}"></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_PW_CONFIRM}</span></td> ! <td class="row2"><input type="password" name="em_pass_confirm" value=""></td> </tr> <tr> --- 12,20 ---- <tr> <td class="row1" align="right"><span class="gen">{L_PW_SET}</span></td> ! <td class="row2"><input type="password" name="em_pass" value="{EM_PASS}" /></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_PW_CONFIRM}</span></td> ! <td class="row2"><input type="password" name="em_pass_confirm" value="" /></td> </tr> <tr> *************** *** 46,72 **** <tr> <td class="row1" align="right"><span class="gen">{L_FTP_DIR}</span></td> ! <td class="row2"><input type="text" name="ftp_dir" value="{FTP_PATH}"> (ex: public_html/phpBB2)</td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_USER}</span></td> ! <td class="row2"><input type="text" name="ftp_user" value="{FTP_USER}"></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_PASS}</span></td> ! <td class="row2"><input type="password" name="ftp_pass" value="{FTP_PASS}"></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_HOST}</span></td> ! <td class="row2"><input type="text" name="ftp_host" value="{FTP_HOST}"></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_PORT}</span></td> ! <td class="row2"><input type="text" size="5" maxlength="5" name="ftp_port" value="{FTP_PORT}"></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_EXT}</span></td> <td class="row2"> ! <input type="radio" name="ftp_type" value="ext" {FTP_EXT}><span class="gen">{L_YES}</span> ! <input type="radio" name="ftp_type" value="fsock" {FTP_FSOCK}>{L_NO}</span> <span class="gen">{L_FTP_EXT_WARN}</span> </td> </tr> --- 46,72 ---- <tr> <td class="row1" align="right"><span class="gen">{L_FTP_DIR}</span></td> ! <td class="row2"><input type="text" name="ftp_dir" value="{FTP_PATH}" /> (ex: public_html/phpBB2)</td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_USER}</span></td> ! <td class="row2"><input type="text" name="ftp_user" value="{FTP_USER}" /></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_PASS}</span></td> ! <td class="row2"><input type="password" name="ftp_pass" value="{FTP_PASS}" /> Only supply if you want to change it</td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_HOST}</span></td> ! <td class="row2"><input type="text" name="ftp_host" value="{FTP_HOST}" /></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_PORT}</span></td> ! <td class="row2"><input type="text" size="5" maxlength="5" name="ftp_port" value="{FTP_PORT}" /></td> </tr> <tr> <td class="row1" align="right"><span class="gen">{L_FTP_EXT}</span></td> <td class="row2"> ! <input type="radio" name="ftp_type" value="ext" {FTP_EXT} /><span class="gen">{L_YES}</span> ! <input type="radio" name="ftp_type" value="fsock" {FTP_FSOCK} />{L_NO}</span> <span class="gen">{L_FTP_EXT_WARN}</span> </td> </tr> *************** *** 74,79 **** <td class="row1" align="right"><span class="gen">{L_FTP_CACHE}</span></td> <td class="row2"> ! <input type="radio" name="ftp_cache" value="ext" {FTP_CACHE_YES}><span class="gen">{L_YES}</span> ! <input type="radio" name="ftp_cache" value="fsock" {FTP_CACHE_NO}>{L_NO}</span> <span class="gen">{L_FTP_EXT_WARN}</span> </td> </tr> --- 74,79 ---- <td class="row1" align="right"><span class="gen">{L_FTP_CACHE}</span></td> <td class="row2"> ! <input type="radio" name="ftp_cache" value="ext" {FTP_CACHE_YES} /><span class="gen">{L_YES}</span> ! <input type="radio" name="ftp_cache" value="fsock" {FTP_CACHE_NO} />{L_NO}</span> <span class="gen">{L_FTP_EXT_WARN}</span> </td> </tr> *************** *** 87,95 **** <tr> <td class="row1" align="right"><span class="gen">{L_EM_VERSION}</span></td> ! <td class="row2"><input type="text" name="em_version" value="{EM_VERSION}"></td> </tr> <tr> <td class="catbottom" align="center" colspan="2"> ! <input type="hidden" name="mode" value="{MODE}"> <input class="mainoption" type="submit" value="{L_SUBMIT}" /> </td> --- 87,95 ---- <tr> <td class="row1" align="right"><span class="gen">{L_EM_VERSION}</span></td> ! <td class="row2"><input type="text" name="em_version" value="{EM_VERSION}" /></td> </tr> <tr> <td class="catbottom" align="center" colspan="2"> ! <input type="hidden" name="mode" value="{MODE}" /> <input class="mainoption" type="submit" value="{L_SUBMIT}" /> </td> |
From: Eric F. <wg...@us...> - 2005-05-25 01:11:00
|
Update of /cvsroot/easymod/easymod2/mods/easymod/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3259/mods/easymod/templates Modified Files: step1_classic.tpl Log Message: - Fixed bug #1188771 - Workaround for bug #1204617 , can't really fix this since we can't delete the directory - Other minor updates Index: step1_classic.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/templates/step1_classic.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** step1_classic.tpl 24 Apr 2005 14:59:53 -0000 1.1 --- step1_classic.tpl 25 May 2005 01:10:51 -0000 1.2 *************** *** 62,69 **** <!-- HIDDEN ACCESS --> ! <input type="hidden" name="sel_read" value="server"> ! <input type="hidden" name="install_step" value="2"> <input class="mainoption" type="submit" value="{{Submit}}" /> ! <input class="mainoption" type="submit" value="{{Rescan}}" name="rescan"/> </td> </tr> --- 62,70 ---- <!-- HIDDEN ACCESS --> ! <input type="hidden" name="sel_read" value="server" /> ! <input type="hidden" name="install_step" value="2" /> ! <input type="hidden" name="setup" value="advanced" /> <input class="mainoption" type="submit" value="{{Submit}}" /> ! <input class="mainoption" type="submit" value="{{Rescan}}" name="rescan" /> </td> </tr> |
From: Eric F. <wg...@us...> - 2005-05-25 01:10:59
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3259/mods/easymod/em_includes Modified Files: em_functions.php Log Message: - Fixed bug #1188771 - Workaround for bug #1204617 , can't really fix this since we can't delete the directory - Other minor updates Index: em_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_functions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** em_functions.php 22 May 2005 00:29:37 -0000 1.3 --- em_functions.php 25 May 2005 01:10:41 -0000 1.4 *************** *** 806,810 **** // assume the EM_test.txt file exists; now see if we can unlink (delete) it ! if ( unlink( 'EM_test.txt')) { $access_msg = 'OK' ; --- 806,810 ---- // assume the EM_test.txt file exists; now see if we can unlink (delete) it ! if ( unlink('EM_test.txt') ) { $access_msg = 'OK' ; *************** *** 822,829 **** function check_access_mkdir( &$access_msg) { ! global $lang ; // check for server mkdir access ! if ( mkdir( 'EM_test_dir', 0777)) { // clean up! --- 822,839 ---- function check_access_mkdir( &$access_msg) { ! global $lang, $phpbb_root_path, $script_path, $phpEx ; ! ! if ( file_exists('EM_test_dir') ) ! { ! if ( !rmdir('EM_test_dir') ) ! { ! // we can't remove the file but it has been created so we'll assume we have mkdir access ! $access_msg = 'OK'; ! return true; ! } ! } // check for server mkdir access ! if ( mkdir( 'EM_test_dir', 0777) ) { // clean up! |
From: Brendan K. <bk...@us...> - 2005-05-22 00:30:17
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26146/easymod/em_includes Modified Files: em_cipher.php em_functions.php Log Message: Fixing an encoding issue with Postgre Index: em_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_functions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** em_functions.php 1 May 2005 07:22:01 -0000 1.2 --- em_functions.php 22 May 2005 00:29:37 -0000 1.3 *************** *** 1026,1029 **** --- 1026,1033 ---- echo sprintf( $lang['EM_err_insert'], $config_name) . "<br>\n" ; echo "sql=[" . htmlspecialchars($sql) . "]<br>\n" ; + // Debugging + $sql_error = $db->sql_error(); + echo $sql_error['message']; + exit ; } *************** *** 1046,1049 **** --- 1050,1057 ---- echo sprintf( $lang['EM_err_update'], $config_name) . "<br>\n" ; echo "sql=[" . htmlspecialchars($sql) . "]<br>\n" ; + // Debugging + $sql_error = $db->sql_error(); + echo $sql_error['message']; + exit ; } Index: em_cipher.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_cipher.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_cipher.php 24 Apr 2005 14:59:53 -0000 1.1 --- em_cipher.php 22 May 2005 00:29:37 -0000 1.2 *************** *** 574,577 **** --- 574,581 ---- // all just so the string is formed properly and what actually gets stored in the DB is "single'quote". The // same is true for any slashes that get added. The slashes won't actually show up when viewing the DB ;-) + + // change encoding for storage (postgres problems) + $encrypted = utf8_encode($encrypted); + return $encrypted ; } *************** *** 581,584 **** --- 585,591 ---- function decrypt($ciphertext) { + // decode for use (postgres storage problems) + $ciphertext = utf8_decode($ciphertext); + // TAKE TWO: the way General Config settings work in phpBB, this isn't sufficient, get rid of the ' all together $ciphertext = str_replace( 'NUTTICK', "'", $ciphertext) ; *************** *** 603,606 **** --- 610,614 ---- // added by nuttzy, we need strip off the extra characters we added $decrypted = substr( $decrypted, 0, strlen($decrypted) - strlen($this->filler)) ; + return $decrypted; } |
From: Brendan K. <bk...@us...> - 2005-05-22 00:29:59
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26146/easymod Modified Files: easymod_install.php Log Message: Fixing an encoding issue with Postgre Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** easymod_install.php 20 May 2005 23:50:06 -0000 1.9 --- easymod_install.php 22 May 2005 00:29:36 -0000 1.10 *************** *** 1778,1782 **** $cipher->blowfish->setKey( $em_pass); $ftp_cipher = $cipher->encrypt($ftp_pass) ; ! // if not, add the fields if ( $rows == 0) --- 1778,1782 ---- $cipher->blowfish->setKey( $em_pass); $ftp_cipher = $cipher->encrypt($ftp_pass) ; ! // if not, add the fields if ( $rows == 0) |
From: Brendan K. <bk...@us...> - 2005-05-20 23:50:17
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31651/easymod/includes Removed Files: EM_Version_Changer_1-3.zip Log Message: Forgot a MySQLi case in the install, and also getting rid of the version changer, as theres no need for it now. --- EM_Version_Changer_1-3.zip DELETED --- |
From: Brendan K. <bk...@us...> - 2005-05-20 23:50:17
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31651/easymod Modified Files: easymod_install.php Log Message: Forgot a MySQLi case in the install, and also getting rid of the version changer, as theres no need for it now. Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** easymod_install.php 6 May 2005 22:23:44 -0000 1.8 --- easymod_install.php 20 May 2005 23:50:06 -0000 1.9 *************** *** 999,1002 **** --- 999,1003 ---- { case 'mysql': + case 'mysqli': case 'mysql4': $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( |
From: Brendan K. <bk...@us...> - 2005-05-20 23:39:41
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30118/easymod/em_includes Modified Files: em_schema.php Log Message: Just adding a couple of case checks to support MySQLi Index: em_schema.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_schema.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** em_schema.php 20 May 2005 23:28:51 -0000 1.4 --- em_schema.php 20 May 2005 23:39:31 -0000 1.5 *************** *** 708,711 **** --- 708,712 ---- { case 'mysql': + case 'mysqli': case 'mysql4': // the beauty of using pseudo mySQL is that these everything is mySQL complaint without change ;-) *************** *** 748,751 **** --- 749,753 ---- { case 'mysql': + case 'mysqli': case 'mysql4': $sql_line = $formatted_line ; |
From: Brendan K. <bk...@us...> - 2005-05-20 23:29:00
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27814/easymod/em_includes Modified Files: em_schema.php Log Message: Fixing auto increment and default conflict with the SQL Index: em_schema.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_schema.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** em_schema.php 1 May 2005 12:23:18 -0000 1.3 --- em_schema.php 20 May 2005 23:28:51 -0000 1.4 *************** *** 700,703 **** --- 700,707 ---- { $len = ($params['length'] == '') ? '' : ('(' . $params['length'] . ')') ; + if( $params['increment'] != '' ) + { + $params['default'] = $params['def_val'] = ''; + } $mysql_line = $params['name'] . ' ' . $params['type'] . $len . ' ' . $params['signed'] . ' ' . $params['null'] . ' ' . $params['default'] . ' ' . $params['def_val'] . ' ' . $params['increment'] ; switch ( DB_TYPE ) |
From: Eric F. <wg...@us...> - 2005-05-18 22:12:28
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17871/mods/easymod Modified Files: easymod_display_functions.php Log Message: - Changed line endings, I'll be using Linux now so I can't use Window's line endings. Change it if you notice it isn't Linux. - Fixed bug, http://area51.phpbb.com/phpBB/viewtopic.php?sid=&f=22&t=19845 Index: easymod_display_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_display_functions.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** easymod_display_functions.php 6 May 2005 21:24:10 -0000 1.6 --- easymod_display_functions.php 18 May 2005 22:12:16 -0000 1.7 *************** *** 472,480 **** // check for server unlink access $access['unlink_access'] = check_access_unlink( $access_msg) ; ! $variables['ACCESS_UNLINK'] = ($access['copy_access']) ? $ok_msg : $no_msg ; // check for server mkdir access $access['mkdir_access'] = check_access_mkdir( $access_msg) ; ! $variables['ACCESS_MKDIR'] = ($access['copy_access']) ? $ok_msg : $no_msg ; } --- 472,480 ---- // check for server unlink access $access['unlink_access'] = check_access_unlink( $access_msg) ; ! $variables['ACCESS_UNLINK'] = ($access['unlink_access']) ? $ok_msg : $no_msg ; // check for server mkdir access $access['mkdir_access'] = check_access_mkdir( $access_msg) ; ! $variables['ACCESS_MKDIR'] = ($access['mkdir_access']) ? $ok_msg : $no_msg ; } |
From: Eric F. <wg...@us...> - 2005-05-15 01:34:13
|
Update of /cvsroot/easymod/easymod2/dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25967/dev Added Files: functions_xml.php mod_template.xml Log Message: XML MOD Template Parser. Needs some minor work but the bulk of it is there. --- NEW FILE: mod_template.xml --- <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!--?xml-stylesheet type="text/xsl" href="english.subsilver.xsl"?--> <mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <header> <title lang="en">Country Flags</title> <description lang="en">This mod allows your registered board members to select the flag of their country. Their flag will then display thoughout the phpBB system.</description> <author-notes lang="en">This MOD is not to be listed, downloaded or posted at -any- site except Official phpBB Web Sites. Thank You. JbA</author-notes> <!-- multiple authors are easy --> <author realname="nuttzy" email="pkt...@bl..." username="Nuttzy99" homepage="http://www.blizzhackers.com" /> <author realname="John B. Abela" email="ab...@4c..." username="abelajohnb" homepage="N/A" /> <!-- breaking the MOD version up into it's components allows for flexibility, while still enforcing an absolute standard --> <mod-version> <major>2</major> <minor>2</minor> <revision>2</revision> <release>a</release> </mod-version> <installation> <level>Easy</level> <time>2820</time> <target-version> <!-- Even though we have the components, they can be split up, also, as we plan to support Beta 1, a text field thats for show purposes only seems necessary, as it may not always be possible to grab a single designed for version --> <target-primary>3.0.0 Beta 1</target-primary> <target-major allow="exact">3</target-major> <target-minor allow="exact">0</target-minor> <target-revision allow="after">0</target-revision> <!-- this is just so the xsd creates this field, this just effectively locks out all letter releases, not something we really want in practice, but the field may be useful, and thus future-proofing the template --> <target-release allow="exact"></target-release> </target-version> <easymod-compliant>false</easymod-compliant> <mod-config>config.modcfg</mod-config> </installation> <history> <revision> <date>2004-07-26T00:00:00.0000000+10:00</date> <version>2.2.2</version> <change>eliminated flags.sql file</change> </revision> <revision> <date>2003-02-20T00:00:00.0000000+10:00</date> <version>2.2.0</version> <change>updated for phpBB 2.0.4</change> <change>added admin tools to edit/add/remove flags</change> </revision> </history> <!-- why have meta, why not? it just allows for organised information to be stored that an author or application could put in to indicate various aspects of the MOD --> <meta name="generator" content="MOD Studio sharp 4, beta 1 with mod functions sharp 2" /> </header> <action-group> <sql> ALTER TABLE phpbb_users ADD user_from_flag varchar(25) NULL AFTER user_from; CREATE TABLE phpbb_flags ( flag_id int(10) NOT NULL auto_increment, flag_name varchar(25), flag_image varchar(25), PRIMARY KEY (flag_id) ); INSERT INTO phpbb_flags (flag_id, flag_name, flag_image) VALUES ('','usa','usa.gif'); INSERT INTO phpbb_flags (flag_id, flag_name, flag_image) VALUES ('','afghanistan','afghanistan.gif'); INSERT INTO phpbb_flags (flag_id, flag_name, flag_image) VALUES ('','albania','albania.gif'); INSERT INTO phpbb_flags (flag_id, flag_name, flag_image) VALUES ('','algeria','algeria.gif'); INSERT INTO phpbb_flags (flag_id, flag_name, flag_image) VALUES ('','andorra','andorra.gif'); INSERT INTO phpbb_flags (flag_id, flag_name, flag_image) VALUES ('','angola','angola.gif'); INSERT INTO phpbb_flags (flag_id, flag_name, flag_image) VALUES ('','antigua and barbuda','antiguabarbuda.gif'); INSERT INTO phpbb_flags (flag_id, flag_name, flag_image) VALUES ('','argentina','argentina.gif'); INSERT INTO phpbb_flags (flag_id, flag_name, flag_image) VALUES ('','armenia','armenia.gif'); INSERT INTO phpbb_flags (flag_id, flag_name, flag_image) VALUES ('','australia','australia.gif'); </sql> <copy from="flags/*.*" to = "images/flag/*.*" /> <copy from="admin_flags.php.txt" to="admin/admin_flags.php" /> <copy from="flages_list_body.tpl.txt" to="templates/subSilver/admin/flags_list_body.tpl" /> <copy from="flags_edit_body.tpl.txt" to="templates/subSilver/admin/flags_edit_body.tpl" /> <open file="includes/constants.php"> <edit> <find> define('VOTE_USERS_TABLE', $table_prefix.'vote_voters'); </find> <action type="before-add"> // before </action> <action type="after-add"> // FLAGHACK-start define('FLAG_TABLE', $table_prefix.'flags'); // FLAGHACK-end </action> </edit> </open> <open file="includes/usercp_viewprofile.php"> <edit> <find> $pm_img = '<a href=" </find> <action type="after-add"> // FLAGHACK-start $location = ( $profiledata['user_from'] ) ? $profiledata['user_from'] : '&nbsp;' ; $flag = ( !empty($profiledata['user_from_flag']) ) ? "&nbsp;<img src=\"images/flags/" . $profiledata['user_from_flag'] . "\" alt=\"" . $profiledata['user_from_flag'] . "\">" : ""; $location .= $flag ; // FLAGHACK-end </action> </edit> <edit> <find> 'LOCATION' => </find> <action type="replace-with"> // FLAGHACK-start 'LOCATION' => $location, // FLAGHACK-endd </action> </edit> <edit> <find> $user_timezone = ( </find> <action type="after-add"> // FLAGHACK-start $user_flag = ( !empty($HTTP_POST_VARS['user_flag']) ) ? $HTTP_POST_VARS['user_flag'] : '' ; // FLAGHACK-end </action> </edit> <edit> <find> $sql = "UPDATE " . USERS_TABLE . " user_from = '" . str_replace("\'", "''", $location) . "', </find> <inline-edit> <inline-find> user_from = '" . str_replace("\'", "''", $location) . "', </inline-find> <inline-action type="after-add"> user_from_flag = '$user_flag', </inline-action> </inline-edit> </edit> <edit> <find> $sql = "INSERT INTO " . USERS_TABLE VALUES ( </find> <inline-edit> <inline-find> user_from, </inline-find> <inline-action type="after-add"> user_from_flag, </inline-action> </inline-edit> </edit> <edit> <find> $sql = "INSERT INTO " . USERS_TABLE VALUES ( </find> <inline-edit> <inline-find> '" . str_replace("\'", "''", $location) . "', </inline-find> <inline-action type="after-add"> '$user_flag', </inline-action> </inline-edit> </edit> <edit> <find> $location = $userdata['user_from']; </find> <action type="after-add"> // FLAGHACK-start $user_flag = $userdata['user_from_flag']; // FLAGHACK-end </action> </edit> <edit> <find type="regex"> display_avatar_gallery( </find> <inline-edit> <inline-find> $location, </inline-find> <inline-action type="after-add"> $user_flag, </inline-action> </inline-edit> <inline-edit> <inline-find type="regex"> [a-z]{9} </inline-find> <inline-action type="operation">{0}++</inline-action> </inline-edit> <inline-edit> <inline-find type="regex"> [0-9] </inline-find> <inline-action type="operation">{0}--</inline-action> </inline-edit> </edit> <edit> <find> if ( $mode == 'editprofile' ) { $template->assign_block_vars('switch_edit_profile', array()); } </find> <action type="after-add"> // FLAGHACK-start // query to get the list of flags $sql = "SELECT * FROM " . FLAG_TABLE . " ORDER BY flag_id"; if(!$flags_result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, "Couldn't obtain flags information.", "", __LINE__, __FILE__, $sql); } $flag_row = $db->sql_fetchrowset($ranksresult); $num_flags = $db->sql_numrows($ranksresult) ; // build the html select statement $flag_start_image = 'blank.gif' ; $selected = ( isset($user_flag) ) ? '' : ' selected="selected"' ; $flag_select = "<select name=\"user_flag\" onChange=\"document.images['user_flag'].src = 'images/flags/' + this.value;\" >"; $flag_select .= "<option value=\"blank.gif\"$selected>" . $lang['Select_Country'] . "</option>"; for ($i = 0; $i < $num_flags; $i++) { $flag_name = $flag_row[$i]['flag_name']; $flag_image = $flag_row[$i]['flag_image']; $selected = ( isset( $user_flag) ) ? (($user_flag == $flag_image) ? 'selected="selected"' : '' ) : '' ; $flag_select .= "\t<option value=\"$flag_image\"$selected>$flag_name</option>"; if ( isset( $user_flag) && ($user_flag == $flag_image)) { $flag_start_image = $flag_image ; } } $flag_select .= '</select>'; // FLAGHACK-end </action> </edit> <edit> <find> 'LOCATION' => $location, </find> <comment lang="en">This comment comes after the find.</comment> <action type="after-add"> // FLAGHACK-start 'L_FLAG' => $lang['Country_Flag'], 'FLAG_SELECT' => $flag_select, 'FLAG_START' => $flag_start_image, // FLAGHACK-end </action> <comment lang="en">This comment comes after the edit action.</comment> </edit> </open> <diy-instructions lang="en">Hop on one leg and do a rain dance. If you do it right the MOD may work for you. However on tuesdays you must bow down to the sungod and give him special berries, from the tallest berry tree on the planet pluto, 9th from the Hyrogen sun.</diy-instructions> </action-group> </mod> --- NEW FILE: functions_xml.php --- <?php $mod_parser = new xml_mod_parser; $results = $mod_parser->parse_file('mod_template.xml'); echo '<pre>'; var_dump($results); echo '</pre>'; // getting even lower level data lookup. soon we'll be parsing xml. wait... wait? we are! class xml_mod_parser { var $data; var $handlers = array(); function parse_file($filename,$options = false) { $data = implode('', file($filename)); $data = str_replace('&', '{AMPERSTAND}', $data); if (preg_match('#[\s]*<\?xml[^>]+encoding="([a-zA-Z0-9_\- ]+)"#si', $data, $matches)) { $encoding = $matches[1]; $xml_parser = xml_parser_create(strtoupper($encoding)); xml_parser_set_option($xml_parser, XML_OPTION_TARGET_ENCODING, 'ISO-8859-1'); } else { $xml_parser = xml_parser_create(); } xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($xml_parser, XML_OPTION_SKIP_WHITE, 1); xml_parse_into_struct($xml_parser, $data, $values, $tags); xml_parser_free($xml_parser); $this->parse($values,$options,$filename); return $this->export(); } function parse($values,$options = false,$filename = '') { $this->clear_data(); if ( !empty($options) && !is_array($options) ) { $options = array($options); } $mod = array_shift($values); if ( handler::typecheck($mod,'mod','open') ) { while ( $set = array_shift($values) ) { $tag = str_replace('-', '_', $set['tag']); $handler = $tag . '_handler'; if ( (!$options || in_array($tag,$options) ) && class_exists($handler) ) { if ( !isset($this->handlers[$handler]) ) { $this->handlers[$handler] = new $handler; } $this->data[$tag] = call_user_func_array(array(&$this->handlers[$handler],'parse'),array(&$values,$set,$filename)); } else if ( handler::typecheck($set,'mod','close') ) { break; } else { if ( !isset($this->handlers['default']) ) { $this->handlers['default'] = new handler; } // if we're just skipping parsing this one, we can pass it to an empty handler if ( true || class_exists($handler) ) { $this->data[$tag][] = call_user_func_array(array(&$this->handlers['default'],'parse'),array(&$values,$set,$filename)); } // handler::parse_error('mod',$set,__LINE__,"No handler defined for this tag",$filename); } } } // foreach passes by value, less efficient @reset($this->data); while ( list($tag,) = each($this->data) ) { $handler = $tag . '_handler'; $handler = isset($this->handlers[$handler]) ? $handler : 'default'; $this->data[$tag] = call_user_func_array(array(&$this->handlers[$handler],'process'),array($this->data[$tag])); } } function export() { return $this->data; } function clear_data() { $this->data = array(); } } class handler { function parse(&$values,$tag,$filename) { $tagname = $tag['tag']; if ( $tag['type'] == 'complete' ) { return array($tagname , $tag['type'], 'unparsed'); } while ( $tag = array_shift($values) ) { switch( true ) { case $this->typecheck($tag,$tagname,'close'): return array($tagname , $tag['type'], 'unparsed'); break; default: break; } } } function process($data) { return count($data); } function parse_error($area,$bad_data,$line = 0,$message='',$filename='') { printf('Error parsing XML Document in %s%s<br />',$area,$line?sprintf(' on line %d%s',$line,!empty($filename)?sprintf(' for file %s',$filename):''):''); print('<pre>'); if (!empty($message) ) print $message . "\n"; var_dump($bad_data); print "\n\n\n\n"; global $mod_parser; var_dump($mod_parser); print('</pre>'); die(); } function typecheck($tag,$names,$types) { if ( !is_array($names) ) { $names = array($names); } if ( !is_array($types) ) { $types = array($types); } // printf('Typecheck: %s vs %s, %s vs %s<br />',$tag['tag'],$name,$tag['type'],$type); return ( in_array($tag['tag'],$names) && in_array($tag['type'],$types) ); } function parse_bool($value,$attr_name = '',$line = 0,$filename = '') { switch($value) { case "1": case "true": return true; break; case "0": case "false": return false; break; default: $message = sprintf('Invalid boolean value "%s"',$value); if ( !empty($attr_name) ) { $message .= sprintf(' for attribute "%s"',$attr_name); } if ( $line ) { $message .= sprintf(' on line %d',$line); } $this->parse_error(__CLASS__,$attributes['dynamic'],$line,$message,$filename); break; } } } // handles the header xml tags class header_handler extends handler { function parse(&$values, $tag, $filename = '') { $result = array(); $valid_keys = array('title', 'description', 'mod_version', 'author-notes'); $valid_loops = array('meta', 'author'); $valid_open = array('mod-version', 'installation', 'history'); while ( $tag = array_shift($values) ) { $tagname = $tag['tag']; switch ( true ) { case $this->typecheck($tag, 'header', 'close'): { return $result; } break; case $this->typecheck($tag, $valid_keys, 'complete'): { $result[$tagname] = $tag['value']; } break; case $this->typecheck($tag, $valid_loops, 'complete'): { $result[$tagname][] = $tag['attributes']; } break; case $this->typecheck($tag, $valid_open, 'open'); { $handler = str_replace('-', '_', $tagname) . '_handler'; if ( class_exists($handler) ) { if ( !isset($this->handlers[$handler]) ) { $this->handlers[$handler] = new $handler; } $result[$tagname] = call_user_func_array(array(&$this->handlers[$handler],'parse'),array(&$values,$tag,$filename)); } else { if ( !isset($this->handlers['default']) ) { $this->handlers['default'] = new handler; } // if we're just skipping parsing this one, we can pass it to an empty handler if ( true || class_exists($handler) ) { $result[$tagname][] = call_user_func_array(array(&$this->handlers['default'],'parse'),array(&$values,$tag,$filename)); } } } break; default: { $this->parse_error(__CLASS__,$tag,__LINE__,"Invalid tag",$filename); } break; } } } function process($data) { return $data; } } // handles xml tags in the header and mod-version class mod_version_handler extends handler { function parse(&$values,$tag,$filename = '') { $result = array(); $valid_keys = array('major', 'minor', 'revision', 'release'); while ( $tag = array_shift($values) ) { $tagname = $tag['tag']; switch ( true ) { case $this->typecheck($tag,'mod-version','close'): { return $result; } break; case $this->typecheck($tag, $valid_keys, 'complete'): { $result[$tagname] = $tag['value']; } break; default: { $result[$tagname] = $tag['value']; } break; } } } function process($data) { return $data; } } // handles tags in the header and installation class installation_handler extends handler { function parse(&$values,$tag,$filename = '') { $result = array(); $valid_keys = array('level', 'time', 'target-primary', 'target-major', 'target-minor', 'target-revision', 'target-release', 'easymod-compliant', 'mod-config'); $valid_open = array('target-version'); while ( $tag = array_shift($values) ) { $tagname = $tag['tag']; switch ( true ) { case $this->typecheck($tag,'installation','close'): { return $result; } break; case $this->typecheck($tag, $valid_keys, 'complete'): { if ( empty($current_tag) ) { $result[$tagname] = $tag['value']; } else { $result[$current_tag][$tagname] = $tag['value']; } } break; case $this->typecheck($tag, $valid_open, 'open'): { $current_tag = $tagname; } break; case $this->typecheck($tag, $valid_open, 'close'): { $current_tag = ''; } break; default: { $result[$tagname] = $tag['value']; } break; } } } function process($data) { return $data; } } // handles tags in the header and history class history_handler extends handler { function parse(&$values,$tag,$filename = '') { $result = array(); $valid_keys = array('date', 'version'); $valid_loops = array('change'); $valid_open = array('revision'); $i = 0; while ( $tag = array_shift($values) ) { $tagname = $tag['tag']; switch ( true ) { case $this->typecheck($tag,'history','close'): { return $result; } break; case $this->typecheck($tag, $valid_keys, 'complete'): { if ( empty($current_tag) ) { $result[$tagname] = $tag['value']; } else { $result[$current_tag][$i][$tagname] = $tag['value']; } } break; case $this->typecheck($tag, $valid_loops, 'complete'): { if ( empty($current_tag) ) { $result[$tagname][] = $tag['value']; } else { $result[$current_tag][$i][$tagname][] = $tag['value']; } } break; case $this->typecheck($tag, $valid_open, 'open'): { $current_tag = $tagname; } break; case $this->typecheck($tag, $valid_open, 'close'): { $current_tag = ''; $i++; } break; default: { $result[$tagname] = $tag['value']; } break; } } } function process($data) { return $data; } } // handles the actions in action-group class action_group_handler extends handler { function parse(&$values,$tag,$filename = '') { $result = array(); $valid_keys = array('sql', 'diy-instructions'); $valid_loops = array('copy'); $valid_open = array('open'); while ( $tag = array_shift($values) ) { $tagname = $tag['tag']; switch ( true ) { case $this->typecheck($tag, 'action-group', 'close'): { return $result; } break; case $this->typecheck($tag, $valid_keys, 'complete'): { $result[$tagname] = $tag['value']; } break; case $this->typecheck($tag, $valid_loops, 'complete'): { $result[$tagname][] = $tag['attributes']; } break; case $this->typecheck($tag, $valid_open, 'open'); { $handler = str_replace('-', '_', $tagname) . '_handler'; if ( class_exists($handler) ) { if ( !isset($this->handlers[$handler]) ) { $this->handlers[$handler] = new $handler; } $result[$tagname][$tag['attributes']['file']] = call_user_func_array(array(&$this->handlers[$handler],'parse'),array(&$values,$tag,$filename)); } else { if ( !isset($this->handlers['default']) ) { $this->handlers['default'] = new handler; } // if we're just skipping parsing this one, we can pass it to an empty handler if ( true || class_exists($handler) ) { $result[$tagname][$tag['attributes']['file']][] = call_user_func_array(array(&$this->handlers['default'],'parse'),array(&$values,$tag,$filename)); } } } break; default: { $this->parse_error(__CLASS__,$tag,__LINE__,"Invalid tag",$filename); } break; } } } function process($data) { return $data; } } // handles tags in the open and action group class open_handler extends handler { function parse(&$values,$tag,$filename = '') { $result = array(); $valid_keys = array('find'); $valid_loops = array('change', 'comment', 'action'); $valid_open = array('edit'); $valid_new = array('inline-edit'); $i = 0; while ( $tag = array_shift($values) ) { $tagname = $tag['tag']; switch ( true ) { case $this->typecheck($tag,'open','close'): { return $result; } break; case $this->typecheck($tag, $valid_keys, 'complete'): { if ( empty($current_tag) ) { $result[$tagname] = $tag['value']; } else { $result[$current_tag][$i][$tagname] = $tag['value']; } } break; case $this->typecheck($tag, $valid_loops, 'complete'): { if ( empty($current_tag) ) { if ( $tagname == 'action' ) { $result[$tagname][] = array( 'type' => $tag['attributes']['type'], 'code' => $tag['value']); } else { $result[$tagname][] = $tag['value']; } } else { if ( $tagname == 'action' ) { $result[$current_tag][$i][$tagname][] = array( 'type' => $tag['attributes']['type'], 'code' => $tag['value']); } else { $result[$current_tag][$i][$tagname][] = $tag['value']; } } } break; case $this->typecheck($tag, $valid_open, 'open'): { $current_tag = $tagname; } break; case $this->typecheck($tag, $valid_open, 'close'): { $current_tag = ''; $i++; } break; case $this->typecheck($tag, $valid_new, 'open'); { $handler = str_replace('-', '_', $tagname) . '_handler'; if ( class_exists($handler) ) { if ( !isset($this->handlers[$handler]) ) { $this->handlers[$handler] = new $handler; } if ( empty($current_tag) ) { $result[$tagname][] = call_user_func_array(array(&$this->handlers[$handler],'parse'),array(&$values,$tag,$filename)); } else { $result[$current_tag][$i][$tagname][] = call_user_func_array(array(&$this->handlers[$handler],'parse'),array(&$values,$tag,$filename)); } } else { if ( !isset($this->handlers['default']) ) { $this->handlers['default'] = new handler; } // if we're just skipping parsing this one, we can pass it to an empty handler if ( true || class_exists($handler) ) { if ( empty($current_tag) ) { $result[$tagname][] = call_user_func_array(array(&$this->handlers['default'],'parse'),array(&$values,$tag,$filename)); } else { $result[$current_tag][$i][$tagname][] = call_user_func_array(array(&$this->handlers['default'],'parse'),array(&$values,$tag,$filename)); } } } } break; default: { $result[$tagname] = $tag['value']; } break; } } } function process($data) { return $data; } } // handles tags in the inline, open, and action group class inline_edit_handler extends handler { function parse(&$values,$tag,$filename = '') { $result = array(); $valid_keys = array('inline-find'); $valid_loops = array('inline-action'); $i = 0; while ( $tag = array_shift($values) ) { $tagname = $tag['tag']; switch ( true ) { case $this->typecheck($tag,'inline-edit','close'): { return $result; } break; case $this->typecheck($tag, $valid_keys, 'complete'): { $result[$tagname] = $tag['value']; } break; case $this->typecheck($tag, $valid_loops, 'complete'): { $result[$tagname][] = array( 'type' => $tag['attributes']['type'], 'code' => $tag['value']); } break; default: { $result[$tagname] = $tag['value']; } break; } } } function process($data) { return $data; } } ?> |
From: Eric F. <wg...@us...> - 2005-05-15 01:32:30
|
Update of /cvsroot/easymod/easymod2/dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25741/dev Log Message: Directory /cvsroot/easymod/easymod2/dev added to the repository |
From: Eric F. <wg...@us...> - 2005-05-09 22:41:04
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18356/mods/easymod/includes Modified Files: admin_easymod.php.txt Log Message: Fixed preview mode, it now displays something useful when it fails. Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_easymod.php.txt 9 May 2005 22:00:44 -0000 1.7 --- admin_easymod.php.txt 9 May 2005 22:40:52 -0000 1.8 *************** *** 158,164 **** global $template, $mode, $lang ; ! // template is not defined if we are displaying/downloading the file so get us out of here if (($mode == 'display_file') || ($mode == 'download_file')) { return ; } --- 158,165 ---- global $template, $mode, $lang ; ! // template is not defined if we are displaying/downloading the file so echo the error if (($mode == 'display_file') || ($mode == 'download_file')) { + echo ( $mode == 'display_file' ) ? '</pre>' . $message . ' :: ' . FAQ_LINK . $lang['EM_FAQ'] . '</a> :: ' . REPORT_LINK . $lang['EM_report'] . '</a><br /><br />' : ''; return ; } *************** *** 2266,2270 **** // didn't find the file! OH CRAP! ! echo $lang['EM_err_modify'] . "\n" ; exit ; } --- 2267,2271 ---- // didn't find the file! OH CRAP! ! echo sprintf($lang['EM_err_modify'], $orig_file) . "\n" ; exit ; } |
From: Eric F. <wg...@us...> - 2005-05-09 22:00:54
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8279/mods/easymod/includes Modified Files: admin_easymod.php.txt Log Message: Made it so directories from the COPY action are created on the post process screen (Step 3), right before moving the files, instead of when the COPY action is first processed (Step 1). Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** admin_easymod.php.txt 8 May 2005 03:04:19 -0000 1.6 --- admin_easymod.php.txt 9 May 2005 22:00:44 -0000 1.7 *************** *** 2054,2058 **** for ($x=0; $x<count($final); $x++) { ! $command_file->modio_mkdirs_copy( $final[$x]['to_path']) ; $command_file->afile[] = 'copy ' . $final[$x]['from_path'] . $final[$x]['from_file'] . ' ../../../' . $final[$x]['to_path'] . $final[$x]['to_file'] ; --- 2054,2058 ---- for ($x=0; $x<count($final); $x++) { ! //$command_file->modio_mkdirs_copy( $final[$x]['to_path']) ; $command_file->afile[] = 'copy ' . $final[$x]['from_path'] . $final[$x]['from_file'] . ' ../../../' . $final[$x]['to_path'] . $final[$x]['to_file'] ; *************** *** 2836,2839 **** --- 2836,2842 ---- } + // create the directory before moving files into it + $command_file->modio_mkdirs_copy(dirname($parms[2])); + // now the magic happens ;-) $ret_value = $command_file->modio_move( $parms[2], $parms[1], $mod_count, $link, $type) ; |
From: Eric F. <wg...@us...> - 2005-05-09 22:00:53
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8279/mods/easymod/em_includes Modified Files: em_modio.php Log Message: Made it so directories from the COPY action are created on the post process screen (Step 3), right before moving the files, instead of when the COPY action is first processed (Step 1). Index: em_modio.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_modio.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** em_modio.php 1 May 2005 07:22:01 -0000 1.2 --- em_modio.php 9 May 2005 22:00:44 -0000 1.3 *************** *** 114,118 **** // set up the path; relative to EM execution point, starting at root $root_path = ( substr($phpbb_root_path, 0, 2) == './') ? substr($phpbb_root_path, 2) : $phpbb_root_path ; ! $copy_path = $root_path . $path ; // create dirs for processing the file (server) --- 114,118 ---- // set up the path; relative to EM execution point, starting at root $root_path = ( substr($phpbb_root_path, 0, 2) == './') ? substr($phpbb_root_path, 2) : $phpbb_root_path ; ! $copy_path = ( substr($path, 0, 9) == '../../../') ? $root_path . substr($path, 9) : $phpbb_root_path . $path; // create dirs for processing the file (server) *************** *** 121,125 **** $dir_path = '' ; $splitarray = explode('/', $copy_path) ; ! for ($idir=0; $idir<count($splitarray)-1; $idir++) { $dir_path .= trim($splitarray[$idir]) ; --- 121,125 ---- $dir_path = '' ; $splitarray = explode('/', $copy_path) ; ! for ($idir=0; $idir<count($splitarray); $idir++) { $dir_path .= trim($splitarray[$idir]) ; |
From: Eric F. <wg...@us...> - 2005-05-08 03:04:36
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7508/mods/easymod Modified Files: lang_easymod.php Log Message: Moved DIY Instructions onto the Post Process screen as well as its own page after the Post Process page. If users don't see these instructions, its the users own fault. Index: lang_easymod.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/lang_easymod.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lang_easymod.php 2 May 2005 00:22:38 -0000 1.5 --- lang_easymod.php 8 May 2005 03:04:19 -0000 1.6 *************** *** 130,133 **** --- 130,140 ---- $lang['EM_pp_status'] = 'Status' ; + // diy + $lang['DIY_final'] = 'Final Step'; + $lang['DIY_Instructions'] = '\'Do it yourself\' Instructions'; + $lang['DIY_intro'] = '\'Do it yourself\' instructions need to be executed by <strong>you manually</strong>, EasyMOD can <strong>not</strong> perform these actions'; + $lang['Final_install_step'] = 'View the final install steps'; + $lang['Install_complete'] = 'Installation Complete'; + // general use $lang['EM_next_step'] = 'Next Step' ; *************** *** 404,406 **** $lang['EM_modio_move_ftpa'] = 'FTP ERROR: could not move file [%s] to [%s]' ; ! ?> --- 411,413 ---- $lang['EM_modio_move_ftpa'] = 'FTP ERROR: could not move file [%s] to [%s]' ; ! ?> \ No newline at end of file |
From: Eric F. <wg...@us...> - 2005-05-08 03:04:35
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7508/mods/easymod/includes Modified Files: admin_easymod.php.txt mod_complete.tpl mod_diy_body.tpl Log Message: Moved DIY Instructions onto the Post Process screen as well as its own page after the Post Process page. If users don't see these instructions, its the users own fault. Index: mod_diy_body.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/mod_diy_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mod_diy_body.tpl 6 May 2005 22:23:44 -0000 1.1 --- mod_diy_body.tpl 8 May 2005 03:04:19 -0000 1.2 *************** *** 1,7 **** <h2>{L_STEP}</h2> ! <h3>{L_ALTERATIONS}</h3> <p>{L_DIY_INTRO}</p> - <form method="post" action="{S_ACTION}"> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> --- 1,6 ---- <h2>{L_STEP}</h2> ! <h3>{L_COMPLETE}</h3> <p>{L_DIY_INTRO}</p> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> *************** *** 11,15 **** <td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%"> <tr> ! <td align="center"> </td> </tr> <tr> --- 10,14 ---- <td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%"> <tr> ! <td align="center"><span class="gen">{L_DIY_INTRO}</span></td> </tr> <tr> *************** *** 28,49 **** </td> </tr> - <tr> - <td class="catBottom" align="center" height="28"> - {HIDDEN} - <input type="hidden" name="mode" value="{MODE}"> - <input type="hidden" name="SQL_lines" value="{SQL_LINES}"> - <input type="hidden" name="themes" value="{THEMES}"> - <input type="hidden" name="languages" value="{LANGUAGES}"> - <input type="hidden" name="files" value="{FILES}"> - <input type="hidden" name="num_proc" value="{PROCESSED}"> - <input type="hidden" name="num_unproc" value="{UNPROCESSED}"> - <input type="hidden" name="install_file" value="{MOD_FILE}"> - <input type="hidden" name="install_path" value="{MOD_PATH}"> - <input type="hidden" name="password" value="{EM_PASS}"> - <input type="submit" name="post" class="mainoption" value="{L_COMPLETE}" /></center> - </td> - </tr> </table> <br /> ! </form> <br /> \ No newline at end of file --- 27,32 ---- </td> </tr> </table> <br /> ! <h2>{L_INSTALL_COMPLETE}</h2> <br /> \ No newline at end of file Index: mod_complete.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/mod_complete.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mod_complete.tpl 24 Apr 2005 14:59:53 -0000 1.1 --- mod_complete.tpl 8 May 2005 03:04:19 -0000 1.2 *************** *** 19,22 **** --- 19,61 ---- <p>{L_COMP_DESC}</p> + <!-- BEGIN diy_switch --> + <form method="post" action="{diy_switch.S_ACTION}"> + <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> + <tr> + <th height="25" class="thHead" nowrap="nowrap">{L_DIY_INSTRUCTIONS}</th> + </tr> + <tr> + <td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%"> + <tr> + <td align="center"><span class="gen">{L_DIY_INTRO}</span></td> + </tr> + <tr> + <td width="100%"><span class="gen"> + <ul> + <!-- BEGIN diyrow --> + <li>{diy_switch.diyrow.INSTRUCTIONS}</li> + <!-- END diyrow --> + </ul> + </span></td> + </tr> + <tr> + <td align="center"> </td> + </tr> + </table> + </td> + </tr> + <tr> + <td class="catBottom" align="center" height="28"> + {HIDDEN} + <input type="hidden" name="mode" value="{diy_switch.MODE}" /> + <input type="hidden" name="password" value="{diy_switch.EM_PASS}"> + <input type="submit" name="post" class="mainoption" value="{L_FINAL_INSTALL_STEP}" /></center> + </td> + </tr> + </table> + </form> + <br /> + <!-- END diy_switch --> + <form action="{S_ACTION}" name="install" method="post"> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline" width="100%"> Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_easymod.php.txt 6 May 2005 22:23:44 -0000 1.5 --- admin_easymod.php.txt 8 May 2005 03:04:19 -0000 1.6 *************** *** 2579,2583 **** 'MOD_FILE' => $install_file, 'MOD_PATH' => $install_path, ! 'MODE' => ( ($error == '') ? 'SQL_execute' : (( count($diy) ) ? 'diy_process' : 'post_process') ), 'HIDDEN' => $hidden, 'EM_PASS' => $password) --- 2579,2583 ---- 'MOD_FILE' => $install_file, 'MOD_PATH' => $install_path, ! 'MODE' => ($error == '') ? 'SQL_execute' : 'post_process', 'HIDDEN' => $hidden, 'EM_PASS' => $password) *************** *** 2704,2708 **** 'MOD_FILE' => $install_file, 'MOD_PATH' => $install_path, ! 'MODE' => ( count($diy) ) ? 'diy_process' : 'post_process', 'HIDDEN' => $hidden, 'EM_PASS' => $password) --- 2704,2708 ---- 'MOD_FILE' => $install_file, 'MOD_PATH' => $install_path, ! 'MODE' => 'post_process', 'HIDDEN' => $hidden, 'EM_PASS' => $password) *************** *** 2711,2720 **** // ! // show the DIY instructions ! // move below post_process? // ! else if ( $mode == 'diy_process' ) { ! // get the vars we are passing along $themes = (isset($HTTP_POST_VARS['themes'])) ? htmlspecialchars($HTTP_POST_VARS['themes']) : '' ; $languages = (isset($HTTP_POST_VARS['languages'])) ? htmlspecialchars($HTTP_POST_VARS['languages']) : '' ; --- 2711,2719 ---- // ! // last step! move the files into place - force this step if in preview mode // ! else if (($mode == 'post_process') || ($preview)) { ! // get the info we are passing along $themes = (isset($HTTP_POST_VARS['themes'])) ? htmlspecialchars($HTTP_POST_VARS['themes']) : '' ; $languages = (isset($HTTP_POST_VARS['languages'])) ? htmlspecialchars($HTTP_POST_VARS['languages']) : '' ; *************** *** 2724,2795 **** $diy = (isset($HTTP_POST_VARS['diy_array'])) ? $HTTP_POST_VARS['diy_array'] : array(); ! // get the post process operations and prepare to send them to the next step ! $num_command_steps = (isset($HTTP_POST_VARS['num_command_steps'])) ? intval($HTTP_POST_VARS['num_command_steps']) :0; ! $hidden = '' ; ! for ( $i=0; $i<$num_command_steps; $i++) ! { ! $var_name = 'command_step' . $i ; ! if ( isset($HTTP_POST_VARS[$var_name])) ! { ! $hidden .= '<input type="hidden" name="command_step'.$i.'" value="' . $HTTP_POST_VARS[$var_name]."\">\n"; ! } ! } ! $hidden .= '<input type="hidden" name="num_command_steps" value="' . $i . "\">\n" ; // explode each new line so they can have their own bullet ! $diy_process = array(); ! for( $i = 0; $i < count($diy); $i++ ) { ! $diy_process = array_merge($diy_process, explode("\n", $diy[$i])); ! } ! for( $i = 0; $i < count($diy_process); $i++ ) ! { ! $diy_process[$i] = trim($diy_process[$i]); ! if ( !empty($diy_process[$i]) ) { ! $template->assign_block_vars('diyrow', array( ! 'INSTRUCTIONS' => stripslashes(htmlspecialchars($diy_process[$i]))) ! ); } - } ! // Show the SQL template ! $template->set_filenames(array( ! 'body' => 'admin/mod_diy_body.tpl') ! ); ! ! // fill the template ! $template->assign_vars(array( ! 'L_STEP' => $lang['EM_sql_step2'], ! 'L_DIY_INTRO' => '\'Do it yourself\' instructions need to be executed by you manually, EasyMOD will not perform these actions', ! ! 'L_COMPLETE' => $lang['EM_complete_install'], ! ! 'THEMES' => $themes, ! 'LANGUAGES' => $languages, ! 'FILES' => $files, ! 'PROCESSED' => $num_proc, ! 'UNPROCESSED' => $num_unproc, ! 'SQL_LINES' => $num_sql_lines, ! 'MOD_FILE' => $install_file, ! 'MOD_PATH' => $install_path, ! 'MODE' => 'post_process', ! 'HIDDEN' => $hidden, ! 'EM_PASS' => $password) ! ); ! } ! // ! // last step! move the files into place - force this step if in preview mode ! // ! else if (($mode == 'post_process') || ($preview)) ! { ! // get the info we are passing along ! $themes = (isset($HTTP_POST_VARS['themes'])) ? htmlspecialchars($HTTP_POST_VARS['themes']) : '' ; ! $languages = (isset($HTTP_POST_VARS['languages'])) ? htmlspecialchars($HTTP_POST_VARS['languages']) : '' ; ! $files = (isset($HTTP_POST_VARS['files'])) ? intval($HTTP_POST_VARS['files']) : 0 ; ! $num_proc = (isset($HTTP_POST_VARS['num_proc'])) ? intval($HTTP_POST_VARS['num_proc']) : 0 ; ! $num_unproc = (isset($HTTP_POST_VARS['num_unproc'])) ? intval($HTTP_POST_VARS['num_unproc']) : 0 ; // get the post process operations --- 2723,2756 ---- $diy = (isset($HTTP_POST_VARS['diy_array'])) ? $HTTP_POST_VARS['diy_array'] : array(); ! $hidden = ''; // explode each new line so they can have their own bullet ! if ( count($diy) ) { ! $template->assign_block_vars('diy_switch', array( ! 'MODE' => 'diy_process', ! 'U_ACTION' => $phpbb_root_path . 'admin/admin_easymod.'.$phpEx, ! 'EM_PASS' => $password) ! ); ! $diy_process = array(); ! for( $i = 0; $i < count($diy); $i++ ) { ! $diy_process = array_merge($diy_process, explode("\n", $diy[$i])); } ! for( $i = 0; $i < count($diy_process); $i++ ) ! { ! $diy_process[$i] = trim($diy_process[$i]); ! if ( !empty($diy_process[$i]) ) ! { ! $hidden .= '<input type="hidden" name="diy_array[]" value="' . stripslashes(htmlspecialchars($diy_process[$i])) . "\" />\n"; ! $template->assign_block_vars('diy_switch.diyrow', array( ! 'INSTRUCTIONS' => stripslashes(htmlspecialchars($diy_process[$i]))) ! ); ! } ! } ! } // get the post process operations *************** *** 2945,2948 **** --- 2906,2913 ---- 'L_UNPROCESSED' => $lang['EM_unprocessed_commands'], + 'L_DIY_INSTRUCTIONS' => $lang['DIY_Instructions'], + 'L_DIY_INTRO' => $lang['DIY_intro'], + 'L_FINAL_INSTALL_STEP' => $lang['Final_install_step'], + 'INSTALL_PATH' => $print_path, 'TITLE' => $mod_title, *************** *** 2961,2965 **** 'FILES' => $files, 'PROCESSED' => $num_proc, ! 'UNPROCESSED' => $num_unproc) ); --- 2926,2932 ---- 'FILES' => $files, 'PROCESSED' => $num_proc, ! 'UNPROCESSED' => $num_unproc, ! ! 'HIDDEN' => $hidden) ); *************** *** 2997,3000 **** --- 2964,3008 ---- } } + + // + // show the DIY instructions + // move below post_process? + // + else if ( $mode == 'diy_process' ) + { + $diy = (isset($HTTP_POST_VARS['diy_array'])) ? $HTTP_POST_VARS['diy_array'] : array(); + + // explode each new line so they can have their own bullet + $diy_process = array(); + for( $i = 0; $i < count($diy); $i++ ) + { + $diy_process = array_merge($diy_process, explode("\n", $diy[$i])); + } + + for( $i = 0; $i < count($diy_process); $i++ ) + { + $diy_process[$i] = trim($diy_process[$i]); + if ( !empty($diy_process[$i]) ) + { + $template->assign_block_vars('diyrow', array( + 'INSTRUCTIONS' => stripslashes(htmlspecialchars($diy_process[$i]))) + ); + } + } + + // Show the SQL template + $template->set_filenames(array( + 'body' => 'admin/mod_diy_body.tpl') + ); + + // fill the template + $template->assign_vars(array( + 'L_STEP' => $lang['DIY_final'], + 'L_COMPLETE' => $lang['DIY_Instructions'], + 'L_DIY_INTRO' => $lang['DIY_intro'], + 'L_INSTALL_COMPLETE' => $lang['Install_complete']) + ); + + } |