(#1)
c0rrupt Offline
Administrator
 
Posts: 182
Join Date: Mar 2010
Location: Canada
Strip all the slashes from downloads - 07-04-2012, 03:33 PM

Ok this minor modification will strip any excess slashes produced by crappy autosubmitters, or by magic quotes, before submitting them.

open funcs.php.
add:

PHP Code:
    function stripallslashes($string)
    {
        while(
stripslashes($string) != $string)
          
$string stripslashes($string);
       return 
$string;
    } 

above:

PHP Code:
?> 
find:

PHP Code:
          $titles $_POST['title'];
          
$urls $_POST['url'];
          
$types $_POST['type'];
          
$sname $_POST['sname'];
          
$surl $_POST['surl'];
          
$email $_POST['email']; 

replace with:

PHP Code:
      $titles array_map("stripallslashes"$_POST['title']);
      
$urls array_map("stripallslashes"$_POST['url']);
      
$types array_map("stripallslashes"$_POST['type']);
      
$sname stripallslashes($_POST['sname']);
      
$surl stripallslashes($_POST['surl']);
      
$email stripallslashes($_POST['email']); 
by ddlshack


Before doing any edits to your DDL Site always make a BACKUP first.

Bookmarks

Tags
downloads, slashes, strip, wcddl

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Powered by vBulletin


Content Relevant URLs by vBSEO