Update of /cvsroot/easymod/easymod/install/em_files/includes/em
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18623/em_files/includes/em
Modified Files:
em_actions.php em_parser_text.php
Log Message:
bug 1403872, changed line endings to \n because that is what the phpBB files use.
Index: em_actions.php
===================================================================
RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_actions.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** em_actions.php 25 Dec 2005 20:48:38 -0000 1.3
--- em_actions.php 15 Jan 2006 04:56:32 -0000 1.4
***************
*** 92,96 ****
$this->filename = $filename;
$this->contents = open_file($this->filename);
! $this->contents = preg_split("/(\r|\n|\r\n)/", $this->contents, -1, PREG_SPLIT_DELIM_CAPTURE);
$this->size_contents = count($this->contents);
$this->start = $this->end = 0;
--- 92,96 ----
$this->filename = $filename;
$this->contents = open_file($this->filename);
! $this->contents = preg_split("/(\r|\n|)/", $this->contents, -1, PREG_SPLIT_DELIM_CAPTURE);
$this->size_contents = count($this->contents);
$this->start = $this->end = 0;
***************
*** 121,127 ****
$size_find = 0;
- // remove empty lines from $lines
$temp = array();
-
foreach ($lines as $current_line)
{
--- 121,125 ----
***************
*** 198,212 ****
if ( !is_array($lines) )
{
! $lines = explode("\n", $lines);
}
foreach ($lines as $line)
{
! // linux uses "\n", apples use "\r", and windows uses "\r\n" to represent new lines. of these, only "\r\n"
! // will be interpreted as a new line character on all systems. granted, each new line will be preceeded or
! // followed by an odd character, but chances are good that that character won't even be shown by the
! // editor.
$this->target_contents[] = $line;
! $this->target_contents[] = "\r\n";
}
--- 196,209 ----
if ( !is_array($lines) )
{
! $lines = explode("\n", str_replace("\r", '', $lines));
}
foreach ($lines as $line)
{
! // linux uses "\n", apples use "\r", and windows uses "" to represent new lines. of these, only ""
! // will be interpreted as a new line character on all systems. phpBB uses "\n" for line endings (linux) so
! // EasyMOD will also use that.
$this->target_contents[] = $line;
! $this->target_contents[] = "\n";
}
***************
*** 218,222 ****
if ( !is_array($lines) )
{
! $lines = explode("\n", $lines);
}
--- 215,219 ----
if ( !is_array($lines) )
{
! $lines = explode("\n", str_replace("\r", '', $lines));
}
***************
*** 226,230 ****
{
$this->target_contents[] = $line;
! $this->target_contents[] = "\r\n";
}
foreach ($temp as $line)
--- 223,227 ----
{
$this->target_contents[] = $line;
! $this->target_contents[] = "\n";
}
foreach ($temp as $line)
***************
*** 240,244 ****
if ( !is_array($lines) )
{
! $lines = explode("\n", $lines);
}
--- 237,241 ----
if ( !is_array($lines) )
{
! $lines = explode("\n", str_replace("\r", '', $lines));
}
***************
*** 247,251 ****
{
$this->target_contents[] = $line;
! $this->target_contents[] = "\r\n";
}
--- 244,248 ----
{
$this->target_contents[] = $line;
! $this->target_contents[] = "\n";
}
Index: em_parser_text.php
===================================================================
RCS file: /cvsroot/easymod/easymod/install/em_files/includes/em/em_parser_text.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** em_parser_text.php 25 Dec 2005 20:48:38 -0000 1.5
--- em_parser_text.php 15 Jan 2006 04:56:32 -0000 1.6
***************
*** 310,314 ****
$edit_number = -1;
$inline_edit_number = -1;
!
$mod_actions_count = count($mod_actions);
for( $i = 0; $i < $mod_actions_count; $i++ )
--- 310,314 ----
$edit_number = -1;
$inline_edit_number = -1;
! vd($mod_actions);
$mod_actions_count = count($mod_actions);
for( $i = 0; $i < $mod_actions_count; $i++ )
|