Changeset 1048 for trunk/admin/include


Ignore:
Timestamp:
Feb 20, 2006, 11:14:24 PM (19 years ago)
Author:
plg
Message:

request 290: replace function get_themes name to avoid redeclaration from
Wordpress in jillij template.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions.php

    r1042 r1048  
    13171317function update_average_rate( $element_id=-1 )
    13181318{
    1319   $average_rates = array();
    1320  
    13211319  $query = '
    13221320SELECT element_id,
     
    13301328 
    13311329  $result = pwg_query($query);
     1330
     1331  $datas = array();
     1332 
    13321333  while ($row = mysql_fetch_array($result))
    1333   {
    1334     array_push($average_rates, $row);
    1335   }
    1336 
    1337   $datas = array();
    1338   foreach ($average_rates as $item)
    13391334  {
    13401335    array_push(
    13411336      $datas,
    13421337      array(
    1343         'id' => $item['element_id'],
    1344         'average_rate' => $item['average_rate']
     1338        'id' => $row['element_id'],
     1339        'average_rate' => $row['average_rate']
    13451340        )
    13461341      );
    13471342  }
    1348   $fields = array('primary' => array('id'), 'update' => array('average_rate'));
    1349   mass_updates(IMAGES_TABLE, $fields, $datas);
     1343 
     1344  mass_updates(
     1345    IMAGES_TABLE,
     1346    array(
     1347      'primary' => array('id'),
     1348      'update' => array('average_rate')
     1349      ),
     1350    $datas
     1351    );
    13501352
    13511353  $query='
Note: See TracChangeset for help on using the changeset viewer.