public static function get_base_url() { $url = new HTMLTags_URL(); #$ph_cm = Configuration_ConfigManagerHelper # ::get_config_manager( # 'haddock', # 'public-html' # ); #if ($ph_cm->server_has_mod_rewrite()) { if (PublicHTML_ServerCapabilitiesHelper::has_mod_rewrite()) { $url->set_file('/'); } else { $url->set_file('/haddock/public-html/public-html/index.php'); } return $url; }
public static function get_db_page_url($page_name) { #$ph_cm = Configuration_ConfigManagerHelper # ::get_config_manager( # 'haddock', # 'public-html' # ); # #if ($ph_cm->server_has_mod_rewrite()) { if (PublicHTML_ServerCapabilitiesHelper::has_mod_rewrite()) { #echo "has mod_rewrite!\n"; $url = new HTMLTags_URL(); $url->set_file("/db-pages/{$page_name}.html"); } else { $url = PublicHTML_URLHelper::get_base_url(); $url->set_get_variable('oo-page'); $url->set_get_variable('pcro-factory', 'DBPages_PCROFactory'); $url->set_get_variable('page', $page_name); } return $url; }
public static function get_oo_page_url($page_class, $get_variables = NULL) { /** * Copied from PublicHTML_URLHelper so I can use * the FeedAggregator_URL class */ $url = new FeedAggregator_URL(); if (PublicHTML_ServerCapabilitiesHelper::has_mod_rewrite()) { $url->set_file('/'); } else { $url->set_file('/haddock/public-html/public-html/index.php'); } $url->set_get_variable('oo-page'); $url->set_get_variable('page-class', $page_class); if (isset($get_variables)) { foreach ($get_variables as $k => $v) { $url->set_get_variable($k, urlencode($v)); } } return $url; }