Changeset 24350
- Timestamp:
- Sep 5, 2013, 12:41:12 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions.inc.php
r24099 r24350 1087 1087 } 1088 1088 1089 /** 1090 * Add or update a config parameter 1091 * @param string $param 1092 * @param string $value 1093 */ 1089 1094 function conf_update_param($param, $value) 1090 1095 { … … 1116 1121 ;'; 1117 1122 pwg_query($query); 1123 } 1124 } 1125 1126 /** 1127 * Delete on or more config parameters 1128 * @since 2.6 1129 * @param string|string[] $params 1130 */ 1131 function conf_delete_param($params) 1132 { 1133 global $conf; 1134 1135 if (!is_array($params)) 1136 { 1137 $params = array($params); 1138 } 1139 if (empty($params)) 1140 { 1141 return; 1142 } 1143 1144 $query = ' 1145 DELETE FROM '.CONFIG_TABLE.' 1146 WHERE param IN(\''. implode('\',\'', $params) .'\') 1147 ;'; 1148 pwg_query($query); 1149 1150 foreach ($params as $param) 1151 { 1152 unset($conf[$param]); 1118 1153 } 1119 1154 }
Note: See TracChangeset
for help on using the changeset viewer.