Changeset 21606


Ignore:
Timestamp:
2012/03/07 19:57:59 (10 years ago)
Author:
pingpong
Message:

#1437 新着情報管理にて新着情報削除をすると並び順がおかしくなる場合がある の対応

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents.php

    r21592 r21606  
    318318     */ 
    319319    function computeRankForDelete($news_id,$rank) { 
    320         $objQuery = $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    321         $objQuery->begin(); 
    322         $table = 'dtb_news'; 
    323         $sqlval = array(); 
    324         $sqlval['rank'] = $rank; 
    325         $sqlval['update_date'] = 'CURRENT_TIMESTAMP'; 
    326         $where = 'del_flg = 0 AND rank > ?'; 
    327         $arrValIn = array($rank); 
    328         $objQuery->update($table, $sqlval, $where, $arrValIn); 
    329  
    330         $sqlval = array(); 
    331         $sqlval['rank'] = '0'; 
    332         $sqlval['del_flg'] = '1'; 
    333         $sqlval['update_date'] = 'CURRENT_TIMESTAMP'; 
    334         $where = 'news_id = ?'; 
    335         $arrValIn = array($news_id); 
    336         $objQuery->update($table, $sqlval, $where, $arrValIn); 
    337         $objQuery->commit(); 
     320    SC_Helper_DB_Ex::sfDeleteRankRecord('dtb_news', 'news_id', $news_id); 
    338321    } 
    339322 
Note: See TracChangeset for help on using the changeset viewer.