Rename selectExtra to selectEmail
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@924 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
a3d2266a9c
commit
1a6a73adbc
|
@ -236,6 +236,13 @@ class Adminer {
|
||||||
echo "</div></fieldset>\n";
|
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
|
/** Process columns box in select
|
||||||
* @param array selectable columns
|
* @param array selectable columns
|
||||||
* @return array (array(select_expressions), array(group_expressions))
|
* @return array (array(select_expressions), array(group_expressions))
|
||||||
|
@ -322,18 +329,11 @@ class Adminer {
|
||||||
return (isset($_GET["text_length"]) ? $_GET["text_length"] : "100");
|
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
|
/** Process extras in select form
|
||||||
* @param array AND conditions
|
* @param array AND conditions
|
||||||
* @return bool true if processed, false to process other parts of form
|
* @return bool true if processed, false to process other parts of form
|
||||||
*/
|
*/
|
||||||
function selectExtraProcess($where) {
|
function selectEmailProcess($where) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ if ($_POST && !$error) {
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if (!$adminer->selectExtraProcess($where)) {
|
if (!$adminer->selectEmailProcess($where)) {
|
||||||
if (!$_POST["import"]) { // edit
|
if (!$_POST["import"]) { // edit
|
||||||
$result = true;
|
$result = true;
|
||||||
$affected = 0;
|
$affected = 0;
|
||||||
|
@ -272,7 +272,7 @@ if (!$columns) {
|
||||||
}
|
}
|
||||||
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";
|
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";
|
echo "</form>\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,6 +183,19 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5
|
||||||
echo "</div></fieldset>\n";
|
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) {
|
function selectColumnsProcess($columns, $indexes) {
|
||||||
return array(array(), array());
|
return array(array(), array());
|
||||||
}
|
}
|
||||||
|
@ -230,20 +243,7 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5
|
||||||
return "100";
|
return "100";
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectExtraPrint($emailFields) {
|
function selectEmailProcess($where) {
|
||||||
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) {
|
|
||||||
global $dbh;
|
global $dbh;
|
||||||
if ($_POST["email"]) {
|
if ($_POST["email"]) {
|
||||||
$sent = 0;
|
$sent = 0;
|
||||||
|
|
Loading…
Reference in a new issue