Changeset 2999:7a766509c5aa
- Timestamp:
- 04/22/15 11:57:45 (10 years ago)
- Branch:
- default
- committer:
- Nicolas <nikrou77@gmail.com> 1429696695 -7200
- Files:
-
- 4 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r2931 r2999 22 22 ./$(DC)/inc/libs/clearbricks/.atoum.* ./$(DC)/inc/libs/clearbricks/vendor \ 23 23 ./$(DC)/inc/libs/clearbricks/bin ./$(DC)/inc/libs/clearbricks/_dist \ 24 ./$(DC)/.atoum.* ./$(DC)/test ./$(DC)/travis \ 24 25 ./$(DC)/features ./$(DC)/travis ./$(DC)/behat.yml.dist ./$(DC)/composer.* 25 26 -
inc/core/class.dc.core.php
r2753 r2999 573 573 574 574 if (!empty($params['order']) && !$count_only) { 575 $strReq .= 'ORDER BY '.$this->con->escape($params['order']).' '; 575 if (preg_match('`^([^. ]+) (?:asc|desc)`i',$params['order'],$matches)) { 576 if (in_array($matches[1],array('user_id','user_name','user_firstname','user_displayname'))) { 577 $table_prefix = 'U'; 578 } else { 579 $table_prefix = 'P'; // order = nb_post (asc|desc) 580 } 581 $strReq .= 'ORDER BY '.$table_prefix.'.'.$this->con->escape($params['order']).' '; 582 } else { 583 $strReq .= 'ORDER BY '.$this->con->escape($params['order']).' '; 584 } 576 585 } else { 577 586 $strReq .= 'ORDER BY U.user_id ASC ';
Note: See TracChangeset
for help on using the changeset viewer.