- Timestamp:
- 07/08/09 02:35:59 (3 years ago)
- Location:
- trunk/trax/vendor/trax
- Files:
-
- 6 modified
-
action_view/helpers/active_record_helper.php (modified) (1 diff)
-
action_view/helpers/date_helper.php (modified) (1 diff)
-
action_view/helpers/form_helper.php (modified) (2 diffs)
-
action_view/helpers/form_options_helper.php (modified) (1 diff)
-
session.php (modified) (1 diff)
-
trax.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/vendor/trax/action_view/helpers/active_record_helper.php
r308 r316 173 173 $header_sub_message = isset($options['header_sub_message']) ? 174 174 $options['header_sub_message'] : "There were problems with the following fields:"; 175 175 176 176 return $this->content_tag("div", 177 177 $this->content_tag( -
trunk/trax/vendor/trax/action_view/helpers/date_helper.php
r230 r316 1591 1591 $date_helper = new DateHelper($object, $attribute); 1592 1592 return $date_helper->expiration_date_select($options); 1593 } 1594 1595 /** 1596 * Make a new DateHelper object and call its select_year() method 1597 * 1598 * Generate HTML/XML for year selector pull-down menu using only 1599 * explicit month specification.<br /> 1600 * <b>NB:</b> An attempt to get value of an attribute will always 1601 * fail because there is no way to set 1602 * {@link DateHelper::object_name} and 1603 * {@link DateHelper::attribute_name}. 1604 * @uses DateHelper::select_year() 1605 */ 1606 function select_year() { 1607 $date_helper = new DateHelper(); 1608 $args = func_get_args(); 1609 return call_user_func_array(array($date_helper, 'select_year'), $args); 1593 1610 } 1594 1611 -
trunk/trax/vendor/trax/action_view/helpers/form_helper.php
r311 r316 367 367 * is set to 0 which is convenient for boolean values. Usually unchecked checkboxes don't post anything. 368 368 * We work around this problem by adding a hidden value with the same name as the checkbox. 369 # 369 * 370 370 * Example: Imagine that $post->validated is 1: 371 371 * check_box("post", "validated"); … … 373 373 * <input type="checkbox" id="post_validate" name="post[validated] value="1" checked="checked" /> 374 374 * <input name="post[validated]" type="hidden" value="0" /> 375 # 375 * 376 376 * Example: Imagine that $puppy->gooddog is no: 377 377 * check_box("puppy", "gooddog", array(), "yes", "no"); -
trunk/trax/vendor/trax/action_view/helpers/form_options_helper.php
r308 r316 202 202 function to_select_tag($choices, $options, $html_options) { 203 203 $html_options = $this->add_default_name_and_id($html_options); 204 $value = $this->value();204 $value = isset($options['selected']) ? $options['selected'] : $this->value(); 205 205 return $this->error_wrapping( 206 206 $this->content_tag( -
trunk/trax/vendor/trax/session.php
r300 r316 202 202 */ 203 203 function is_aol_host() { 204 if( ereg("proxy\.aol\.com$", gethostbyaddr($_SERVER['REMOTE_ADDR'])) ||204 if(isset($_SERVER['REMOTE_ADDR']) && ereg("proxy\.aol\.com$", gethostbyaddr($_SERVER['REMOTE_ADDR'])) || 205 205 stristr($_SERVER['HTTP_USER_AGENT'], "AOL")) { 206 206 return true; -
trunk/trax/vendor/trax/trax.php
r314 r316 98 98 ini_set("log_errors", "On"); 99 99 ini_set("error_log", self::$log_path."/".TRAX_ENV.".log"); 100 100 101 101 if(TRAX_ENV == "development") { 102 102 # Display errors to browser if in development mode for debugging … … 128 128 include_once("router.php"); 129 129 130 # Make sure database settings are cleared out 131 ActiveRecord::$database_settings = array(); 130 self::load_active_record_connections_config(); 131 132 } 133 134 function load_active_record_connections_config() { 135 # Make sure database settings are cleared out 136 ActiveRecord::$database_settings = array(); 137 ActiveRecord::clear_all_connections(); 132 138 if(file_exists(self::$config_path."/database.ini")) { 133 139 # Load databse settings 134 ActiveRecord::$database_settings = parse_ini_file(self::$config_path."/database.ini", true); 140 ActiveRecord::$database_settings = parse_ini_file(self::$config_path."/database.ini", true); 141 #error_log("db settings:".print_r(ActiveRecord::$database_settings, true)); 135 142 } 136 ActiveRecord::$environment = TRAX_ENV; 137 143 ActiveRecord::$environment = TRAX_ENV; 138 144 } 139 145
