Changeset 531 for trunk

Show
Ignore:
Timestamp:
04/22/08 15:35:58 (8 months ago)
Author:
sidtheduck
Message:

+ use SmartStripSlashes?() for cruft-free URLs that have apostrophes (')
+ fix for thumbnail navigation with cruft-free URLs that have apostrophes (')

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/admin/plog-admin-functions.php

    r530 r531  
    133133                VALUES 
    134134          ('".$albumdata['collection_id']."', 
    135            '".$albumdata['album_id']."','".mysql_real_escape_string($picture_path)."', 
     135           '".$albumdata['album_id']."', 
     136           '".mysql_real_escape_string($picture_path)."', 
    136137           NOW(), 
    137138           NOW(), 
     
    410411                $album_path = $row['album_path']; 
    411412 
    412                 $new_path = mysql_real_escape_string($target_name."/".$album_path."/".$filename); 
     413                $new_path = mysql_real_escape_string(SmartStripSlashes($target_name."/".$album_path."/".$filename)); 
    413414 
    414415                // update database 
  • trunk/plog-functions.php

    r530 r531  
    10711071                        $result = run_query($query); 
    10721072                        $row = mysql_fetch_assoc($result); 
    1073                         $rv = $config["baseurl"].rawurlencode($row["path"]); 
     1073                        $rv = $config["baseurl"].rawurlencode(SmartStripSlashes($row["path"])); 
    10741074                } else if ($level == "album") { 
    10751075                        $query = "SELECT 
     
    10821082                        $row = mysql_fetch_assoc($result); 
    10831083                         
    1084                         $rv = $config["baseurl"].rawurlencode($row["collection_path"]) . '/' . rawurlencode($row["album_path"]); 
     1084                        $rv = $config["baseurl"].rawurlencode(SmartStripSlashes($row["collection_path"])) . '/' . rawurlencode(SmartStripSlashes($row["album_path"])); 
    10851085                         
    10861086                        // I need to give additional arguments to the url-s 
     
    10931093                        $pic = get_picture_by_id($id); 
    10941094                        $album = $pic["parent_album"]; 
    1095                         $rv = $config["baseurl"].substr($pic['path'], 0, -4); 
     1095                        $rv = $config["baseurl"].substr(SmartStripSlashes($pic['path']), 0, -4); 
    10961096                } 
    10971097        } else { 
     
    21172117 
    21182118function plogger_thumb_nav_item($link, $title, $img_path, $class = '') { 
    2119         return "\t\t<li class='$class'><a href='$link' title='$title'><img src='$img_path' /></a></li>\n"; 
     2119        return "\t\t<li class=\"".$class."\"><a href=\"".$link."\" title=\"".$title."\"><img src=\"".$img_path."\" /></a></li>\n"; 
    21202120} 
    21212121