Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted November 12, 20159 yr 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;
November 12, 20159 yr Author 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
November 12, 20159 yr 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.
April 29, 20168 yr @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.
Archived
This topic is now archived and is closed to further replies.