Skip to content

Commit

Permalink
Remove Database\Designer::getHtmlForPageSelector
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
  • Loading branch information
MauricioFauth committed Oct 12, 2017
1 parent 5650146 commit 0b0833f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
16 changes: 0 additions & 16 deletions libraries/classes/Database/Designer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,6 @@
*/
class Designer
{
/**
* Function to get html to display a page selector
*
* @param array $cfgRelation information about the configuration storage
* @param string $db database name
*
* @return string html content
*/
public static function getHtmlForPageSelector(array $cfgRelation, $db)
{
return Template::get('database/designer/page_selector')->render([
'pdfwork' => $cfgRelation['pdfwork'],
'pages' => self::getPageIdsAndNames($db),
]);
}

/**
* Function to get html for displaying the page edit/delete form
*
Expand Down
5 changes: 4 additions & 1 deletion templates/database/designer/edit_delete_pages.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<label for="selected_page">
<?= $operation == 'editPage' ? __("Page to open") : __("Page to delete"); ?>:
</label>
<?= PhpMyAdmin\Database\Designer::getHtmlForPageSelector($cfgRelation, $db); ?>
<?= PhpMyAdmin\Template::get('database/designer/page_selector')->render([
'pdfwork' => $cfgRelation['pdfwork'],
'pages' => PhpMyAdmin\Database\Designer::getPageIdsAndNames($db),
]); ?>
</fieldset>
</form>
5 changes: 4 additions & 1 deletion templates/database/designer/page_save_as.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ $choices = array(
<tr>
<td>
<input type="hidden" name="operation" value="savePage" />
<?= PhpMyAdmin\Database\Designer::getHtmlForPageSelector($cfgRelation, $db); ?>
<?= PhpMyAdmin\Template::get('database/designer/page_selector')->render([
'pdfwork' => $cfgRelation['pdfwork'],
'pages' => PhpMyAdmin\Database\Designer::getPageIdsAndNames($db),
]); ?>
</td>
</tr>
<tr>
Expand Down

0 comments on commit 0b0833f

Please sign in to comment.