Changeset 10001
- Timestamp:
- 11/21/08 07:26:11 (2 months ago)
- Files:
-
- trunk/jaws/html/gadgets/Preferences/HTML.php (modified) (1 diff)
- trunk/jaws/html/gadgets/ServerTime/HTML.php (modified) (1 diff)
- trunk/jaws/html/gadgets/Skeleton/HTML.php (modified) (1 diff)
- trunk/jaws/html/gadgets/Skeleton/Model.php (modified) (1 diff)
- trunk/jaws/html/gadgets/StaticPage/AdminModel.php (modified) (2 diffs)
- trunk/jaws/html/gadgets/StaticPage/Model.php (modified) (1 diff)
- trunk/jaws/html/gadgets/VisitCounter/AdminModel.php (modified) (2 diffs)
- trunk/jaws/html/gadgets/VisitCounter/HTML.php (modified) (1 diff)
- trunk/jaws/html/gadgets/VisitCounter/Info.php (modified) (1 diff)
- trunk/jaws/html/gadgets/VisitCounter/Model.php (modified) (1 diff)
- trunk/jaws/html/gadgets/VisitCounter/schema/0.8.0.xml (added)
- trunk/jaws/html/gadgets/Weather/HTML.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/jaws/html/gadgets/Preferences/HTML.php
r9217 r10001 59 59 } 60 60 } 61 ?>trunk/jaws/html/gadgets/ServerTime/HTML.php
r9217 r10001 33 33 } 34 34 } 35 ?>trunk/jaws/html/gadgets/Skeleton/HTML.php
r9218 r10001 33 33 } 34 34 } 35 ?>trunk/jaws/html/gadgets/Skeleton/Model.php
r9218 r10001 24 24 } 25 25 } 26 ?>trunk/jaws/html/gadgets/StaticPage/AdminModel.php
r9349 r10001 306 306 $result = $GLOBALS['db']->query($sql, $params); 307 307 if (Jaws_Error::IsError($result)) { 308 $GLOBALS['app']->Session->PushLastResponse(_t('STATICPAGE_ERROR_PAGE_NOT_ADDED'), RESPONSE_ERROR); 308 309 return new Jaws_Error(_t('STATICPAGE_ERROR_PAGE_NOT_ADDED'), _t('STATICPAGE_NAME')); 309 310 } … … 380 381 $params['id'] = (int)$id; 381 382 $params['language'] = $language; 382 $params['fast_url'] = $fast_url;383 $params['fast_url'] = $fast_url; 383 384 $params['show_title'] = (bool)$show_title; 384 385 $params['now'] = MDB2_Date::mdbNow(); trunk/jaws/html/gadgets/StaticPage/Model.php
r9334 r10001 271 271 } 272 272 273 /**274 * Find a record related on fast url275 *276 * @access public277 * @param string $fasturl The FastURL string278 * @return array An array containing the page info and Jaws_Error on error279 */280 function GetFastURL($fasturl)281 {282 $params = array();283 $params['fasturl'] = $fasturl;284 285 $sql = '286 SELECT287 [page_id] as id, [title], [fast_url]288 FROM [[static_pages]]289 WHERE [fast_url] = {fasturl}';290 291 $types = array('integer', 'text', 'text');292 293 $res = $GLOBALS['db']->queryRow($sql, $params, $types);294 if (Jaws_Error::IsError($res)) {295 return false;296 }297 298 return $res;299 }300 273 } trunk/jaws/html/gadgets/VisitCounter/AdminModel.php
r8212 r10001 84 84 } 85 85 86 // Registry keys. 87 $GLOBALS['app']->Registry->NewKey('/gadgets/VisitCounter/visit_counters', 'online,today,total'); 88 $GLOBALS['app']->Registry->NewKey('/gadgets/VisitCounter/custom_text', 89 $GLOBALS['app']->Registry->Get('/gadgets/VisitCounter/custom')); 90 $GLOBALS['app']->Registry->DeleteKey('/gadgets/VisitCounter/online'); 91 $GLOBALS['app']->Registry->DeleteKey('/gadgets/VisitCounter/today'); 92 $GLOBALS['app']->Registry->DeleteKey('/gadgets/VisitCounter/total'); 93 $GLOBALS['app']->Registry->DeleteKey('/gadgets/VisitCounter/custom'); 86 if (version_compare($old, '0.8.0', '<')) { 87 // Registry keys. 88 $GLOBALS['app']->Registry->NewKey('/gadgets/VisitCounter/visit_counters', 'online,today,total'); 89 $GLOBALS['app']->Registry->NewKey('/gadgets/VisitCounter/custom_text', 90 $GLOBALS['app']->Registry->Get('/gadgets/VisitCounter/custom')); 91 $GLOBALS['app']->Registry->DeleteKey('/gadgets/VisitCounter/online'); 92 $GLOBALS['app']->Registry->DeleteKey('/gadgets/VisitCounter/today'); 93 $GLOBALS['app']->Registry->DeleteKey('/gadgets/VisitCounter/total'); 94 $GLOBALS['app']->Registry->DeleteKey('/gadgets/VisitCounter/custom'); 95 } 96 97 // fix using Y-m-d G:i:s instead of Y-m-d H:i:s in version 0.6.x 98 $startDate = $GLOBALS['app']->Registry->Get('/gadgets/VisitCounter/start'); 99 if (strlen($startDate) == 18) { 100 $startDate = substr_replace($startDate, '0', 11, 0); 101 $GLOBALS['app']->Registry->Set('/gadgets/VisitCounter/start', $startDate); 102 } 94 103 95 104 return true; … … 194 203 } 195 204 } 196 ?>trunk/jaws/html/gadgets/VisitCounter/HTML.php
r9218 r10001 34 34 } 35 35 } 36 ?>trunk/jaws/html/gadgets/VisitCounter/Info.php
r9218 r10001 18 18 $this->GadgetName(_t('VISITCOUNTER_NAME')); 19 19 $this->GadgetDescription(_t('VISITCOUNTER_DESC')); 20 $this->GadgetVersion('0.8. 0');20 $this->GadgetVersion('0.8.1'); 21 21 $this->Doc('gadget/VisitCounter'); 22 22 trunk/jaws/html/gadgets/VisitCounter/Model.php
r9218 r10001 154 154 function GetStartDate() 155 155 { 156 $rs = $GLOBALS['app']->Registry->Get('/gadgets/VisitCounter/start'); 156 $rs = $GLOBALS['app']->Registry->Get('/gadgets/VisitCounter/start'); 157 157 if (!$rs || Jaws_Error::IsError($rs)) { 158 158 $rs = date('Y-m-d H:i:s'); trunk/jaws/html/gadgets/Weather/HTML.php
r9218 r10001 35 35 } 36 36 } 37 ?>
