newbie LAC Posted November 12, 2015 Posted November 12, 2015 Hello, How long will you have to cut the functionality? Advanced search removed Pagination... I need passed all rows to get real count pages. What do you'll get if count( $this->dataSource ) will be too much. "Fatal error: Allowed memory size of" public function getRows( $advancedSearchValues ) { /* Sort out paging */ $this->count = count( $this->dataSource ); $this->pages = ceil( $this->count / $this->limit ); Earlier I can set $table->pages = $pages; $table->count = $count;
newbie LAC Posted November 12, 2015 Author Posted November 12, 2015 2 hours ago, Mark said: I don't understand the question. t 4.0 I can create the table $limit = 20; $page = (isset( \IPS\Request::i()->page ) and (intval( \IPS\Request::i()->page ) > 0)) ? \IPS\Request::i()->page : 1; $start = ( $limit * ( $page - 1 ) ); $data = \IPS\Db::i()->select( '*', 'test_table', NULL, NULL, array( $start, $limit ), NULL, NULL, \IPS\Db::SELECT_SQL_CALC_FOUND_ROWS ); $table = new \IPS\Helpers\Table\Custom( iterator_to_array($data), \IPS\Http\Url::internal( 'some_url' ) ); $table->count = $count = $data->count( TRUE ); $table->pages = ceil( $count / $limit ); Result 4.1 Table looks like without pagination $table->count and $table->pages overridden public function getRows( $advancedSearchValues ) { /* Sort out paging */ $this->count = count( $this->dataSource ); $this->pages = ceil( $this->count / $this->limit ); On 4.1 if I'll want create the same table I need provide all rows $data = \IPS\Db::i()->select( '*', 'test_table' ); $table = new \IPS\Helpers\Table\Custom( iterator_to_array($data), \IPS\Http\Url::internal( 'some_url' ) ); Try it Every time you remove a functional. Allow us set table properties
Adriano Faria Posted November 12, 2015 Posted November 12, 2015 8 minutes ago, Matt said: Fixed in 4.1.5 Can't this be included in 4.1.4? I have an paid app with 40+ clients wanting a fix for this. The pagination disappeared on my custom table. Tks.
Adriano Faria Posted November 18, 2015 Posted November 18, 2015 27 minutes ago, bfarber said: This will be pushed into 4.1.4 Thank you.
Adriano Faria Posted April 29, 2016 Posted April 29, 2016 @Matt @Mark @bfarber Please, do not forget of the refactory of the CUSTOM table: There are other topics and bug reports that I couldn't find now. We can't make a simple pagination by using LIMIT. We can't add a simple advanced search.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.