Changeset 3144 for freepbx/branches/2.2/amp_conf
- Timestamp:
- 11/21/06 00:10:55 (7 years ago)
- Files:
-
- freepbx/branches/2.2 (modified) (1 prop)
- freepbx/branches/2.2/amp_conf/htdocs/admin/config.php (modified) (2 diffs)
- freepbx/branches/2.2/amp_conf/htdocs/admin/extensions.class.php (modified) (1 diff)
- freepbx/branches/2.2/amp_conf/htdocs/admin/functions.inc.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.2
- Property svnmerge-integrated changed from /freepbx/trunk:1-3050,3064,3066,3072,3078,3086,3095,3097,3099,3101,3111,3113,3118-3123 to /freepbx/trunk:1-3130
freepbx/branches/2.2/amp_conf/htdocs/admin/config.php
r3129 r3144 138 138 $name[$key] = $row['name']; 139 139 } 140 141 array_multisort( 142 $category, SORT_ASC, 143 $sort, SORT_ASC, SORT_NUMERIC, 144 $name, SORT_ASC, 145 $fpbx_menu 146 ); 140 141 if ($amp_conf['USECATEGORIES']) { 142 array_multisort( 143 $category, SORT_ASC, 144 $sort, SORT_ASC, SORT_NUMERIC, 145 $name, SORT_ASC, 146 $fpbx_menu 147 ); 148 } else { 149 array_multisort( 150 $sort, SORT_ASC, SORT_NUMERIC, 151 $name, SORT_ASC, 152 $fpbx_menu 153 ); 154 } 147 155 148 156 // Printing menu … … 152 160 153 161 foreach ($fpbx_menu as $key => $row) { 154 if ($ row['category'] != $prev_category) {162 if ($amp_conf['USECATEGORIES'] && ($row['category'] != $prev_category)) { 155 163 echo "\t\t<li>"._($row['category'])."</li>\n"; 156 164 $prev_category = $row['category']; freepbx/branches/2.2/amp_conf/htdocs/admin/extensions.class.php
r2926 r3144 840 840 } 841 841 842 class ext_setmusiconhold extends extension { 843 function output() { 844 return "SetMusicOnHold(".$this->data.")"; 845 } 846 } 847 842 848 class ext_congestion extends extension { 843 849 function output() { freepbx/branches/2.2/amp_conf/htdocs/admin/functions.inc.php
r3131 r3144 22 22 23 23 function parse_amportal_conf($filename) { 24 // defaults, if not specified in the file 25 $defaults = array( 26 'AMPDBENGINE' => 'mysql', 27 'AMPDBNAME' => 'asterisk', 28 'AMPENGINE' => 'asterisk', 29 'USECATEGORIES' => true, 30 ); 31 // boolean values, will be converted to true/false 32 // "yes", "true", 1 (case-insensitive) will be treated as true, everything else is false 33 $booleans = array('USECATEGORIES'); 34 24 35 $file = file($filename); 25 36 if (is_array($file)) { … … 33 44 } 34 45 35 if ( !isset($conf["AMPDBENGINE"]) || ($conf["AMPDBENGINE"] == "")) {36 $conf["AMPDBENGINE"] = "mysql";37 }38 39 if ( !isset($conf["AMPDBNAME"]) || ($conf["AMPDBNAME"] == "")) {40 $conf["AMPDBNAME"] = "asterisk";41 } 42 43 if ( !isset($conf["AMPENGINE"]) || ($conf["AMPENGINE"] == "")) {44 $conf[ "AMPENGINE"] = "asterisk";46 // set defaults 47 foreach ($defaults as $key=>$val) { 48 if (!isset($conf[$key]) || $conf[$key] == '') { 49 $conf[$key] = $val; 50 } 51 } 52 53 // evaluate boolean values 54 foreach ($booleans as $key) { 55 $conf[$key] = isset($conf[$key]) && ($conf[$key] === true || strtolower($conf[$key]) == 'true' || $conf[$key] === 1 || $conf[$key] == '1' || strtolower($conf[$key]) == 'yes'); 45 56 } 46 57 … … 274 285 } 275 286 287 $prevtag = ""; 288 $prevtag_pre = ""; 276 289 if ($skip) { 277 290 $prevskip= $skip - $perpage;
