No, because a single newline after the closing tag is silently ignored. I propose the following:
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfgTextareaRows; ?>" cols="<?php echo $cfgTextareaCols; ?>"
<?php if
(!empty($special_chars)) echo $special_chars . "\n"; ?>
</textarea>
Ok, but I didn't see anywhere in php documentation that trailing newlines are silently ignored. We should also be careful that problems may arise with editors using other end of lines than unix ones (dos' \r\n and mac's \r).
If somebody editing the code with an editor that doesn't preserve end of lines may break it, the code becomes "text editor dependant" which is not exactly our goal... :)
Benjamin
On Wed, 1 Aug 2001, Benjamin Gandon wrote:
Ok, but I didn't see anywhere in php documentation that trailing newlines are silently ignored. We should ...
Chapter 5 of the PHP manual (right after the blurb about ASP-style tags):
"The closing tag for the block will include the immediately trailing newline if one is present."
Hi all,
I suggest tow things for this shell script. First :
$ fromdos <extchg.sh> extchg.sh.new $ mv extchg.sh.new extchg.sh
Second :
Change this line sed -e 's/'$1'/'$2'/g' $i > `ls $i|sed -e 's/'$1'/'$2'/g'` to this one, sed -e 's/.'$1'/.'$2'/g' $i > `ls $i|sed -e 's/'$1'/'$2'/g'`
Because, if you make a 'extchg.sh php3 php' and after a 'extchg.sh php php3', the actual version change all <?php tag to <?php3 (for example).
Armel. ................................................................ Webmaster PHPIndex http://www.phpindex.com webmaster@phpindex.com ................................................................
Armel FAUVEAU a écrit :
Hi all,
I suggest tow things for this shell script. First :
$ fromdos <extchg.sh> extchg.sh.new $ mv extchg.sh.new extchg.sh
Second :
Change this line sed -e 's/'$1'/'$2'/g' $i > `ls $i|sed -e 's/'$1'/'$2'/g'` to this one, sed -e 's/.'$1'/.'$2'/g' $i > `ls $i|sed -e 's/'$1'/'$2'/g'`
Because, if you make a 'extchg.sh php3 php' and after a 'extchg.sh php php3', the actual version change all <?php tag to <?php3 (for example).
Armel,
your second point was in this patch, can you do it and close the patch?
I don't have the fromdos command, what is it's goal?
http://sourceforge.net/tracker/index.php?func=detail&aid=444789&grou...
Marc
On Wed, 1 Aug 2001, Marc Delisle wrote:
I don't have the fromdos command, what is it's goal?
It converts \r\n -> \n.
-- Ignacio Vazquez-Abrams ignacio@openservices.net
your second point was in this patch, can you do it and close the patch?
Ok.
I don't have the fromdos command, what is it's goal?
Here is an abstract of the man page :
--------------- SYNOPSIS fromdos < dosfile.txt > unixfile.txt
DESCRIPTION fromdos takes a DOS text file as stdin and sends a UNIX text file to stdout. DOS text file format separates lines of text by two characters: CR followed by LF (hex 0d 0a). UNIX text file format separates lines of text with a single LF character (hex 0a). This program changes the CR LF groups found in the input stream to LF in the output stream. ----------------
For the moment, when you exec extch.sh, here is the result (because of bad encoding) :
chevesne:~/webperso/phpMyAdmin$ sh extchg.sh php3 php : command not found : command not found : command not found : command not found extchg.sh: line 28: syntax error: unexpected end of file
Yours, ................................................................ Webmaster PHPIndex http://www.phpindex.com webmaster@phpindex.com ................................................................
Armel FAUVEAU a écrit :
I don't have the fromdos command, what is it's goal?
Here is an abstract of the man page :
You don't need such a non standard command to do that. tr is just fine:
cat dirtyDosFile | tr -d '\r' > newCleanedFile
And this command is available on all unix systems.
Hello Benjamin :)
You don't need such a non standard command to do that. tr is just fine:
cat dirtyDosFile | tr -d '\r' > newCleanedFile
And this command is available on all unix systems.
OK. It's more POSIX compliant :)
Armel.
Armel FAUVEAU a écrit :
I don't have the fromdos command, what is it's goal?
Here is an abstract of the man page :
You don't need such a non standard command to do that. tr is just fine:
cat dirtyDosFile | tr -d '\r' > newCleanedFile
And this command is available on all unix systems.
The script remove_control_m.sh in the cvs seems to be here to do that kind of job.
Hi everybody,
I made some tests on the cvs version and here are my comments:
- one stripSlashes() that should not be done when executing SQL queries an a database. The query displayed in the textarea after execution has slashes stripped off, and that should not be done.
- mysql_die2() is called in db_readdump.php3 though this funciton does not exist
- why DEVELOPER is not already removed from cvs ?
- in Documentation.html: "Obviously, you're free to use whatever coding style you want." Thas was true by the time Tobias started coding. Now, I would put "Please follow the PEAR coding standards as close as possible when indenting and formating your code."
- on main.php3, please remove the "Official phpMyAdmin Homepage" link!
- tbl_properties.php3: why is there only a "browse" link on top and whereas then there are tree "Browse - Select - Insert" links? Why not put the tree "Browse - Select - Insert" links on top of the page too?
- tbl_properties.php3: there is no link to "empty" the table. this feature is only available in db_details.php3. why not putting it in tbl_properties.php3?
- PLEASE TELL IT WHEN YOU CHANG ALL END OF LINES! It's really a hell dealing with confilcts all over each file! It's really not a common thing, so you *MUST* warn everybody before doing it!
- I can't manage to use the ssh cvs access. Can nybody help me with that? Here is what happens when I try a checkout:
$ cvs -d:ext:gandon@cvs.phpmyadmin.sourceforge.net:/cvsroot/phpmyadmin co phpMyAdmin gandon@cvs.phpmyadmin.sourceforge.net's password: Warning: Remote host denied X11 forwarding. Could not chdir to home directory /home/users/g/ga/gandon: No such file or directory cvs [server aborted]: can't chdir(/home/users/g/ga/gandon): No such file or directory
Thanks !
Benjamin Gandon a écrit :
(...)
- I can't manage to use the ssh cvs access. Can nybody help me with that? Here is what happens when I try a checkout:
$ cvs -d:ext:gandon@cvs.phpmyadmin.sourceforge.net:/cvsroot/phpmyadmin co phpMyAdmin gandon@cvs.phpmyadmin.sourceforge.net's password: Warning: Remote host denied X11 forwarding. Could not chdir to home directory /home/users/g/ga/gandon: No such file or directory cvs [server aborted]: can't chdir(/home/users/g/ga/gandon): No such file or directory
Try first this: ssh gandon@cvs.phpmyadmin.sourceforge.net
and this will create your homedir there.
Marc
Benjamin Gandon a écrit :
Hi everybody,
I made some tests on the cvs version and here are my comments: (...)
- why DEVELOPER is not already removed from cvs ?
Done!
- in Documentation.html: "Obviously, you're free to use whatever coding style you want." Thas was true by the time Tobias started coding. Now, I would put "Please follow the PEAR coding standards as close as possible when indenting and formating your code."
Good idea! Are you modifying the file?
- on main.php3, please remove the "Official phpMyAdmin Homepage" link!
Nope, phpwizard will remain the official homepage, as discussed with Tobias. I regret that Olivier does not have access to the main phpwizard page, but he has rights for the /projects/phpmyadmin page.
- tbl_properties.php3: why is there only a "browse" link on top and whereas then there are tree "Browse - Select - Insert" links? Why not put the tree "Browse - Select - Insert" links on top of the page too?
See the archives of the -devel list for a discussion about that. Anyway for the next major version we have to redesign this page.
- tbl_properties.php3: there is no link to "empty" the table. this feature is only available in db_details.php3. why not putting it in tbl_properties.php3?
Good idea! Are you doing it?
- PLEASE TELL IT WHEN YOU CHANG ALL END OF LINES! It's really a hell dealing with confilcts all over each file! It's really not a common thing, so you *MUST* warn everybody before doing it!
Do you mean when I used remove_control_m.sh?
Marc