[Easymod-cvs] easymod/install/em_files/includes/em em_actions.php,1.1,1.2 em_parser_text.php,1.3,1.4
Status: Beta
Brought to you by:
wgeric
From: Eric F. <wg...@us...> - 2005-12-24 05:28:31
|
Update of /cvsroot/easymod/easymod/install/em_files/includes/em In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25972/includes/em Modified Files: em_actions.php em_parser_text.php Log Message: Bug fixes Index: em_actions.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_actions.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_actions.php 4 Dec 2005 03:12:30 -0000 1.1 --- em_actions.php 24 Dec 2005 05:28:21 -0000 1.2 *************** *** 165,169 **** } // break out of this for loop if there isn't a match. ! $search_pattern = preg_replace('#\\\\\\{%\\\\\\:(\\d+)\\\\\\}#','(\\d+|\\{%\\:$1\\})', preg_quote($desired_line, '#')); if (!preg_match("#{$search_pattern}#", $current_line)) { --- 165,169 ---- } // break out of this for loop if there isn't a match. ! $search_pattern = preg_replace('#\\\\\\{%\\\\\\:(\\d+)\\\\\\}#','(\\d+|\\{%\\:$1\\})', preg_quote($desired_line, '#')); if (!preg_match("#{$search_pattern}#", $current_line)) { *************** *** 185,189 **** $this->start = $line_num; ! $this->end = $line_inum; for (;$line_num<$this->end;$line_num++) { --- 185,189 ---- $this->start = $line_num; ! $this->end = $line_inum-2; for (;$line_num<$this->end;$line_num++) { Index: em_parser_text.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_parser_text.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** em_parser_text.php 24 Dec 2005 01:43:42 -0000 1.3 --- em_parser_text.php 24 Dec 2005 05:28:21 -0000 1.4 *************** *** 338,342 **** { // @TODO need to make it so copy and to are translatable ! if( !preg_match('#^copy\s*(.+?)\s*to\s*(.*)$#i', $line, $match) ) { // @TODO: An error triggered here would say something like "Invalid syntax in COPY action" --- 338,342 ---- { // @TODO need to make it so copy and to are translatable ! if( !preg_match('#^copy\s*(\S*)\s*to\s*(.*)$#i', $line, $match) ) { // @TODO: An error triggered here would say something like "Invalid syntax in COPY action" *************** *** 344,349 **** } $this->actions['copy'][] = array( ! 'from' => str_replace('\\', '/', $match[1]), ! 'to' => str_replace('\\', '/', $match[2])); } } --- 344,349 ---- } $this->actions['copy'][] = array( ! 'from' => str_replace('\\', '/', trim($match[1])), ! 'to' => str_replace('\\', '/', trim($match[2]))); } } *************** *** 368,372 **** for( $j = 0; $j < count($mod_actions[$i]['lines']); $j++ ) { ! $find[] = trim($mod_actions[$i]['lines'][$j]); } $this->actions['open'][$current_file]['edit'][$edit_number]['find'] = implode("\n", $find); --- 368,372 ---- for( $j = 0; $j < count($mod_actions[$i]['lines']); $j++ ) { ! $find[] = $mod_actions[$i]['lines'][$j]; } $this->actions['open'][$current_file]['edit'][$edit_number]['find'] = implode("\n", $find); *************** *** 383,387 **** for( $j = 0; $j < count($mod_actions[$i]['lines']); $j++ ) { ! $code[] = trim($mod_actions[$i]['lines'][$j]); } $this->actions['open'][$current_file]['edit'][$edit_number]['action'][] = array( --- 383,387 ---- for( $j = 0; $j < count($mod_actions[$i]['lines']); $j++ ) { ! $code[] = $mod_actions[$i]['lines'][$j]; } $this->actions['open'][$current_file]['edit'][$edit_number]['action'][] = array( *************** *** 484,489 **** return false; } ! ! if( strpos($this->mod_contents[1], 'MOD Title') !== false ) { return true; --- 484,489 ---- return false; } ! ! if (isset($this->valid_actions[trim(preg_replace('@##([a-z ]+):(.*)@i', '\\1', $this->mod_contents[1]))]) || isset($this->valid_actions[trim(preg_replace('@##([a-z ]+):(.*)@i', '\\1', $this->mod_contents[2]))])) { return true; |