Changeset 2318:0419bb8bae43 for inc
- Timestamp:
- 10/09/13 07:54:35 (12 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.blog.php
r2317 r2318 791 791 } 792 792 793 if ($this->core->con->driver() == 'pgsql' && isset($params['media'])) { 794 $strReq = 'SELECT DISTINCT ON (P.post_id) '; 795 } else { 796 $strReq = 'SELECT '; 797 } 798 $strReq .= 799 'P.post_id, P.blog_id, P.user_id, P.cat_id, post_dt, '. 793 794 $strReq = 795 'SELECT P.post_id, P.blog_id, P.user_id, P.cat_id, post_dt, '. 800 796 'post_tz, post_creadt, post_upddt, post_format, post_password, '. 801 797 'post_url, post_lang, post_title, '.$content_req. … … 943 939 944 940 if (isset($params['media'])) { 945 $strReq .= 'AND P.post_id ';946 941 if ($params['media'] == '0') { 947 $strReq .= 'NOT '; 948 } 949 $strReq .= 'IN (SELECT M.post_id FROM '.$this->prefix.'post_media M '; 942 $strReq .= 'AND NOT '; 943 } else { 944 $strReq .= 'AND '; 945 } 946 $strReq .= 'EXISTS (SELECT M.post_id FROM '.$this->prefix.'post_media M '. 947 'WHERE M.post_id = P.post_id '; 950 948 if (isset($params['link_type'])) { 951 $strReq .= " WHEREM.link_type ".$this->con->in($params['link_type'])." ";949 $strReq .= " AND M.link_type ".$this->con->in($params['link_type'])." "; 952 950 } 953 951 $strReq .= ")";
Note: See TracChangeset
for help on using the changeset viewer.