Changeset 1509
- Timestamp:
- 11/25/2006 02:51:43 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 16 modified
- 3 copied
-
HISTORY (modified) (1 diff)
-
UPGRADE (modified) (1 diff)
-
demos/blog/protected/Common/BlogErrorHandler.php (modified) (1 diff)
-
demos/blog/protected/Common/BlogPage.php (modified) (1 diff)
-
demos/blog/protected/Portlets/SearchPortlet.php (modified) (1 diff)
-
demos/personal/protected/Pages/Layout.php (modified) (1 diff)
-
demos/quickstart/protected/controls/SearchBox.php (modified) (4 diffs)
-
demos/quickstart/protected/pages/Controls/Repeater.page (modified) (1 diff)
-
demos/quickstart/protected/pages/GettingStarted/Introduction.page (modified) (2 diffs)
-
framework/I18N/core/DateFormat.php (modified) (2 diffs)
-
framework/TApplication.php (modified) (1 diff)
-
framework/Util/TDateTimeStamp.php (modified) (1 diff)
-
framework/Web/THttpRequest.php (modified) (1 diff)
-
framework/Web/THttpResponse.php (modified) (1 diff)
-
framework/Web/UI/WebControls/THead.php (modified) (1 diff)
-
requirements/index.php (modified) (1 diff)
-
tests/FunctionalTests/tickets/protected/pages/Ticket283.page (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/protected/pages/Ticket283.page)
-
tests/FunctionalTests/tickets/protected/pages/Ticket283.php (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/protected/pages/Ticket283.php)
-
tests/FunctionalTests/tickets/protected/pages/Ticket453.page (copied) (copied from branches/3.0/tests/FunctionalTests/tickets/protected/pages/Ticket453.page)
Legend:
- Unmodified
- Added
- Removed
-
trunk/HISTORY
r1505 r1509 20 20 BUG: Ticket#442 - TPageService getBasePath in namespace form (Qiang) 21 21 BUG: TTableCell should render only when Text is not set and there's no child (Qiang) 22 ENH: Ticket#446 - Added TMetaTagCollection.getMetaTagByID method (Qiang) 22 23 CHG: Ticket#437 - __autoload is replaced by spl_autoload_register (Qiang) 23 CHG: constructUrl() now encodes & into & by default (Qiang)24 CHG: Ticket#454 - Redundant PHP Version Check 24 25 CHG: TRepeater does not render <span> anymore for empty item template (Qiang) 26 CHG: THttpRequest.constructUrl() now encodes ampersand by default (Qiang) 25 27 26 28 Version 3.0.5 October 23, 2006 -
trunk/UPGRADE
r1482 r1509 24 24 Upgrading from v3.0.5 25 25 --------------------- 26 - constructUrl() now encodes & into & by default.27 26 - TRepeater does not render <span> anymore for empty item template. 27 - constructUrl() now encodes ampersand by default. This should have minimal 28 impact on any existing PRADO applications, though. 28 29 29 30 Upgrading from v3.0.4 -
trunk/demos/blog/protected/Common/BlogErrorHandler.php
r1398 r1509 37 37 Prado::log($message,TLogger::ERROR,'BlogApplication'); 38 38 $message=urldecode($this->getApplication()->getSecurityManager()->hashData($message)); 39 $this->Response->redirect($this->Service->constructUrl('ErrorReport',array('msg'=>$message) ));39 $this->Response->redirect($this->Service->constructUrl('ErrorReport',array('msg'=>$message),false)); 40 40 } 41 41 else -
trunk/demos/blog/protected/Common/BlogPage.php
r1398 r1509 33 33 public function gotoDefaultPage() 34 34 { 35 $this-> Response->redirect($this->Service->constructUrl($this->Service->DefaultPage));35 $this->gotoPage($this->Service->DefaultPage); 36 36 } 37 37 38 38 public function gotoPage($pagePath,$getParameters=null) 39 39 { 40 $this->Response->redirect($this->Service->constructUrl($pagePath,$getParameters ));40 $this->Response->redirect($this->Service->constructUrl($pagePath,$getParameters,false)); 41 41 } 42 42 -
trunk/demos/blog/protected/Portlets/SearchPortlet.php
r1398 r1509 32 32 { 33 33 $keyword=$this->Keyword->Text; 34 $url=$this->Service->constructUrl('SearchPost',array('keyword'=>$keyword) );34 $url=$this->Service->constructUrl('SearchPost',array('keyword'=>$keyword),false); 35 35 $this->Response->redirect($url); 36 36 } -
trunk/demos/personal/protected/Pages/Layout.php
r1398 r1509 6 6 { 7 7 $this->Application->getModule('auth')->logout(); 8 $this->Response->redirect($this->Service->constructUrl('Home' ));8 $this->Response->redirect($this->Service->constructUrl('Home',null,false)); 9 9 } 10 10 } -
trunk/demos/quickstart/protected/controls/SearchBox.php
r1398 r1509 1 1 <?php 2 2 3 class SearchBox extends TTemplateControl 3 class SearchBox extends TTemplateControl 4 4 { 5 public function getText() 5 public function getText() 6 6 { 7 7 $this->ensureChildControls(); 8 8 return $this->getRegisteredObject('search')->getText(); 9 9 } 10 10 11 11 public function getTextBox() 12 12 { … … 14 14 return $this->getRegisteredObject('search'); 15 15 } 16 16 17 17 public function getButton() 18 18 { … … 20 20 return $this->getRegisteredObject('find'); 21 21 } 22 22 23 23 public function onInit($param) 24 24 { … … 33 33 { 34 34 $ps = $this->getApplication()->getPageService(); 35 $page = $ps->constructUrl('Search', array('q' => $query) );35 $page = $ps->constructUrl('Search', array('q' => $query), false); 36 36 $this->getApplication()->getResponse()->redirect($page); 37 37 } -
trunk/demos/quickstart/protected/pages/Controls/Repeater.page
r1398 r1509 20 20 <com:TTextHighlighter Language="php" CssClass="source"> 21 21 class MyPage extends TPage { 22 p rotectedfunction onLoad($param) {22 public function onLoad($param) { 23 23 parent::onLoad($param); 24 24 if(!$this->IsPostBack) { -
trunk/demos/quickstart/protected/pages/GettingStarted/Introduction.page
r1398 r1509 2 2 <h1 id="101">Welcome to the PRADO Quickstart Tutorial</h1> 3 3 <p> 4 This Quickstart tutorial is provided to help you quickly start building your own Web applications based on PRADO version 3. 0.4 This Quickstart tutorial is provided to help you quickly start building your own Web applications based on PRADO version 3.x. 5 5 </p> 6 6 <p> … … 8 8 </p> 9 9 <ul> 10 <li><a href="http://www.pradosoft.com/docs/classdoc/">PRADO Classes</a></li> 10 11 <li><a href="http://www.pradosoft.com/docs/manual/">PRADO API Documentation</a></li> 11 12 <li><a href="http://www.pradosoft.com/forum/">PRADO Forum</a></li> 12 13 <li><a href="http://www.pradosoft.com/wiki/">PRADO Wiki</a></li> 13 <li><a href="http://trac.pradosoft.com/ wiki/">PRADO Trac</a></li>14 <li><a href="http://trac.pradosoft.com/prado/">PRADO Trac</a></li> 14 15 </ul> 15 16 -
trunk/framework/I18N/core/DateFormat.php
r1398 r1509 111 111 public function format($time, $pattern='F', $charset='UTF-8') 112 112 { 113 if(is_string($time)) 113 if (is_numeric($time)) //assumes unix epoch 114 $time = floatval($time); 115 else if(is_string($time)) 114 116 $time = @strtotime($time); 115 117 … … 117 119 $pattern = 'F'; 118 120 119 $date = @getdate($time); 121 $s = Prado::createComponent('System.Util.TDateTimeStamp'); 122 123 $date = $s->getDate($time); 120 124 121 125 $pattern = $this->getPattern($pattern); -
trunk/framework/TApplication.php
r1484 r1509 1319 1319 { 1320 1320 $fileName=$this->getStateFilePath(); 1321 if(version_compare(phpversion(),'5.1.0','>=')) 1322 file_put_contents($fileName,$content,LOCK_EX); 1323 else 1324 file_put_contents($fileName,$content); 1321 file_put_contents($fileName,$content,LOCK_EX); 1325 1322 } 1326 1323 } -
trunk/framework/Util/TDateTimeStamp.php
r1399 r1509 194 194 return $this->_getDateInternal($d); 195 195 } 196 197 196 198 197 199 /** -
trunk/framework/Web/THttpRequest.php
r1482 r1509 484 484 * @param array GET parameters, null if not needed 485 485 * @param boolean whether to encode the ampersand in URL, defaults to true. 486 * @param boolean whether to encode the GET parameters (their names and values), defaults to true.486 * @param boolean whether to encode the GET parameters (their names and values), defaults to false. 487 487 * @return string URL 488 488 * @see parseUrl -
trunk/framework/Web/THttpResponse.php
r1410 r1509 319 319 if($url[0]==='/') 320 320 $url=$this->getRequest()->getBaseUrl().$url; 321 header('Location: '. $url);321 header('Location: '.str_replace('&','&',$url)); 322 322 exit(); 323 323 } -
trunk/framework/Web/UI/WebControls/THead.php
r1398 r1509 343 343 throw new TInvalidDataTypeException('metatagcollection_metatag_invalid'); 344 344 } 345 346 /** 347 * Finds the lowest cardinal index of the meta tag whose id is the one being looked for. 348 * @param string the ID of the meta tag to be looked for 349 * @return integer the index of the meta tag found, -1 if not found. 350 */ 351 public function findIndexByID($id) 352 { 353 $index=0; 354 foreach($this as $item) 355 { 356 if($item->getID()===$id) 357 return $index; 358 $index++; 359 } 360 return -1; 361 } 362 363 /** 364 * Finds the item whose value is the one being looked for. 365 * @param string the id of the meta tag to be looked for 366 * @return TMetaTag the meta tag found, null if not found. 367 */ 368 public function findMetaTagByID($id) 369 { 370 if(($index=$this->findIndexByID($id))>=0) 371 return $this->itemAt($index); 372 else 373 return null; 374 } 345 375 } 346 376 -
trunk/requirements/index.php
r1507 r1509 236 236 $langs=getUserLanguages(); 237 237 $lang=explode('-',$langs[0]); 238 if(empty($lang[0]) || ! ctype_alpha($lang[0]))238 if(empty($lang[0]) || !function_exists('ctype_alpha') || !ctype_alpha($lang[0])) 239 239 $language='en'; 240 240 else
