Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused code #9

Merged
merged 4 commits into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions HTML/Template/IT.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unused variable.

$ git grep _hiddenBlocks
HTML/Template/IT.php:     * @var  array    $_hiddenBlocks
HTML/Template/IT.php:    var $_hiddenBlocks = array();


/**
* Variable cache.
*
Expand Down
1 change: 0 additions & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ There are two classes to use for templating. HTML_Template_IT is used for basic
<file name="tests/templates/blocks.html" role="test" />
<file name="tests/templates/bug_9853_01.tpl" role="test" />
<file name="tests/templates/bug_9853_02.tpl" role="test" />
<file name="tests/templates/globals.html" role="test" />
<file name="tests/templates/include.html" role="test" />
<file name="tests/templates/loadtemplatefile.html" role="test" />
<file name="tests/templates/placeholderreplacementscope.html" role="test" />
Expand Down
50 changes: 0 additions & 50 deletions tests/ITTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,56 +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()));
}
*/
/**
*
*/
/*
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 $<NUM> and \<NUM> as
* backreferences. IT escapes them.
Expand Down
13 changes: 0 additions & 13 deletions tests/templates/globals.html

This file was deleted.