Difference between revisions of "Issue:%TOTALPAGES% is incorrect when allowUnlimitedResults=true"
From FollowTheScore
(New page: {{Issue |Type = Bug | Change Request <-- please select |Extension = DPL | Wgraph | aiSee | Call <-- please select |Version = ? |Description = |Status = open }} =...) |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 9: | Line 9: | ||
== Problem == | == Problem == | ||
If you set allowUnlimitedResults to true (the global variable doesn't work, so I did it in DPLSetup.php), and use count to limit a query, %TOTALPAGES% will be limited (i.e. if you set the count to 10 and there are more than 10 pages, it will still be 10, i.e. the same as %PAGES%) -- [[User:Nx|<span style="color:teal">'''''Nx'''''</span>]] / [[User talk:Nx|''talk'']] 07:34, 28 July 2010 (UTC) | If you set allowUnlimitedResults to true (the global variable doesn't work, so I did it in DPLSetup.php), and use count to limit a query, %TOTALPAGES% will be limited (i.e. if you set the count to 10 and there are more than 10 pages, it will still be 10, i.e. the same as %PAGES%) -- [[User:Nx|<span style="color:teal">'''''Nx'''''</span>]] / [[User talk:Nx|''talk'']] 07:34, 28 July 2010 (UTC) | ||
+ | :I found the source of the problem: | ||
+ | <pre> | ||
+ | if ( !ExtDynamicPageList::$allowUnlimitedResults && $sGoal != 'categories' | ||
+ | && strpos($sResultsHeader.$sResultsFooter.$sNoResultsHeader,'%TOTALPAGES%')!==false) $sSqlCalcFoundRows = 'SQL_CALC_FOUND_ROWS'; | ||
+ | </pre> | ||
+ | |||
+ | in DPLMain.php. I think it should be something like this: | ||
+ | |||
+ | <pre> | ||
+ | if ( (!ExtDynamicPageList::$allowUnlimitedResults || $sCount) && $sGoal != 'categories' | ||
+ | && strpos($sResultsHeader.$sResultsFooter.$sNoResultsHeader,'%TOTALPAGES%')!==false) $sSqlCalcFoundRows = 'SQL_CALC_FOUND_ROWS'; | ||
+ | </pre> | ||
+ | |||
+ | -- [[User:Nx|<span style="color:teal">'''''Nx'''''</span>]] / [[User talk:Nx|''talk'']] 07:49, 28 July 2010 (UTC) | ||
== Reply == | == Reply == | ||
+ | |||
+ | Thaks, I will take this into consideration for the next release. Now taht MW 1.16 seems to be stable, it is time for a new version of DPL. [[User:Gero|Gero]] 16:39, 31 July 2010 (UTC) |
Latest revision as of 18:39, 31 July 2010
Description: | |
Extension / Version: | DPL / ? |
Type / Status: | Bug / open |
Problem
If you set allowUnlimitedResults to true (the global variable doesn't work, so I did it in DPLSetup.php), and use count to limit a query, %TOTALPAGES% will be limited (i.e. if you set the count to 10 and there are more than 10 pages, it will still be 10, i.e. the same as %PAGES%) -- Nx / talk 07:34, 28 July 2010 (UTC)
- I found the source of the problem:
if ( !ExtDynamicPageList::$allowUnlimitedResults && $sGoal != 'categories' && strpos($sResultsHeader.$sResultsFooter.$sNoResultsHeader,'%TOTALPAGES%')!==false) $sSqlCalcFoundRows = 'SQL_CALC_FOUND_ROWS';
in DPLMain.php. I think it should be something like this:
if ( (!ExtDynamicPageList::$allowUnlimitedResults || $sCount) && $sGoal != 'categories' && strpos($sResultsHeader.$sResultsFooter.$sNoResultsHeader,'%TOTALPAGES%')!==false) $sSqlCalcFoundRows = 'SQL_CALC_FOUND_ROWS';
-- Nx / talk 07:49, 28 July 2010 (UTC)
Reply
Thaks, I will take this into consideration for the next release. Now taht MW 1.16 seems to be stable, it is time for a new version of DPL. Gero 16:39, 31 July 2010 (UTC)