this is a fix for #1487
I also took the liberty to comment out the check for an extension beginning with 0 eg. 01234, as it was blocked not as a matter of concept, but because of the same bug. (two typos and one mistake)
firstly the sql table has to be fixed. as there is no install.sql or install.php, i decided not to make one, but to post the sql here.
ALTER TABLE `queues` CHANGE `id` `id` VARCHAR( 45 ) NOT NULL DEFAULT '-1'
i chose 45 as the field size to match the extensions table.
the diff follows
Index: page.queues.php
===================================================================
--- page.queues.php (revision 3557)
+++ page.queues.php (working copy)
@@ -151,7 +151,7 @@
<h2><?php echo _("Add Queue"); ?></h2>
<?php } ?>
-<?php if ($extdisplay){ ?>
+<?php if ($extdisplay != ''){ ?>
<p><?php echo $delButton ?></p>
<?php } ?>
<form autocomplete="off" name="editQ" action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
@@ -160,7 +160,7 @@
<table>
<tr><td colspan="2"><h5><?php echo ($extdisplay ? _("Edit Queue") : _("Add Queue")) ?><hr></h5></td></tr>
<tr>
-<?php if ($extdisplay){ ?>
+<?php if ($extdisplay != ''){ ?>
<input type="hidden" name="account" value="<?php echo $extdisplay; ?>">
<?php } else { ?>
<td><a href="#" class="info"><?php echo _("queue number:")?><span><?php echo _("Use this number to dial into the queue, or transfer callers to this number to put them into the queue.<br><br>Agents will dial this queue number plus * to log onto the queue, and this queue number plus ** to log out of the queue.<br><br>For example, if the queue number is 123:<br><br><b>123* = log in<br>123** = log out</b>")?></span></a></td>
@@ -535,7 +535,7 @@
}
whichitem++;
}
-
+/*
var gotoType = theForm.elements[ "goto0" ].value;
if (gotoType == 'custom') {
var gotoVal = theForm.elements[ "custom0"].value;
@@ -544,12 +544,13 @@
<?php echo "alert('"._("Custom Goto contexts must contain the string \"custom\". ie: custom-app,s,1")."')"?>;
}
}
-
+*/
$account = theForm.account.value;
if ($account == "") {
<?php echo "alert('"._("Queue Number must not be blank")."')"?>;
bad="true";
}
+/*
else if ($account == "0") {
<?php echo "alert('"._("Queue Number can not be 0")."')"?>;
bad="true";
@@ -558,7 +559,7 @@
<?php echo "alert('"._("Queue numbers with more than one digit cannot begin with 0")."')"?>;
bad="true";
}
-
+*/
if ($queuename == "") {
<?php echo "alert('"._("Queue name must not be blank")."')"?>;
bad="true";
while i was at it, i removed the javascript check for the word custom in the goto, because thanks to groogs that is no longer required.
hope noone gets upset that i set it as major... but shimi is right, it should be a blocker.