diff options
author | Brian Evans <grknight@gentoo.org> | 2017-08-04 15:38:22 -0400 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2017-08-04 15:38:22 -0400 |
commit | 174d3e8bf48eb3fb892b43219c778dcea2cb76bd (patch) | |
tree | 9d5c7fcd6c6b5e8d87a5310d5d0a4425f2da77b9 /dev-php | |
parent | net-analyzer/icinga2: 2.7.0 fix multilib=strict builds (diff) | |
download | gentoo-174d3e8bf48eb3fb892b43219c778dcea2cb76bd.tar.gz gentoo-174d3e8bf48eb3fb892b43219c778dcea2cb76bd.tar.bz2 gentoo-174d3e8bf48eb3fb892b43219c778dcea2cb76bd.zip |
dev-php/PEAR-HTML_TreeMenu: Add modern-syntax patch
Package-Manager: Portage-2.3.6, Repoman-2.3.3
Diffstat (limited to 'dev-php')
-rw-r--r-- | dev-php/PEAR-HTML_TreeMenu/PEAR-HTML_TreeMenu-1.2.2-r1.ebuild | 2 | ||||
-rw-r--r-- | dev-php/PEAR-HTML_TreeMenu/files/modern-syntax.patch | 144 |
2 files changed, 146 insertions, 0 deletions
diff --git a/dev-php/PEAR-HTML_TreeMenu/PEAR-HTML_TreeMenu-1.2.2-r1.ebuild b/dev-php/PEAR-HTML_TreeMenu/PEAR-HTML_TreeMenu-1.2.2-r1.ebuild index e16842bc503c..e0f2801b3c50 100644 --- a/dev-php/PEAR-HTML_TreeMenu/PEAR-HTML_TreeMenu-1.2.2-r1.ebuild +++ b/dev-php/PEAR-HTML_TreeMenu/PEAR-HTML_TreeMenu-1.2.2-r1.ebuild @@ -11,6 +11,8 @@ SLOT="0" KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" IUSE="" +PATCHES=( "${FILESDIR}/modern-syntax.patch" ) + src_install() { php-pear-r2_src_install docinto html diff --git a/dev-php/PEAR-HTML_TreeMenu/files/modern-syntax.patch b/dev-php/PEAR-HTML_TreeMenu/files/modern-syntax.patch new file mode 100644 index 000000000000..8b9773d12350 --- /dev/null +++ b/dev-php/PEAR-HTML_TreeMenu/files/modern-syntax.patch @@ -0,0 +1,144 @@ +diff -aurN a/HTML/TreeMenu.php b/HTML/TreeMenu.php +--- a/HTML/TreeMenu.php 2010-10-25 05:10:46.000000000 -0400 ++++ b/HTML/TreeMenu.php 2017-08-04 15:25:16.730007135 -0400 +@@ -83,6 +83,9 @@ + * + * @access public + */ ++ function __construct() ++ { ++ } + function HTML_TreeMenu() + { + // Not much to do here :( +@@ -206,7 +209,7 @@ + case 'heyes_array': + // Need to create a HTML_TreeMenu object ? + if (!isset($params['treeMenu'])) { +- $treeMenu = &new HTML_TreeMenu(); ++ $treeMenu = new HTML_TreeMenu(); + $parentID = 0; + } else { + $treeMenu = &$params['treeMenu']; +@@ -240,7 +243,7 @@ + default: + // Need to create a HTML_TreeMenu object ? + if (!isset($params['treeMenu'])) { +- $treeMenu = &new HTML_TreeMenu(); ++ $treeMenu = new HTML_TreeMenu(); + } else { + $treeMenu = &$params['treeMenu']; + } +@@ -312,7 +315,7 @@ + if (is_string($xml)) { + // Supplied $xml is a string + include_once 'XML/Tree.php'; +- $xmlTree = &new XML_Tree(); ++ $xmlTree = new XML_Tree(); + $xmlTree->getTreeFromString($xml); + } else { + // Supplied $xml is an XML_Tree object +@@ -469,7 +472,7 @@ + * + * @access public + */ +- function HTML_TreeNode($options = array(), $events = array()) ++ function __construct($options = array(), $events = array()) + { + $this->text = ''; + $this->link = ''; +@@ -488,7 +491,10 @@ + $this->$option = $value; + } + } +- ++ function HTML_TreeNode($options = array(), $events = array()) ++ { ++ self::__construct($options, $events); ++ } + /** + * Allows setting of various parameters after the initial constructor call + * +@@ -585,11 +591,14 @@ + * + * @param HTML_TreeMenu &$structure The menu structure + */ +- function HTML_TreeMenu_Presentation(&$structure) ++ function __construct(&$structure) + { + $this->menu = &$structure; + } +- ++ function HTML_TreeMenu_Presentation(&$structure) ++ { ++ self::__construct($structure); ++ } + /** + * Prints the HTML generated by the toHTML() method. + * toHTML() must therefore be defined by the derived +@@ -715,7 +724,7 @@ + * + * @access public + */ +- function HTML_TreeMenu_DHTML(&$structure, $options = array(), $isDynamic = true) ++ function __construct(&$structure, $options = array(), $isDynamic = true) + { + $this->HTML_TreeMenu_Presentation($structure); + $this->isDynamic = $isDynamic; +@@ -733,7 +742,10 @@ + $this->$option = $value; + } + } +- ++ function HTML_TreeMenu_DHTML(&$structure, $options = array(), $isDynamic = true) ++ { ++ self::__construct($structure, $options, $isDynamic); ++ } + /** + * Returns the HTML for the menu. + * +@@ -920,7 +932,7 @@ + * + * @access public + */ +- function HTML_TreeMenu_Listbox($structure, $options = array()) ++ function __construct($structure, $options = array()) + { + $this->HTML_TreeMenu_Presentation($structure); + +@@ -934,7 +946,10 @@ + $this->$option = $value; + } + } +- ++ function HTML_TreeMenu_Listbox($structure, $options = array()) ++ { ++ self::__construct($structure, $options); ++ } + /** + * Returns the HTML generated + * +diff -aurN a/tests/testBug_9750.phpt b/tests/testBug_9750.phpt +--- a/tests/testBug_9750.phpt 2010-10-25 05:10:46.000000000 -0400 ++++ b/tests/testBug_9750.phpt 2017-08-04 15:27:53.691108758 -0400 +@@ -44,17 +44,17 @@ + 'nodeOptions' => $nodeOptions + ); + +-$menu = &HTML_TreeMenu::createFromStructure($options); ++$menu = HTML_TreeMenu::createFromStructure($options); + + // Chose a generator. You can generate DHTML or a Listbox +-$dhtml = &new HTML_TreeMenu_DHTML( ++$dhtml = new HTML_TreeMenu_DHTML( + $menu, + array( + 'images' => 'images', + 'defaultClass' => 'treeMenuDefault' + ) + ); +-$listbox = &new HTML_TreeMenu_ListBox( ++$listbox = new HTML_TreeMenu_ListBox( + $menu, + array( + 'images' => 'images', |