From 5939fff76f4b0863d144ede47dc1d74933ed35f3 Mon Sep 17 00:00:00 2001 From: Makoto Chiba Date: Wed, 28 Feb 2018 23:42:19 +0900 Subject: [PATCH 1/4] hideBlock method didn't exist so it can be deleted. --- tests/ITTest.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/tests/ITTest.php b/tests/ITTest.php index 3e08f8d..a8abeaf 100644 --- a/tests/ITTest.php +++ b/tests/ITTest.php @@ -172,28 +172,6 @@ function testTouchBlock() // Not available in stock class - /** - * - */ - /* - function testHideBlock() - { - if (!$this->_methodExists('hideBlock')) { - return; - } - $result = $this->tpl->loadTemplateFile('blockiteration.html', false, true); - if (PEAR::isError($result)) { - $this->assertTrue(false, 'Error loading template file: '. $result->getMessage()); - } - $this->tpl->setVariable(array( - 'outer' => 'data', - 'inner' => 'stuff' - )); - // inner_block is not empty, but should be removed nonetheless - $this->tpl->hideBlock('inner_block'); - $this->assertEquals('data#', $this->_stripWhitespace($this->tpl->get())); - } - */ /** * */ From 00761a670481a7b64eb9a244af19a69f1312a30e Mon Sep 17 00:00:00 2001 From: Makoto Chiba Date: Wed, 28 Feb 2018 23:42:49 +0900 Subject: [PATCH 2/4] It was unused variable related with deleted hideBlock method. --- HTML/Template/IT.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/HTML/Template/IT.php b/HTML/Template/IT.php index df95a10..d3632d9 100755 --- a/HTML/Template/IT.php +++ b/HTML/Template/IT.php @@ -299,14 +299,6 @@ class HTML_Template_IT */ var $touchedBlocks = array(); - /** - * List of blocks which should not be shown even if not "empty" - * @var array $_hiddenBlocks - * @see hideBlock(), $removeEmptyBlocks - * @access private - */ - var $_hiddenBlocks = array(); - /** * Variable cache. * From afb935f7ac29dbbe5ee64eba3acaa347d6eb104b Mon Sep 17 00:00:00 2001 From: Makoto Chiba Date: Wed, 28 Feb 2018 23:45:11 +0900 Subject: [PATCH 3/4] setGlobalVariable method didn't exist so it can be deleted. --- tests/ITTest.php | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/tests/ITTest.php b/tests/ITTest.php index a8abeaf..ac95752 100644 --- a/tests/ITTest.php +++ b/tests/ITTest.php @@ -172,34 +172,6 @@ function testTouchBlock() // Not available in stock class - /** - * - */ - /* - function testSetGlobalVariable() - { - if (!$this->_methodExists('setGlobalVariable')) { - return; - } - $result = $this->tpl->loadTemplateFile('globals.html', false, true); - if (PEAR::isError($result)) { - $this->assertTrue(false, 'Error loading template file: '. $result->getMessage()); - } - $this->tpl->setGlobalVariable('glob', 'glob'); - // {var2} is not, block_two should be removed - $this->tpl->setVariable(array( - 'var1' => 'one', - 'var3' => 'three' - )); - for ($i = 0; $i < 3; $i++) { - $this->tpl->setVariable('var4', $i + 1); - $this->tpl->parse('block_four'); - } // for - $this->assertEquals('glob:one#glob:three|glob:1|glob:2|glob:3#', $this->_stripWhitespace($this->tpl->get())); - } - */ - - /** * Test for bug #9501. preg_replace treat $ and \ as * backreferences. IT escapes them. From 5e12f9dc3338bc1a28521354836a53901e0acbb7 Mon Sep 17 00:00:00 2001 From: Makoto Chiba Date: Wed, 28 Feb 2018 23:45:52 +0900 Subject: [PATCH 4/4] globals.html was unused file so it can be deleted. --- package.xml | 1 - tests/templates/globals.html | 13 ------------- 2 files changed, 14 deletions(-) delete mode 100644 tests/templates/globals.html diff --git a/package.xml b/package.xml index c34a0d6..970e7dd 100644 --- a/package.xml +++ b/package.xml @@ -68,7 +68,6 @@ There are two classes to use for templating. HTML_Template_IT is used for basic - diff --git a/tests/templates/globals.html b/tests/templates/globals.html deleted file mode 100644 index 7157f12..0000000 --- a/tests/templates/globals.html +++ /dev/null @@ -1,13 +0,0 @@ - -{glob}:{var1}# - - -{glob}:{var2}# - - -{glob}:{var3} - - |{glob}:{var4} - -# -