CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#11876] class.CmsLayoutTemplateQuery.php not implemented as documented + query fatal error on unimplemented filters

avatar
Created By: Deleted User (deleteduser_11200)
Date Submitted: Wed Aug 22 13:35:58 -0400 2018

Assigned To:
Version: 2.2.8
CMSMS Version: 2.2.8
Severity: Major
Resolution: Fixed
State: Closed
Summary:
class.CmsLayoutTemplateQuery.php not implemented as documented + query fatal error on unimplemented filters
Detailed Description:
http://viewsvn.cmsmadesimple.org/filedetails.php?repname=cmsmadesimple&path=%2Ftrunk%2Flib%2Fclasses%2Fclass.CmsLayoutTemplateQuery.php

class.CmsLayoutTemplateQuery.php documentation reads:

 * A class to represent a template query, and its results.
* This class accepts in it's constructor an array (or a comma separated string,
of filter arguments).
 * Accepted filter arguments are:<br/>
 *  o:string - The originator name<br/>
 *  i:##,##,## - A list of template id's<br/>
 *  t:## - A template type id<br/>
 *  c:## - A template category id.<br/>
 *  d:## - A design id<br/>
 *  u:## - A template owner id<br/>
 *  e:## - An additional editor id.<br/>
 *  l:#  - A boolean (0 or 1) indicating listable, or not listable.


* If you run the following code the query gives a fatal error:

$query_param = 'i:'.$template_id;
$tpls = CmsLayoutTemplate::template_query(array($query_param, 'as_list' => 1));
print "tpls:\n";
print_r($tpls);

* The following code fragement works:

$query_param = 'idlist:'.$template_id;
$tpls = CmsLayoutTemplate::template_query(array($query_param, 'as_list' => 1));
print "tpls:\n";
print_r($tpls);
 



History

Comments
avatar
Date: 2018-08-22 13:44
Posted By: Deleted User (deleteduser_11200)

Perhaps comments //id list, // type.....  in the switch statement are not
allowed?

case 'i': // id list
case 'idlist':

case 't': // type
case 'type':
      
avatar
Date: 2018-08-25 09:48
Posted By: Robert Campbell (calguy1000)

Fixed in SVN
      
Updates

Updated: 2024-05-06 11:13
state: Open => Closed

Updated: 2018-08-25 09:48
resolution_id: => 7
severity_id: 1 => 2