From: <var...@us...> - 2021-09-20 07:56:54
|
Revision: 10572 http://sourceforge.net/p/phpwiki/code/10572 Author: vargenau Date: 2021-09-20 07:56:53 +0000 (Mon, 20 Sep 2021) Log Message: ----------- Simplify initialisation of toc counter Modified Paths: -------------- trunk/lib/plugin/CreateToc.php Modified: trunk/lib/plugin/CreateToc.php =================================================================== --- trunk/lib/plugin/CreateToc.php 2021-09-17 16:35:51 UTC (rev 10571) +++ trunk/lib/plugin/CreateToc.php 2021-09-20 07:56:53 UTC (rev 10572) @@ -70,13 +70,6 @@ ); } - // Initialisation of toc counter - private function initTocCounter() - { - $counter = array(1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0); - return $counter; - } - // Update toc counter with a new title private function tocCounter(&$counter, $level) { @@ -258,7 +251,7 @@ $counter, $levels, $firstlevelstyle, $basepage) { if (!$levels) $levels = array(1, 2); - $tocCounter = $this->initTocCounter(); + $tocCounter = array(1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0); reset($levels); sort($levels); $headers = array(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |