Changeset 10519
- Timestamp:
- 11/02/10 15:16:31 (3 years ago)
- Files:
-
- modules/branches/2.6 (modified) (1 prop)
- modules/branches/2.6/customappsreg/functions.inc.php (modified) (4 diffs)
- modules/branches/2.6/customappsreg/page.customdests.php (modified) (2 diffs)
- modules/branches/2.6/customappsreg/page.customextens.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.6
- Property svnmerge-integrated changed from /modules/branches/2.5:1-7809,7812,7854,7858-7865,7878,7886,7890,7915,7967-7968,8036-8037,9751 /modules/branches/2.7:1-8497,8576-8578,8581,8585,8662-8669,8690,8709,8821,8883,8944,9219,9543,10300,10340,10392,10399-10422,10424-10426,10428-10429,10432,10436-10458 to /modules/branches/2.5:1-7809,7812,7854,7858-7865,7878,7886,7890,7915,7967-7968,8036-8037,9751 /modules/branches/2.7:1-8497,8576-8578,8581,8585,8662-8669,8690,8709,8821,8883,8944,9219,9543,10300,10340,10392,10399-10422,10424-10426,10428-10429,10432,10436-10458,10518
modules/branches/2.6/customappsreg/functions.inc.php
r7132 r10519 115 115 } 116 116 117 $custom_dest = q($custom_dest);118 $description = q($description);119 $notes = q($notes);117 $custom_dest = sql_formattext($custom_dest); 118 $description = sql_formattext($description); 119 $notes = sql_formattext($notes); 120 120 $sql = "INSERT INTO custom_destinations (custom_dest, description, notes) VALUES ($custom_dest, $description, $notes)"; 121 121 $results = $db->query($sql); … … 143 143 } 144 144 145 $custom_exten = q($custom_exten);146 $description = q($description);147 $notes = q($notes);145 $custom_exten = sql_formattext($custom_exten); 146 $description = sql_formattext($description); 147 $notes = sql_formattext($notes); 148 148 $sql = "INSERT INTO custom_extensions (custom_exten, description, notes) VALUES ($custom_exten, $description, $notes)"; 149 149 $results = $db->query($sql); … … 191 191 192 192 $sql = "UPDATE custom_destinations SET ". 193 "custom_dest = ". q($custom_dest).", ".194 "description = ". q($description).", ".195 "notes = ". q($notes)." ".196 "WHERE custom_dest = ". q($old_custom_dest);193 "custom_dest = ".sql_formattext($custom_dest).", ". 194 "description = ".sql_formattext($description).", ". 195 "notes = ".sql_formattext($notes)." ". 196 "WHERE custom_dest = ".sql_formattext($old_custom_dest); 197 197 $result = $db->query($sql); 198 198 if(DB::IsError($result)) { … … 205 205 206 206 $sql = "UPDATE custom_extensions SET ". 207 "custom_exten = ". q($custom_exten).", ".208 "description = ". q($description).", ".209 "notes = ". q($notes)." ".210 "WHERE custom_exten = ". q($old_custom_exten);207 "custom_exten = ".sql_formattext($custom_exten).", ". 208 "description = ".sql_formattext($description).", ". 209 "notes = ".sql_formattext($notes)." ". 210 "WHERE custom_exten = ".sql_formattext($old_custom_exten); 211 211 $result = $db->query($sql); 212 212 if(DB::IsError($result)) { modules/branches/2.6/customappsreg/page.customdests.php
r7792 r10519 22 22 $old_custom_dest = isset($_REQUEST['old_custom_dest']) ? $_REQUEST['old_custom_dest'] : ''; 23 23 $custom_dest = isset($_REQUEST['extdisplay']) ? $_REQUEST['extdisplay'] : ''; 24 $description = isset($_REQUEST['description']) ? $_REQUEST['description']: '';25 $notes = isset($_REQUEST['notes']) ? $_REQUEST['notes']: '';24 $description = isset($_REQUEST['description']) ? htmlentities($_REQUEST['description']) : ''; 25 $notes = isset($_REQUEST['notes']) ? htmlentities($_REQUEST['notes']) : ''; 26 26 27 27 switch ($action) { … … 105 105 if (!empty($usage_list)) { 106 106 ?> 107 <td><b><?php echo $custom_dest; ?></b></td>107 <td><b><?php echo htmlentities($custom_dest); ?></b></td> 108 108 <?php 109 109 } else { modules/branches/2.6/customappsreg/page.customextens.php
r7792 r10519 20 20 if (isset($_REQUEST['delete'])) $action = 'delete'; 21 21 22 $old_custom_exten = isset($_REQUEST['old_custom_exten']) ? $_REQUEST['old_custom_exten'] : ''; 23 $custom_exten = isset($_REQUEST['extdisplay']) ? $_REQUEST['extdisplay'] : ''; 24 $description = isset($_REQUEST['description']) ? $_REQUEST['description'] : ''; 25 $notes = isset($_REQUEST['notes']) ? $_REQUEST['notes'] : ''; 22 $custom_exten = preg_replace("/[^0-9*#]/" ,"", trim($custom_exten)); 23 24 $old_custom_exten = isset($_REQUEST['old_custom_exten']) ? preg_replace("/[^0-9*#]/" ,"",$_REQUEST['old_custom_exten']) : ''; 25 $custom_exten = isset($_REQUEST['extdisplay']) ? preg_replace("/[^0-9*#]/" ,"",$_REQUEST['extdisplay']) : ''; 26 $description = isset($_REQUEST['description']) ? htmlentities($_REQUEST['description']) : ''; 27 $notes = isset($_REQUEST['notes']) ? htmlentities($_REQUEST['notes']) : ''; 26 28 27 29 switch ($action) {
