Changeset 4638
- Timestamp:
- 08/02/07 13:11:09 (1 year ago)
- Files:
-
- modules/branches/2.3/ringgroups/functions.inc.php (modified) (3 diffs)
- modules/branches/2.3/ringgroups/install.php (modified) (1 diff)
- modules/branches/2.3/ringgroups/install.sql (modified) (1 diff)
- modules/branches/2.3/ringgroups/module.xml (modified) (2 diffs)
- modules/branches/2.3/ringgroups/page.ringgroups.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.3/ringgroups/functions.inc.php
r4312 r4638 152 152 print_r($extens); 153 153 154 $sql = "INSERT INTO ringgroups (grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, description, alertinfo, needsconf, remotealert, toolate, ringing) VALUES ( ".$grpnum.", '".str_replace("'", "''", $strategy)."', ".str_replace("'", "''", $grptime).", '".str_replace("'", "''", $grppre)."', '".str_replace("'", "''", $grplist)."', '".str_replace("'", "''", $annmsg)."', '".str_replace("'", "''", $postdest)."', '".str_replace("'", "''", $desc)."', '".str_replace("'", "''", $alertinfo)."', '$needsconf', '$remotealert', '$toolate', '$ringing')";154 $sql = "INSERT INTO ringgroups (grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, description, alertinfo, needsconf, remotealert, toolate, ringing) VALUES ('".str_replace("'","''",$grpnum)."', '".str_replace("'", "''", $strategy)."', ".str_replace("'", "''", $grptime).", '".str_replace("'", "''", $grppre)."', '".str_replace("'", "''", $grplist)."', '".str_replace("'", "''", $annmsg)."', '".str_replace("'", "''", $postdest)."', '".str_replace("'", "''", $desc)."', '".str_replace("'", "''", $alertinfo)."', '$needsconf', '$remotealert', '$toolate', '$ringing')"; 155 155 $results = sql($sql); 156 156 return true; … … 158 158 159 159 function ringgroups_del($grpnum) { 160 $results = sql("DELETE FROM ringgroups WHERE grpnum = $grpnum","query");160 $results = sql("DELETE FROM ringgroups WHERE grpnum = '".str_replace("'","''",$grpnum)."'","query"); 161 161 } 162 162 163 163 function ringgroups_list() { 164 $results = sql("SELECT grpnum, description FROM ringgroups ORDER BY grpnum","getAll",DB_FETCHMODE_ASSOC);164 $results = sql("SELECT grpnum, description FROM ringgroups ORDER BY CAST(grpnum as UNSIGNED)","getAll",DB_FETCHMODE_ASSOC); 165 165 foreach ($results as $result) { 166 166 if (isset($result['grpnum']) && checkRange($result['grpnum'])) { … … 175 175 176 176 function ringgroups_get($grpnum) { 177 $results = sql("SELECT grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, description, alertinfo, needsconf, remotealert, toolate, ringing FROM ringgroups WHERE grpnum = $grpnum","getRow",DB_FETCHMODE_ASSOC);177 $results = sql("SELECT grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, description, alertinfo, needsconf, remotealert, toolate, ringing FROM ringgroups WHERE grpnum = '".str_replace("'", "''", $grpnum)."'","getRow",DB_FETCHMODE_ASSOC); 178 178 return $results; 179 179 } modules/branches/2.3/ringgroups/install.php
r4332 r4638 88 88 } 89 89 90 // Version 2.2.16 change (#1961) 91 // 92 $results = $db->query("ALTER TABLE `ringgroups` CHANGE `grpnum` `grpnum` VARCHAR( 20 ) NOT NULL"); 93 if(DB::IsError($results)) { 94 echo $results->getMessage(); 95 return false; 96 } 97 90 98 ?> modules/branches/2.3/ringgroups/install.sql
r4102 r4638 1 CREATE TABLE IF NOT EXISTS `ringgroups` ( `grpnum` BIGINT( 11) NOT NULL , `strategy` VARCHAR( 50 ) NOT NULL , `grptime` SMALLINT NOT NULL , `grppre` VARCHAR( 100 ) NULL , `grplist` VARCHAR( 255 ) NOT NULL , `annmsg` VARCHAR( 255 ) NULL , `postdest` VARCHAR( 255 ) NULL , `description` VARCHAR( 35 ) NOT NULL , `alertinfo` VARCHAR ( 255 ) NULL , remotealert VARCHAR ( 80 ), needsconf VARCHAR ( 10 ), toolate VARCHAR ( 80 ), PRIMARY KEY (`grpnum`) ) TYPE = MYISAM ;1 CREATE TABLE IF NOT EXISTS `ringgroups` ( `grpnum` VARCHAR( 20 ) NOT NULL , `strategy` VARCHAR( 50 ) NOT NULL , `grptime` SMALLINT NOT NULL , `grppre` VARCHAR( 100 ) NULL , `grplist` VARCHAR( 255 ) NOT NULL , `annmsg` VARCHAR( 255 ) NULL , `postdest` VARCHAR( 255 ) NULL , `description` VARCHAR( 35 ) NOT NULL , `alertinfo` VARCHAR ( 255 ) NULL , remotealert VARCHAR ( 80 ), needsconf VARCHAR ( 10 ), toolate VARCHAR ( 80 ), PRIMARY KEY (`grpnum`) ) TYPE = MYISAM ; modules/branches/2.3/ringgroups/module.xml
r4333 r4638 2 2 <rawname>ringgroups</rawname> 3 3 <name>Ring Groups</name> 4 <version>2.2.1 5.2</version>4 <version>2.2.16</version> 5 5 <type>setup</type> 6 6 <category>Inbound Call Control</category> … … 9 9 </description> 10 10 <changelog> 11 *2.2.16* #1961 changed to allow leading 0 extensions 11 12 *2.2.15.2* fixed bug install.php not converting destinations properly for new findmefollow format 12 13 *2.2.15.1* #2057 don't strip CID prefix if no prefix is being added modules/branches/2.3/ringgroups/page.ringgroups.php
r4232 r4638 340 340 function checkGRP(theForm) { 341 341 var msgInvalidGrpNum = "<?php echo _('Invalid Group Number specified'); ?>"; 342 var msgInvalidGrpNumStartWithZero = "<?php echo _('Group numbers with more than one digit cannot begin with 0'); ?>";343 342 var msgInvalidExtList = "<?php echo _('Please enter an extension list.'); ?>"; 344 343 var msgInvalidGrpPrefix = "<?php echo _('Invalid Caller ID prefix.'); ?>"; … … 355 354 if (!isInteger(theForm.account.value)) { 356 355 return warnInvalid(theForm.account, msgInvalidGrpNum); 357 } else if (theForm.account.value.indexOf('0') == 0 && theForm.account.value.length > 1) {358 return warnInvalid(theForm.account, msgInvalidGrpNumStartWithZero);359 356 } 360 357
