Dotclear

Changeset 2627:9d1adf085d11


Ignore:
Timestamp:
12/31/13 09:45:56 (10 years ago)
Author:
Dsls
Branch:
2.6
Children:
2628:a46041c31f11, 2631:505e3c81524e
Message:

Fixed "where false" sqlite incompatibility, fixes #1910

Location:
inc/admin/actions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/actions/class.dcactioncomments.php

    r2550 r2627  
    8989 
    9090     protected function fetchEntries($from) { 
     91          $params=array(); 
    9192          if (!empty($from['comments'])) { 
    9293               $comments = $from['comments']; 
     
    9798 
    9899               $params['sql'] = 'AND C.comment_id IN('.implode(',',$comments).') '; 
     100          } else { 
     101               $params['sql'] = 'AND 1=0 '; 
     102          } 
    99103 
    100                if (!isset($from['full_content']) || empty($from['full_content'])) { 
    101                     $params['no_content'] = true; 
    102                } 
    103  
    104                $co = $this->core->blog->getComments($params); 
    105                while ($co->fetch())     { 
    106                     $this->entries[$co->comment_id] = array( 
    107                          'title' => $co->post_title, 
    108                          'author' => $co->comment_author 
    109                     ); 
    110                } 
    111                $this->rs = $co; 
    112           } else { 
    113                $this->rs = $this->core->con->select("SELECT blog_id FROM ".$this->core->prefix."blog WHERE false");; 
     104          if (!isset($from['full_content']) || empty($from['full_content'])) { 
     105               $params['no_content'] = true; 
    114106          } 
     107          $co = $this->core->blog->getComments($params); 
     108          while ($co->fetch())     { 
     109               $this->entries[$co->comment_id] = array( 
     110                    'title' => $co->post_title, 
     111                    'author' => $co->comment_author 
     112               ); 
     113          } 
     114          $this->rs = $co; 
    115115     } 
    116116} 
  • inc/admin/actions/class.dcactionposts.php

    r2494 r2627  
    6868 
    6969     protected function fetchEntries($from) { 
     70          $params = array(); 
    7071          if (!empty($from['entries'])) 
    7172          { 
     
    7778 
    7879               $params['sql'] = 'AND P.post_id IN('.implode(',',$entries).') '; 
    79  
    80                if (!isset($from['full_content']) || empty($from['full_content'])) { 
    81                     $params['no_content'] = true; 
    82                } 
    83  
    84                if (isset($from['post_type'])) { 
    85                     $params['post_type'] = $from['post_type']; 
    86                } 
    87  
    88                $posts = $this->core->blog->getPosts($params); 
    89                while ($posts->fetch())  { 
    90                     $this->entries[$posts->post_id] = $posts->post_title; 
    91                } 
    92                $this->rs = $posts; 
    93           } else { 
    94                $this->rs = $this->core->con->select("SELECT blog_id FROM ".$this->core->prefix."blog WHERE false");; 
    95           } 
     80          } else { 
     81               $params['sql'] = 'AND 1=0 '; 
     82          } 
     83 
     84          if (!isset($from['full_content']) || empty($from['full_content'])) { 
     85               $params['no_content'] = true; 
     86          } 
     87 
     88          if (isset($from['post_type'])) { 
     89               $params['post_type'] = $from['post_type']; 
     90          } 
     91 
     92          $posts = $this->core->blog->getPosts($params); 
     93          while ($posts->fetch())  { 
     94               $this->entries[$posts->post_id] = $posts->post_title; 
     95          } 
     96          $this->rs = $posts; 
    9697     } 
    9798} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map