Strip all the slashes from downloads
Author Message
c0rrupt
Administrator


Posts: 251
Joined: Mar 2010
Post: #1
Strip all the slashes from downloads
0
0
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: (Select All)
function stripallslashes($string)
    {
        while(
stripslashes($string) != $string)
          
$string stripslashes($string);
       return 
$string;
    } 


above:

PHP Code: (Select All)
?>

find:

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


replace with:

PHP Code: (Select All)
$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

Be sure to visit WCDDL.org Affiliates
07-04-2012 10:33 AM


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [WCDDLv2] Show the total amount downloads for a specific site c0rrupt 0 48 07-26-2012 04:37 PM
Last Post: c0rrupt
  Who to order queue and mix the downloads c0rrupt 0 50 12-30-2011 03:49 PM
Last Post: c0rrupt



User(s) browsing this thread: 1 Guest(s)

This forum uses Lukasz Tkacz MyBB addons.