Please login or register.

Login with username, password and session length
Advanced search  


Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: \r\n bug when article saving error occurs.  (Read 3816 times)


  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
\r\n bug when article saving error occurs.
« on: February 23, 2009, 01:21:49 pm »

if article name or sef is already in db or title was left empty, then an error notification is generated.
However, the end of line chars are displayed in the text box of the editor as per report here

To rectify (supplied by Joost)
A patch:
Replace in function process ( in snews.php)
Code: (old code) [Select]
case 'admin_article':
$_SESSION[_SITE.'temp']['title'] = $title;
$_SESSION[_SITE.'temp']['seftitle'] = $seftitle;
$_SESSION[_SITE.'temp']['text'] = $text;

Code: (NEW code) [Select]
case 'admin_article':
$_SESSION[_SITE.'temp']['title'] = $_POST['title'];
$_SESSION[_SITE.'temp']['seftitle'] = $_POST['seftitle'];
$_SESSION[_SITE.'temp']['text'] = $_POST['text'];

Note: If magic_quotes_gpc is turned on, add the following to .htaccess:
Code: [Select]
php_flag magic_quotes_gpc OFF
Of all the things I have lost, it is my mind that I miss the most.