Changeset 10028
- Timestamp:
- 11/28/08 14:39:34 (1 month ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.8/jaws/html/gadgets/UrlMapper/AdminModel.php
r9858 r10028 109 109 if (file_exists($file)) { 110 110 include_once $file; 111 $GLOBALS['app']->Map->CreateMapFile();111 Jaws_Utils::Delete(JAWS_DATA . 'maps/core.php'); 112 112 } 113 113 … … 123 123 function UpdateGadgetMaps($gadget) 124 124 { 125 $params = array(); 126 $params['gadget'] = $gadget; 127 $params['custom'] = false; 128 129 $sql = ' 130 DELETE FROM [[url_maps]] 131 WHERE 132 [gadget] = {gadget} 133 AND 134 [custom] = {custom}'; 135 136 $result = $GLOBALS['db']->query($sql, $params); 137 if (Jaws_Error::IsError($result)) { 138 $GLOBALS['app']->Session->PushLastResponse(_t('GLOBAL_ERROR_QUERY_FAILED'), RESPONSE_ERROR); 139 return false; 140 } 141 125 142 $file = JAWS_PATH . 'gadgets/' . $gadget . '/Map.php'; 126 143 if (file_exists($file)) { 127 144 include_once $file; 128 $GLOBALS['app']->Map->CreateMapFile();145 Jaws_Utils::Delete(JAWS_DATA . 'maps/core.php'); 129 146 } 130 147 … … 154 171 } 155 172 156 $GLOBALS['app']->Map->CreateMapFile(); 173 Jaws_Utils::Delete(JAWS_DATA . 'maps/core.php'); 174 Jaws_Utils::Delete(JAWS_DATA . 'maps/custom.php'); 157 175 return true; 158 176 }
