diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/atom/helpers/atom.php | 16 | ||||
-rw-r--r-- | modules/atom/libraries/Gallery_Atom_Entry.php | 4 | ||||
-rw-r--r-- | modules/atom/libraries/Gallery_Atom_Feed.php | 4 | ||||
-rw-r--r-- | modules/atom/libraries/Gallery_Atom_Link.php | 4 |
4 files changed, 6 insertions, 22 deletions
diff --git a/modules/atom/helpers/atom.php b/modules/atom/helpers/atom.php index fdc21053..b1bea5d3 100644 --- a/modules/atom/helpers/atom.php +++ b/modules/atom/helpers/atom.php @@ -33,20 +33,4 @@ class atom_Core { public static function unix_to_internet_timestamp($timestamp) { return sprintf("%sZ", date("Y-m-d\TH:i:s", $timestamp)); } - - /** - * @todo can this be normalized with the code in MY_url - */ - public static function get_absolute_url() { - $base_url = atom::get_base_url(); - $absolute_url = $base_url . url::current(true); - return $absolute_url; - } - - /** - * @todo can this be normalized with the code in MY_url - */ - public static function get_base_url() { - return sprintf("http://%s%s", $_SERVER["HTTP_HOST"], url::base(true)); - } } diff --git a/modules/atom/libraries/Gallery_Atom_Entry.php b/modules/atom/libraries/Gallery_Atom_Entry.php index 57785fd7..e7d0ea8b 100644 --- a/modules/atom/libraries/Gallery_Atom_Entry.php +++ b/modules/atom/libraries/Gallery_Atom_Entry.php @@ -27,10 +27,10 @@ class Gallery_Atom_Entry_Core extends Atom_Entry { parent::__construct("entry"); /* Set feed ID and self link. */ - $this->id(html::specialchars(atom::get_absolute_url())); + $this->id(html::specialchars(url::get_absolute_url())); $this->link() ->rel("self") - ->href(atom::get_absolute_url()); + ->href(url::get_absolute_url()); } public function link() { diff --git a/modules/atom/libraries/Gallery_Atom_Feed.php b/modules/atom/libraries/Gallery_Atom_Feed.php index ff908682..61fba5b4 100644 --- a/modules/atom/libraries/Gallery_Atom_Feed.php +++ b/modules/atom/libraries/Gallery_Atom_Feed.php @@ -27,10 +27,10 @@ class Gallery_Atom_Feed_Core extends Atom_Feed { parent::__construct("feed"); /* Set feed ID and self link. */ - $this->id(html::specialchars(atom::get_absolute_url())); + $this->id(html::specialchars(url::get_absolute_url())); $this->link() ->rel("self") - ->href(atom::get_absolute_url()); + ->href(url::get_absolute_url()); } public function link() { diff --git a/modules/atom/libraries/Gallery_Atom_Link.php b/modules/atom/libraries/Gallery_Atom_Link.php index abcd3bc9..07e3e891 100644 --- a/modules/atom/libraries/Gallery_Atom_Link.php +++ b/modules/atom/libraries/Gallery_Atom_Link.php @@ -27,7 +27,7 @@ class Gallery_Atom_Link_Core extends Atom_Link { $this->rel("related") ->type(rest::ATOM) ->title($title) - ->href(sprintf("%s%s", atom::get_base_url(), $relative_uri)); + ->href(sprintf("%s%s", url::base(true, "http"), $relative_uri)); return $this; } @@ -39,7 +39,7 @@ class Gallery_Atom_Link_Core extends Atom_Link { $this->rel("related") ->type("image/" . $image_type) ->title($title) - ->href(sprintf("%s%s", atom::get_base_url(), $relative_uri)); + ->href(sprintf("%s%s", url::base(true, "http"), $relative_uri)); return $this; } } |