Thread: [Easymod-cvs] easymod/install/em_files/includes/em em_actions.php,1.2,1.3 em_parser_text.php,1.4,1.5
Status: Beta
Brought to you by:
wgeric
|
[Easymod-cvs] easymod/install/em_files/includes/em em_actions.php,1.2,1.3 em_parser_text.php,1.4,1.5
From: Eric F. <wg...@us...> - 2005-12-25 20:48:47
|
Update of /cvsroot/easymod/easymod/install/em_files/includes/em In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18079/em_files/includes/em Modified Files: em_actions.php em_parser_text.php Log Message: /me is a n00b Index: em_actions.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_actions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** em_actions.php 24 Dec 2005 05:28:21 -0000 1.2 --- em_actions.php 25 Dec 2005 20:48:38 -0000 1.3 *************** *** 1,10 **** <?php ! /** * * @package EasyMOD * @version $Id$ ! * @copyright (c) 2005 phpBB Group ! * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ --- 1,10 ---- <?php ! /** * * @package EasyMOD * @version $Id$ ! * @copyright (c) 2005 phpBB Group ! * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ *************** *** 29,33 **** var $user_search; var $io; ! function actions($mod_io) { --- 29,33 ---- var $user_search; var $io; ! function actions($mod_io) { *************** *** 38,45 **** { global $mod_dir; ! $files = array(); $filename = basename($from_file); ! if ( strstr($filename, '*') ) { --- 38,45 ---- { global $mod_dir; ! $files = array(); $filename = basename($from_file); ! if ( strstr($filename, '*') ) { *************** *** 58,62 **** $directory .= '/'; } ! if ( $filename == '*.*' || $filename == '*' ) { --- 58,62 ---- $directory .= '/'; } ! if ( $filename == '*.*' || $filename == '*' ) { *************** *** 67,72 **** $max_levels = 1; } ! ! $pattern = str_replace('\*', '.*', preg_quote($filename)); $files_temp = em_find_files($directory, $pattern, $max_levels); for( $i = 0, $total = sizeof($files_temp); $i < $total; $i++ ) --- 67,72 ---- $max_levels = 1; } ! ! $pattern = str_replace('\*', '.*', preg_quote($filename)); $files_temp = em_find_files($directory, $pattern, $max_levels); for( $i = 0, $total = sizeof($files_temp); $i < $total; $i++ ) *************** *** 79,93 **** // normal copy, nothing special about it else ! { $files[] = array( 'to' => $to_file, 'from' => $from_file); } ! return $files; } function open($filename) ! { $this->filename = $filename; $this->contents = open_file($this->filename); --- 79,93 ---- // normal copy, nothing special about it else ! { $files[] = array( 'to' => $to_file, 'from' => $from_file); } ! return $files; } function open($filename) ! { $this->filename = $filename; $this->contents = open_file($this->filename); *************** *** 98,109 **** $this->target_contents = array(); $this->inline_target_contents = ''; ! return ( empty($this->contents) ) ? false : true; } function close() ! { global ${$this->io}; ! $this->commit_block_changes(); ${$this->io}->write_file($this->filename,implode('',$this->contents)); --- 98,109 ---- $this->target_contents = array(); $this->inline_target_contents = ''; ! return ( empty($this->contents) ) ? false : true; } function close() ! { global ${$this->io}; ! $this->commit_block_changes(); ${$this->io}->write_file($this->filename,implode('',$this->contents)); *************** *** 116,120 **** $lines = explode("\n", $lines); } ! $this->commit_block_changes(); --- 116,120 ---- $lines = explode("\n", $lines); } ! $this->commit_block_changes(); *************** *** 141,145 **** { $desired_line = trim($lines[($line_inum - $line_num) / 2]); ! $current_line = trim($this->contents[$line_inum]); // if the desired line is blank, skip it --- 141,145 ---- { $desired_line = trim($lines[($line_inum - $line_num) / 2]); ! $current_line = trim($this->contents[$line_inum]); // if the desired line is blank, skip it *************** *** 200,204 **** $lines = explode("\n", $lines); } ! foreach ($lines as $line) { --- 200,204 ---- $lines = explode("\n", $lines); } ! foreach ($lines as $line) { *************** *** 210,214 **** $this->target_contents[] = "\r\n"; } ! return true; } --- 210,214 ---- $this->target_contents[] = "\r\n"; } ! return true; } *************** *** 220,224 **** $lines = explode("\n", $lines); } ! $temp = $this->target_contents; $this->target_contents = array(); --- 220,224 ---- $lines = explode("\n", $lines); } ! $temp = $this->target_contents; $this->target_contents = array(); *************** *** 232,236 **** $this->target_contents[] = $line; } ! return true; } --- 232,236 ---- $this->target_contents[] = $line; } ! return true; } *************** *** 242,246 **** $lines = explode("\n", $lines); } ! $this->target_contents = array(); foreach ($lines as $line) --- 242,246 ---- $lines = explode("\n", $lines); } ! $this->target_contents = array(); foreach ($lines as $line) *************** *** 249,253 **** $this->target_contents[] = "\r\n"; } ! return true; } --- 249,253 ---- $this->target_contents[] = "\r\n"; } ! return true; } Index: em_parser_text.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_parser_text.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** em_parser_text.php 24 Dec 2005 05:28:21 -0000 1.4 --- em_parser_text.php 25 Dec 2005 20:48:38 -0000 1.5 *************** *** 484,488 **** return false; } ! if (isset($this->valid_actions[trim(preg_replace('@##([a-z ]+):(.*)@i', '\\1', $this->mod_contents[1]))]) || isset($this->valid_actions[trim(preg_replace('@##([a-z ]+):(.*)@i', '\\1', $this->mod_contents[2]))])) { --- 484,488 ---- return false; } ! if (isset($this->valid_actions[trim(preg_replace('@##([a-z ]+):(.*)@i', '\\1', $this->mod_contents[1]))]) || isset($this->valid_actions[trim(preg_replace('@##([a-z ]+):(.*)@i', '\\1', $this->mod_contents[2]))])) { |