Changeset 269 for trunk/trax/vendor
- Timestamp:
- 10/31/06 18:44:25 (6 years ago)
- Location:
- trunk/trax/vendor/trax
- Files:
-
- 2 modified
-
action_controller.php (modified) (2 diffs)
-
action_view/helpers/form_options_helper.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/vendor/trax/action_controller.php
r229 r269 415 415 416 416 # current url 417 if(isset($_SERVER['REDIRECT_URL']) ) {417 if(isset($_SERVER['REDIRECT_URL']) && !stristr($_SERVER['REDIRECT_URL'], 'dispatch.php')) { 418 418 $browser_url = $_SERVER['REDIRECT_URL']; 419 } else { 420 $browser_url = $_SERVER['REQUEST_URI']; 421 } 422 #if(strstr($_SERVER['REQUEST_URI'], "?")) 423 # $browser_url = substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], "?")); 424 #else 425 # $browser_url = $_SERVER['REQUEST_URI']; 426 419 } elseif(isset($_SERVER['REQUEST_URI'])) { 420 $browser_url = strstr($_SERVER['REQUEST_URI'], "?") ? 421 substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], "?")) : 422 $_SERVER['REQUEST_URI']; 423 } 424 427 425 //error_log('browser url='.$browser_url); 428 426 # strip off url prefix, if any … … 431 429 } 432 430 433 # strip leading slash 434 // FIXME: Do we know for sure that the435 // initial '/' will be there?436 $browser_url = substr($browser_url,1);431 # strip leading slash (if any) 432 if(substr($browser_url, 0, 1) == "/") { 433 $browser_url = substr($browser_url, 1); 434 } 437 435 438 436 # strip trailing slash (if any) -
trunk/trax/vendor/trax/action_view/helpers/form_options_helper.php
r243 r269 121 121 . htmlspecialchars($choice_value) 122 122 . "\" selected=\"selected\">" 123 . htmlspecialchars( $choice_text)."</option>";123 . htmlspecialchars(is_object($choice_text) ? $choice_text->__toString() : $choice_text)."</option>"; 124 124 } else { 125 125 $options[] = "<option value=\"" 126 126 . htmlspecialchars($choice_value) 127 127 . "\">" 128 . htmlspecialchars( $choice_text)."</option>";128 . htmlspecialchars(is_object($choice_text) ? $choice_text->__toString() : $choice_text)."</option>"; 129 129 } 130 130 } … … 157 157 foreach($collection as $object) { 158 158 if(is_object($object)) { 159 $options[$object->send($attribute_value)] =160 $object->send($attribute_text);159 //$options[$object->send($attribute_value)] = $object->send($attribute_text); 160 $options[$object->$attribute_value] = $object->$attribute_text; 161 161 } 162 162 }
