Ignore:
Timestamp:
Aug 2, 2011, 9:20:50 PM (13 years ago)
Author:
rvelices
Message:

rename #images.average_rate to rating_score

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/section_init.inc.php

    r8728 r11893  
    6262    break;
    6363  }
    64  
     64
    6565  // the $_GET keys are not protected in include/common.inc.php, only the values
    6666  $rewritten = pwg_db_real_escape_string($rewritten);
    67  
     67
    6868  $page['root_path'] = PHPWG_ROOT_PATH;
    6969}
     
    464464  {
    465465    $page['super_order_by'] = true;
    466     $conf['order_by'] = ' ORDER BY hit DESC, file ASC';
     466    $conf['order_by'] = ' ORDER BY hit DESC, id DESC';
    467467    $query = '
    468 SELECT DISTINCT(id), hit, file
     468SELECT DISTINCT(id)
    469469  FROM '.IMAGES_TABLE.'
    470470    INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
     
    490490  {
    491491    $page['super_order_by'] = true;
    492     $conf['order_by'] = ' ORDER BY average_rate DESC, id ASC';
     492    $conf['order_by'] = ' ORDER BY rating_score DESC, id DESC';
    493493
    494494    $query ='
    495 SELECT DISTINCT(id), average_rate
     495SELECT DISTINCT(id)
    496496  FROM '.IMAGES_TABLE.'
    497497    INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
    498   WHERE average_rate IS NOT NULL
     498  WHERE rating_score IS NOT NULL
    499499    '.$forbidden.'
    500500    '.$conf['order_by'].'
Note: See TracChangeset for help on using the changeset viewer.