"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libraries/classes/Twig/RelationExtension.php" between
phpMyAdmin-5.0.4-english.zip and phpMyAdmin-5.1.0-english.zip

About: phpMyAdmin is a tool to administrate MySQL databases over the Web (requires at least PHP 7.1).

RelationExtension.php  (phpMyAdmin-5.0.4-english):RelationExtension.php  (phpMyAdmin-5.1.0-english)
<?php <?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* hold PhpMyAdmin\Twig\RelationExtension class
*
* @package PhpMyAdmin\Twig
*/
declare(strict_types=1); declare(strict_types=1);
namespace PhpMyAdmin\Twig; namespace PhpMyAdmin\Twig;
use PhpMyAdmin\Relation; use PhpMyAdmin\Relation;
use Twig\Extension\AbstractExtension; use Twig\Extension\AbstractExtension;
use Twig\TwigFunction; use Twig\TwigFunction;
/**
* Class RelationExtension
*
* @package PhpMyAdmin\Twig
*/
class RelationExtension extends AbstractExtension class RelationExtension extends AbstractExtension
{ {
/** /**
* Returns a list of functions to add to the existing list. * Returns a list of functions to add to the existing list.
* *
* @return TwigFunction[] * @return TwigFunction[]
*/ */
public function getFunctions() public function getFunctions()
{ {
$relation = new Relation($GLOBALS['dbi']); global $dbi;
$relation = new Relation($dbi);
return [ return [
new TwigFunction( new TwigFunction(
'foreign_dropdown', 'foreign_dropdown',
[ [
$relation, $relation,
'foreignDropdown', 'foreignDropdown',
], ],
['is_safe' => ['html']] ['is_safe' => ['html']]
), ),
new TwigFunction( new TwigFunction(
 End of changes. 3 change blocks. 
12 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)