From 12fe58d997d2066dc362fd393a18b4e5da190513 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 27 May 2009 15:11:53 -0700 Subject: Rename 'kohana' to 'system' to conform to the Kohana filesystem layout. I'm comfortable with us not clearly drawing the distinction about the fact that it's Kohana. --- kohana/helpers/url.php | 252 ------------------------------------------------- 1 file changed, 252 deletions(-) delete mode 100644 kohana/helpers/url.php (limited to 'kohana/helpers/url.php') diff --git a/kohana/helpers/url.php b/kohana/helpers/url.php deleted file mode 100644 index f3d0ec8b..00000000 --- a/kohana/helpers/url.php +++ /dev/null @@ -1,252 +0,0 @@ - 'Refresh', - '300' => 'Multiple Choices', - '301' => 'Moved Permanently', - '302' => 'Found', - '303' => 'See Other', - '304' => 'Not Modified', - '305' => 'Use Proxy', - '307' => 'Temporary Redirect' - ); - - // Validate the method and default to 302 - $method = isset($codes[$method]) ? (string) $method : '302'; - - if ($method === '300') - { - $uri = (array) $uri; - - $output = ''; - - // The first URI will be used for the Location header - $uri = $uri[0]; - } - else - { - $output = '

'.html::anchor($uri).'

'; - } - - // Run the redirect event - Event::run('system.redirect', $uri); - - if (strpos($uri, '://') === FALSE) - { - // HTTP headers expect absolute URLs - $uri = url::site($uri, request::protocol()); - } - - if ($method === 'refresh') - { - header('Refresh: 0; url='.$uri); - } - else - { - header('HTTP/1.1 '.$method.' '.$codes[$method]); - header('Location: '.$uri); - } - - // We are about to exit, so run the send_headers event - Event::run('system.send_headers'); - - exit('

'.$method.' - '.$codes[$method].'

'.$output); - } - -} // End url \ No newline at end of file -- cgit v1.2.3