The branch, master has been updated via 9f4dc046919871544b5fa4503d78d11c04049d23 (commit) from 81cddb25147c648f23144d2b34acd31e9f460b84 (commit)
- Log ----------------------------------------------------------------- commit 9f4dc046919871544b5fa4503d78d11c04049d23 Author: Marc Delisle marc@infomarc.info Date: Fri Nov 5 06:30:21 2010 -0400
no need to have a separate file for this
-----------------------------------------------------------------------
Summary of changes: db_structure.php | 2 +- libraries/build_action_titles.inc.php | 25 ------------------------- libraries/common.lib.php | 23 +++++++++++++++++++++++ tbl_create.php | 2 +- 4 files changed, 25 insertions(+), 27 deletions(-) delete mode 100644 libraries/build_action_titles.inc.php
diff --git a/db_structure.php b/db_structure.php index c4a5517..d5c960d 100644 --- a/db_structure.php +++ b/db_structure.php @@ -52,7 +52,7 @@ $db_collation = PMA_getDbCollation($db);
// in a separate file to avoid redeclaration of functions in some code paths require_once './libraries/db_structure.lib.php'; -require_once './libraries/build_action_titles.inc.php'; +$titles = PMA_buildActionTitles();
// 1. No tables if ($num_tables == 0) { diff --git a/libraries/build_action_titles.inc.php b/libraries/build_action_titles.inc.php deleted file mode 100644 index fe9dd5f..0000000 --- a/libraries/build_action_titles.inc.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -/* vim: set expandtab sw=4 ts=4 sts=4: */ -/** - * - * @package phpMyAdmin - */ -if (! defined('PHPMYADMIN')) { - exit; -} - -$titles = array(); - -$titles['Browse'] = PMA_getIcon('b_browse.png', __('Browse'), true); -$titles['NoBrowse'] = PMA_getIcon('bd_browse.png', __('Browse'), true); -$titles['Search'] = PMA_getIcon('b_select.png', __('Search'), true); -$titles['NoSearch'] = PMA_getIcon('bd_select.png', __('Search'), true); -$titles['Insert'] = PMA_getIcon('b_insrow.png', __('Insert'), true); -$titles['NoInsert'] = PMA_getIcon('bd_insrow.png', __('Insert'), true); -$titles['Structure'] = PMA_getIcon('b_props.png', __('Structure'), true); -$titles['Drop'] = PMA_getIcon('b_drop.png', __('Drop'), true); -$titles['NoDrop'] = PMA_getIcon('bd_drop.png', __('Drop'), true); -$titles['Empty'] = PMA_getIcon('b_empty.png', __('Empty'), true); -$titles['NoEmpty'] = PMA_getIcon('bd_empty.png', __('Empty'), true); - -?> diff --git a/libraries/common.lib.php b/libraries/common.lib.php index e91eab1..ec5100f 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2990,4 +2990,27 @@ function PMA_selectUploadFile($import_list, $uploaddir) { echo '<i>There are no files to upload</i>'; } } + +/** + * Build titles and icons for action links + * + * @return array the action titles + * @uses PMA_getIcon() + */ +function PMA_buildActionTitles() { + $titles = array(); + + $titles['Browse'] = PMA_getIcon('b_browse.png', __('Browse'), true); + $titles['NoBrowse'] = PMA_getIcon('bd_browse.png', __('Browse'), true); + $titles['Search'] = PMA_getIcon('b_select.png', __('Search'), true); + $titles['NoSearch'] = PMA_getIcon('bd_select.png', __('Search'), true); + $titles['Insert'] = PMA_getIcon('b_insrow.png', __('Insert'), true); + $titles['NoInsert'] = PMA_getIcon('bd_insrow.png', __('Insert'), true); + $titles['Structure'] = PMA_getIcon('b_props.png', __('Structure'), true); + $titles['Drop'] = PMA_getIcon('b_drop.png', __('Drop'), true); + $titles['NoDrop'] = PMA_getIcon('bd_drop.png', __('Drop'), true); + $titles['Empty'] = PMA_getIcon('b_empty.png', __('Empty'), true); + $titles['NoEmpty'] = PMA_getIcon('bd_empty.png', __('Empty'), true); + return $titles; +} ?> diff --git a/tbl_create.php b/tbl_create.php index 8077550..4ba641e 100644 --- a/tbl_create.php +++ b/tbl_create.php @@ -38,7 +38,7 @@ require_once './libraries/common.inc.php'; $action = 'tbl_create.php';
require_once './libraries/header.inc.php'; -require_once './libraries/build_action_titles.inc.php'; +$titles = PMA_buildActionTitles();
// Check parameters PMA_checkParameters(array('db'));
hooks/post-receive