Changeset 600

Show
Ignore:
Timestamp:
06/22/09 19:11:40 (9 months ago)
Author:
sidtheduck
Message:

-Fix for search function bug in r599
-minor syntax fixes for plog-xml.php
-minor syntax fix for intermediate images with denied full picture access

Location:
trunk
Files:
3 modified

Legend:

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

    r598 r600  
    387387                                        <input class="submit" type="submit" value="'.plog_tr('Search').'" /> 
    388388                                </div>'; 
    389         if (!$config['use_mod_rewrite'] && !empty($config['query_args'])) { 
    390                 $query = array(); 
    391                 $query_args = explode('&amp;', $config['query_args']); 
    392                 foreach ($query_args as $value) { 
    393                         $query = explode('=', $value); 
    394                         $output .= "\n\t\t\t\t\t\t".'<input type="hidden" name="'.$query[0].'" value="'.$query[1].'" />'; 
     389        if (!$config['use_mod_rewrite']) { 
     390                $output .= "\n\t\t\t\t\t".'<input type="hidden" name="level" value="search" />'; 
     391                if (!empty($config['query_args'])) { 
     392                        $query = array(); 
     393                        $query_args = explode('&amp;', $config['query_args']); 
     394                        foreach ($query_args as $value) { 
     395                                $query = explode('=', $value); 
     396                                $output .= "\n\t\t\t\t\t".'<input type="hidden" name="'.$query[0].'" value="'.$query[1].'" />'; 
     397                        } 
    395398                } 
    396399        } 
     
    640643        if ($orig_width <= $thumb_config['size'] && $orig_height <= $thumb_config['size']) { 
    641644                // if fullsize image access is disabled, copy the file to the thumbs folder 
    642                 if (!$config['allow_fullpic']) { 
     645                if ($config['allow_fullpic'] == 0) { 
    643646                        copy($source_file_name,$thumbpath);  
    644647                        return $thumburl; 
  • trunk/plog-xml.php

    r591 r600  
    175175                        // Put together the tag attributes 
    176176                        foreach ($collection as $var => $val) { 
    177                                 $xml .= ''.$var.'="'.htmlspecialchars($val).'"'; 
     177                                $xml .= ' '.$var.'="'.htmlspecialchars($val).'"'; 
    178178                        } 
    179179 
     
    200200                                        } 
    201201 
     202                                        $album['album_path'] = sanitize_filename($album['collection_name']).'/'.sanitize_filename($album['album_name']).'/'; 
    202203                                        $album['thumb_path'] = 'plog-thumb.php?id='.$album['thumbnail_id']; 
    203204 
    204205                                        $xml .= '<album'; 
    205206                                        foreach ($album as $var => $val) { 
    206                                                 $xml .= ''.$var.'="'.htmlspecialchars($val).'"'; 
     207                                                $xml .= ' '.$var.'="'.htmlspecialchars($val).'"'; 
    207208                                        } 
    208209                                        $xml .= '>'; 
  • trunk/plogger.php

    r597 r600  
    1515        // The following line calculates the path in the album and excludes any subdirectories if 
    1616        // Plogger is installed in one 
    17         $path = join('/', array_diff(explode('/', $_REQUEST['path']), explode('/', $_SERVER['PHP_SELF']))); 
     17        $path = join('/', array_diff(explode('/', $_SERVER['REQUEST_URI']), explode('/', $_SERVER['PHP_SELF']))); 
    1818        $resolved_path = resolve_path($path); 
    1919        if (is_array($resolved_path)) {