[dev] [commit] r1021 - phplib/models wwwbase/ajax wwwbase/js

Cătălin Frâncu cata at francu.com
Mon Oct 14 11:16:02 EEST 2013


> New Revision: 1021
>
> Log:
> Completed Todos promised in revision 1018. Tags information is editable within the table
> on row double click or on edit button.
> Table pager is now working as I've corrected the way data is loaded.

> +  	return $orm->limit($quantity)->offset($from);
> +$lines = VisualTag::factory('VisualTag')->where('imageId', $imageId)
> +  ->filter('limit', ($page - 1) * $limit, $limit)->find_many();

Simpatică chestia asta cu filter(), n-o știam. Dar chiar este necesară? 
Nu poți să zici direct așa?

$lines = VisualTag::factory('VisualTag')->where('imageId', $imageId)
   ->limit($page - 1) * $limit)->offset($limit)->find_many();

Mă gândesc că intenția lui filter e să trieze rândurile cu mecanisme mai 
complexe, nu doar ceva ce poate fi înlănțuit în query.

În rest, arată perfect.
Cătălin


More information about the Dev mailing list