Index: branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_News.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_News.php	(revision 22581)
+++ branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_News.php	(revision 22796)
@@ -32,6 +32,5 @@
  * @version $Id$
  */
-class LC_Page_FrontParts_Bloc_News extends LC_Page_FrontParts_Bloc_Ex 
-{
+class LC_Page_FrontParts_Bloc_News extends LC_Page_FrontParts_Bloc_Ex {
 
     // }}}
@@ -43,6 +42,5 @@
      * @return void
      */
-    function init()
-    {
+    function init() {
         parent::init();
     }
@@ -53,6 +51,5 @@
      * @return void
      */
-    function process()
-    {
+    function process() {
         $this->action();
         $this->sendResponse();
@@ -64,8 +61,6 @@
      * @return void
      */
-    function action()
-    {
-
-        $objNews = new SC_Helper_News_Ex();
+    function action() {
+
         $objFormParam = new SC_FormParam_Ex();
         switch ($this->getMode()) {
@@ -76,6 +71,6 @@
                 $this->arrErr = $objFormParam->checkError(false);
                 if (empty($this->arrErr)) {
-                    $arrData = $objFormParam->getHashArray();
-                    $json = $this->lfGetNewsForJson($arrData, $objNews);
+
+                    $json = $this->lfGetNewsForJson($objFormParam);
                     echo $json;
                     SC_Response_Ex::actionExit();
@@ -91,6 +86,6 @@
                 $this->arrErr = $objFormParam->checkError(false);
                 if (empty($this->arrErr)) {
-                    $arrData = $objFormParam->getHashArray();
-                    $json = $this->lfGetNewsDetailForJson($arrData, $objNews);
+
+                    $json = $this->lfGetNewsDetailForJson($objFormParam);
                     echo $json;
                     SC_Response_Ex::actionExit();
@@ -101,6 +96,6 @@
                 break;
             default:
-                $this->arrNews = $objNews->getList();
-                $this->newsCount = $objNews->getCount();
+                $this->newsCount = $this->lfGetNewsCount();
+                $this->arrNews = $this->lfGetNews(SC_Query_Ex::getSingletonInstance());
                 break;
         }
@@ -113,6 +108,5 @@
      * @return void
      */
-    function destroy()
-    {
+    function destroy() {
         parent::destroy();
     }
@@ -124,6 +118,5 @@
      * @return void
      */
-    function lfInitNewsParam(&$objFormParam)
-    {
+    function lfInitNewsParam(&$objFormParam) {
         $objFormParam->addParam('現在ページ', 'pageno', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'), '', false);
         $objFormParam->addParam('表示件数', 'disp_number', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'), '', false);
@@ -136,7 +129,7 @@
      * @return array $arrNewsList 新着情報の配列を返す
      */
-    function lfGetNews($dispNumber, $pageNo, SC_Helper_News_Ex $objNews)
-    {
-        $arrNewsList = $objNews->getList($dispNumber, $pageNo);
+    function lfGetNews(&$objQuery) {
+        $objQuery->setOrder('rank DESC ');
+        $arrNewsList = $objQuery->select('* , cast(news_date as date) as news_date_disp', 'dtb_news' ,'del_flg = 0');
 
         // モバイルサイトのセッション保持 (#797)
@@ -159,17 +152,22 @@
      * (ページと表示件数を指定)
      *
-     * @param array $arrData フォーム入力値
-     * @param object $objNews
+     * @param array $objFormParam フォームパラメータークラス
      * @return String $json 新着情報のJSONを返す
      */
-    function lfGetNewsForJson($arrData, SC_Helper_News_Ex $objNews)
-    {
+    function lfGetNewsForJson(&$objFormParam) {
+
+        $objQuery =& SC_Query_Ex::getSingletonInstance();
+        $arrData = $objFormParam->getHashArray();
 
         $dispNumber = $arrData['disp_number'];
         $pageNo = $arrData['pageno'];
-        $arrNewsList = $this->lfGetNews($dispNumber, $pageNo, $objNews);
+        if (!empty($dispNumber) && !empty($pageNo)) {
+            $objQuery->setLimitOffset($dispNumber, (($pageNo - 1) * $dispNumber));
+        }
+
+        $arrNewsList = $this->lfGetNews($objQuery);
 
         //新着情報の最大ページ数をセット
-        $newsCount = $objNews->getCount();
+        $newsCount = $this->lfGetNewsCount();
         $arrNewsList['news_page_count'] = ceil($newsCount / 3);
 
@@ -183,15 +181,32 @@
      * (news_idを指定)
      *
-     * @param array $arrData フォーム入力値
-     * @param object $objNews
+     * @param array $objFormParam フォームパラメータークラス
      * @return String $json 新着情報1件分のJSONを返す
      */
-    function lfGetNewsDetailForJson($arrData, SC_Helper_News_Ex $objNews)
-    {
-
-        $arrNewsList = $objNews->get($arrData['news_id']);
+    function lfGetNewsDetailForJson(&$objFormParam) {
+
+        $objQuery = SC_Query_Ex::getSingletonInstance();
+        $arrData = $objFormParam->getHashArray();
+        $newsId = $arrData['news_id'];
+        $arrNewsList = $objQuery->select(' * , cast(news_date as date) as news_date_disp ',' dtb_news '," del_flg = '0' AND news_id = ? ", array($newsId));
+
         $json =  SC_Utils_Ex::jsonEncode($arrNewsList);    //JSON形式
 
         return $json;
+    }
+
+    /**
+     * 新着情報の件数を取得する
+     *
+     * @return Integer $count 新着情報の件数を返す
+     */
+    function lfGetNewsCount() {
+
+        $count = 0;
+
+        $objQuery = SC_Query_Ex::getSingletonInstance();
+        $count = $objQuery->count('dtb_news', "del_flg = '0'");
+
+        return $count;
     }
 
@@ -202,6 +217,5 @@
      * @return string JSON 形式のエラーメッセージ
      */
-    function lfGetErrors($arrErr)
-    {
+    function lfGetErrors($arrErr) {
         $messages = '';
         foreach ($arrErr as $val) {
