Changeset 614 for trunk


Ignore:
Timestamp:
03/24/10 13:58:31 (2 years ago)
Author:
sidtheduck
Message:
  • Fix for RSS pictures/albums at collections level
  • Fix for copying original image to thumbnail if access is not allowed for original images and there is a permissions issue for the copy command
  • Better path error reporting if images are missing during upgrade
  • Fix to reset the sorting session variables if defaults changed in Admin -> Options so a browser session restart is not needed to see the results
  • Fix for pagination truncation at search level
  • Minor fixes for some additional undefined variable notices in certain server setups
Location:
trunk
Files:
5 edited

Legend:

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

    r602 r614  
    954954                        } else { 
    955955                                // Have no idea where the old image is 
    956                                 $path = ''; 
     956                                $path = 'missing/'; 
    957957                        } 
    958958                        $list[$total] = array('id' => $row['pid'], 'old_path' => $path.$row['path'], 'new_path' => $new_path); 
  • trunk/plog-admin/plog-admin-functions.php

    r611 r614  
    19841984                                if($gd_info == "") { 
    19851985                                        $gd_info = plog_tr('Not installed'); 
    1986                                 } else if ($gd_info1['JPG Support']) { 
     1986                                } else if (isset($gd_info1['JPG Support'])) { 
    19871987                                        $gd_info .= plog_tr(' with JPEG support'); 
    19881988                                } 
  • trunk/plog-admin/plog-options.php

    r602 r614  
    131131        configure_mod_rewrite($config['use_mod_rewrite']); 
    132132 
     133        // Reset the sorting session variables if they have changed so you don't need to do a browser refresh 
     134        if ($_POST['default_sortby'] != $config['default_sortby']) { 
     135                $_SESSION['plogger_sortby'] = $_POST['default_sortby']; 
     136        } 
     137        if ($_POST['plogger_sortdir'] != $config['plogger_sortdir']) { 
     138                $_SESSION['plogger_sortdir'] = $_POST['plogger_sortdir']; 
     139        } 
     140 
    133141        if (!isset($error_flag)) $output .= "\n\t" . '<p class="success">'.plog_tr('You have updated your settings successfully').'.</p>' . "\n"; 
    134  
    135142        $_SESSION['msg'] = $output; 
     143 
    136144        unset($_POST); 
    137145        // do a quick refresh to prevent multiple form submits 
  • trunk/plog-includes/plog-functions.php

    r604 r614  
    652652                // if fullsize image access is disabled, copy the file to the thumbs folder 
    653653                if ($config['allow_fullpic'] == 0) { 
    654                         copy($source_file_name, $thumbpath);  
    655                         return $thumburl; 
     654                        // try to copy and return the thumbpath 
     655                        // if it fails (most likely due to permissions issues) then we continue on to generate a thumbnail 
     656                        if(@copy($source_file_name, $thumbpath)) { 
     657                                return $thumburl; 
     658                        } 
    656659                // otherwise return the original file path 
    657660                } else { 
     
    22982301                                $num_items = $GLOBALS['total_pictures']; 
    22992302                                $args['searchterms'] = urlencode($_REQUEST['searchterms']); 
    2300                                 return generate_pagination('search', -1, $page, $num_items, $config['thumb_num'], $args); 
     2303                                return generate_pagination('search', -1, $page, $num_items, $config['thumb_num'], $args, $page_range); 
    23012304                                break; 
    23022305                        case 'album': 
  • trunk/plog-rss.php

    r602 r614  
    6464 
    6565        } else if (($level == 'collections') or ($level == '')) { 
    66                 plogger_init_albums(array( 
    67                 'collection_id' => -1, 
    68                 'sortby' => 'id', 
    69                 'sortdir' => 'DESC', 
    70                 'from' => 0, 
    71                 'limit' => $config['feed_num_entries'] 
    72                 )); 
     66                if ($config['feed_content'] == 0 ) { 
     67                        plogger_init_albums(array( 
     68                                'collection_id' => -1, 
     69                                'sortby' => 'id', 
     70                                'sortdir' => 'DESC', 
     71                                'from' => 0, 
     72                                'limit' => $config['feed_num_entries'] 
     73                        )); 
     74                } else { 
     75                        plogger_init_pictures(array( 
     76                                'type' => 'latest', 
     77                                'sortby' => 'id', 
     78                                'limit' => $config['feed_num_entries'] 
     79                        )); 
     80                } 
    7381                $config['feed_title'] .= ': '.plog_tr('Entire Gallery'); 
    7482        } 
Note: See TracChangeset for help on using the changeset viewer.