Permalink
Browse files

Rename selectExtra to selectEmail

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@924 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
jakubvrana
jakubvrana committed Jul 28, 2009
1 parent a3d2266 commit 1a6a73adbc7c6d037b4f45e27f1ef992fe452f8d
Showing with 24 additions and 24 deletions.
  1. +8 −8 adminer/include/adminer.inc.php
  2. +2 −2 adminer/select.inc.php
  3. +14 −14 editor/include/adminer.inc.php
@@ -236,6 +236,13 @@ function selectActionPrint() {
echo "</div></fieldset>\n";
}
+ /** Print extra text in the end of a select form
+ * @param array fields holding e-mails
+ * @return null
+ */
+ function selectEmailPrint($emailFields) {
+ }
+
/** Process columns box in select
* @param array selectable columns
* @return array (array(select_expressions), array(group_expressions))
@@ -322,18 +329,11 @@ function selectLengthProcess() {
return (isset($_GET["text_length"]) ? $_GET["text_length"] : "100");
}
- /** Print extra text in the end of a select form
- * @param array fields holding e-mails
- * @return null
- */
- function selectExtraPrint($emailFields) {
- }
-
/** Process extras in select form
* @param array AND conditions
* @return bool true if processed, false to process other parts of form
*/
- function selectExtraProcess($where) {
+ function selectEmailProcess($where) {
return false;
}
View
@@ -54,7 +54,7 @@ function apply_sql_function($function, $column) {
}
exit;
}
- if (!$adminer->selectExtraProcess($where)) {
+ if (!$adminer->selectEmailProcess($where)) {
if (!$_POST["import"]) { // edit
$result = true;
$affected = 0;
@@ -272,7 +272,7 @@ function apply_sql_function($function, $column) {
}
echo "<fieldset><legend>" . lang('CSV Import') . "</legend><div><input type='hidden' name='token' value='$token'><input type='file' name='csv_file'> <input type='submit' name='import' value='" . lang('Import') . "'></div></fieldset>\n";
- $adminer->selectExtraPrint(array_filter($email_fields, 'strlen'));
+ $adminer->selectEmailPrint(array_filter($email_fields, 'strlen'));
echo "</form>\n";
}
@@ -183,6 +183,19 @@ function selectActionPrint() {
echo "</div></fieldset>\n";
}
+ function selectEmailPrint($emailFields) {
+ global $confirm;
+ if ($emailFields) {
+ echo '<fieldset><legend><a href="#fieldset-email" onclick="return !toggle(\'fieldset-email\');">' . lang('E-mail') . "</a></legend><div id='fieldset-email' class='hidden'>\n";
+ echo "<p>" . lang('From') . ": <input name='email_from'>\n";
+ echo lang('Subject') . ": <input name='email_subject'>\n";
+ echo "<p><textarea name='email_message' rows='15' cols='60'></textarea>\n";
+ echo "<p>" . (count($emailFields) == 1 ? '<input type="hidden" name="email_field" value="' . htmlspecialchars(key($emailFields)) . '">' : '<select name="email_field">' . optionlist($emailFields) . '</select> ');
+ echo "<input type='submit' name='email' value='" . lang('Send') . "'$confirm>\n";
+ echo "</div></fieldset>\n";
+ }
+ }
+
function selectColumnsProcess($columns, $indexes) {
return array(array(), array());
}
@@ -230,20 +243,7 @@ function selectLengthProcess() {
return "100";
}
- function selectExtraPrint($emailFields) {
- global $confirm;
- if ($emailFields) {
- echo '<fieldset><legend><a href="#fieldset-email" onclick="return !toggle(\'fieldset-email\');">' . lang('E-mail') . "</a></legend><div id='fieldset-email' class='hidden'>\n";
- echo "<p>" . lang('From') . ": <input name='email_from'>\n";
- echo lang('Subject') . ": <input name='email_subject'>\n";
- echo "<p><textarea name='email_message' rows='15' cols='60'></textarea>\n";
- echo "<p>" . (count($emailFields) == 1 ? '<input type="hidden" name="email_field" value="' . htmlspecialchars(key($emailFields)) . '">' : '<select name="email_field">' . optionlist($emailFields) . '</select> ');
- echo "<input type='submit' name='email' value='" . lang('Send') . "'$confirm>\n";
- echo "</div></fieldset>\n";
- }
- }
-
- function selectExtraProcess($where) {
+ function selectEmailProcess($where) {
global $dbh;
if ($_POST["email"]) {
$sent = 0;

0 comments on commit 1a6a73a

Please sign in to comment.