Changeset 2327 for trunk/picture.php


Ignore:
Timestamp:
May 3, 2008, 3:52:08 AM (17 years ago)
Author:
rvelices
Message:

just some optimizations (especially for large dbs)

  • replace some REGEXP with LIKE in sql
  • optimized queries for the combination of large data sets with picture_url_style file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/picture.php

    r2309 r2327  
    3636}
    3737
     38$page['rank_of'] = array_flip($page['items']);
     39
    3840// if this image_id doesn't correspond to this category, an error message is
    3941// displayed, and execution is stopped
    40 if (!in_array($page['image_id'], $page['items']))
     42if ( !isset($page['rank_of'][$page['image_id']]) )
    4143{
    4244  page_not_found(
     
    100102// |                            initialization                             |
    101103// +-----------------------------------------------------------------------+
    102 
    103 $page['rank_of'] = array_flip($page['items']);
    104104
    105105// caching first_rank, last_rank, current_rank in the displayed
     
    868868  include(PHPWG_ROOT_PATH.'include/picture_metadata.inc.php');
    869869}
    870 //------------------------------------------------------------ log informations
    871 pwg_log($picture['current']['id'], 'picture');
    872870
    873871include(PHPWG_ROOT_PATH.'include/page_header.php');
    874872trigger_action('loc_end_picture');
    875873$template->pparse('picture');
     874//------------------------------------------------------------ log informations
     875pwg_log($picture['current']['id'], 'picture');
    876876include(PHPWG_ROOT_PATH.'include/page_tail.php');
    877877?>
Note: See TracChangeset for help on using the changeset viewer.