Changeset 6339 for trunk/wp-app.php
- Timestamp:
- 11/17/2007 11:21:34 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/wp-app.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-app.php
r6273 r6339 69 69 70 70 var $params = array(); 71 var $script_name = "wp-app.php";72 71 var $media_content_types = array('image/*','audio/*','video/*'); 73 72 var $atom_content_types = array('application/atom+xml'); … … 81 80 82 81 $this->script_name = array_pop(explode('/',$_SERVER['SCRIPT_NAME'])); 82 $this->app_base = get_bloginfo('url') . '/' . $this->script_name . '/'; 83 if ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) { 84 $this->app_base = preg_replace( '/^http:\/\//', 'https://', $this->app_base ); 85 } 83 86 84 87 $this->selectors = array( … … 595 598 $path = $this->ENTRIES_PATH; 596 599 } 597 $url = get_bloginfo('url') . '/' . $this->script_name . '/'. $path;600 $url = $this->app_base . $path; 598 601 if(isset($page) && is_int($page)) { 599 602 $url .= "/$page"; … … 608 611 609 612 function get_categories_url($page = NULL) { 610 return get_bloginfo('url') . '/' . $this->script_name . '/'. $this->CATEGORIES_PATH;613 return $this->app_base . $this->CATEGORIES_PATH; 611 614 } 612 615 … … 617 620 618 621 function get_attachments_url($page = NULL) { 619 $url = get_bloginfo('url') . '/' . $this->script_name . '/'. $this->MEDIA_PATH;622 $url = $this->app_base . $this->MEDIA_PATH; 620 623 if(isset($page) && is_int($page)) { 621 624 $url .= "/$page"; … … 630 633 631 634 function get_service_url() { 632 return get_bloginfo('url') . '/' . $this->script_name . '/'. $this->SERVICE_PATH;635 return $this->app_base . $this->SERVICE_PATH; 633 636 } 634 637 … … 639 642 } 640 643 641 $url = get_bloginfo('url') . '/' . $this->script_name . '/'. $this->ENTRY_PATH . "/$postID";644 $url = $this->app_base . $this->ENTRY_PATH . "/$postID"; 642 645 643 646 log_app('function',"get_entry_url() = $url"); … … 656 659 } 657 660 658 $url = get_bloginfo('url') . '/' . $this->script_name . '/'. $this->MEDIA_SINGLE_PATH ."/file/$postID";661 $url = $this->app_base . $this->MEDIA_SINGLE_PATH ."/file/$postID"; 659 662 660 663 log_app('function',"get_media_url() = $url"); … … 920 923 break; 921 924 case 'attachment': 922 $edit = get_bloginfo('url') . '/' . $this->script_name . "/attachments/$post_ID";925 $edit = $this->app_base . "attachments/$post_ID"; 923 926 break; 924 927 }
Note: See TracChangeset
for help on using the changeset viewer.