Hi again,
This i causing errors
imysing this:
PHP Code:
if(empty($newname) && $sanitized_name == $newname) { if(rename(DOC_ROOT.''.$cur_dir.'/'.$file, DOC_ROOT.''.$cur_dir.$newname)) { echo '<script type="text/javascript"> window.location = "'.SITE_URL.'/admin/file_manager.php?dir='.$cur_dir.'" </script>'; } else { echo '<script type="text/javascript"> alert("ERROR: the file does not appear to have been successfully renamed! - Contact Admin"); window.location = "'.SITE_URL.'/admin/file_manager.php?dir='.$cur_dir.'"; </script>'; } } else { echo "<script>alert('Filename problems. Try ".$sanitized_name."');</script>"; }
and it seems to be the preg_replace and regex which is causing it, it always return false, and the stanistized name is empty. so i think somethings wrong
it seems it removes all valud chars,
so should i have if($sanitized !== '') so if there was any chars it didnt remove then i know its a bad name?
__________________
Discounted Web Hosting With XDnet! >> Get 25% of hosting~ Promo: Webmaster-talk <<
|