mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Changed url to URL where appropriate
This commit is contained in:
parent
7b57df5554
commit
c1dd0e4393
25 changed files with 55 additions and 55 deletions
|
@ -98,7 +98,7 @@
|
|||
*
|
||||
* And uncomment the App.baseUrl below. But keep in mind
|
||||
* that plugin assets such as images, CSS and JavaScript files
|
||||
* will not work without url rewriting!
|
||||
* will not work without URL rewriting!
|
||||
* To work around this issue you should either symlink or copy
|
||||
* the plugin assets into you app's webroot directory. This is
|
||||
* recommended even when you are using mod_rewrite. Handling static
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* In this file, you set up routes to your controllers and their actions.
|
||||
* Routes are very important mechanism that allows you to freely connect
|
||||
* different urls to chosen controllers and their actions (functions).
|
||||
* different URLs to chosen controllers and their actions (functions).
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
|
||||
/**
|
||||
* ...and connect the rest of 'Pages' controller's urls.
|
||||
* ...and connect the rest of 'Pages' controller's URLs.
|
||||
*/
|
||||
Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
|
||||
|
||||
|
|
|
@ -454,7 +454,7 @@ class ConsoleShell extends AppShell {
|
|||
}
|
||||
|
||||
/**
|
||||
* Parse an array url and show the equivalent url as a string
|
||||
* Parse an array URL and show the equivalent URL as a string
|
||||
*
|
||||
* @param mixed $command
|
||||
* @return void
|
||||
|
@ -470,7 +470,7 @@ class ConsoleShell extends AppShell {
|
|||
}
|
||||
|
||||
/**
|
||||
* Parse a string url and show as an array
|
||||
* Parse a string URL and show as an array
|
||||
*
|
||||
* @param mixed $command
|
||||
* @return void
|
||||
|
|
|
@ -83,7 +83,7 @@ if (!empty($failed)) {
|
|||
}
|
||||
|
||||
if (Configure::read('debug') < 1) {
|
||||
throw new NotFoundException(__d('cake_dev', 'Debug setting does not allow access to this url.'));
|
||||
throw new NotFoundException(__d('cake_dev', 'Debug setting does not allow access to this URL.'));
|
||||
}
|
||||
|
||||
require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
|
||||
|
|
|
@ -189,7 +189,7 @@ class AuthComponent extends Component {
|
|||
* Normally, if a user is redirected to the $loginAction page, the location they
|
||||
* were redirected from will be stored in the session so that they can be
|
||||
* redirected back after a successful login. If this session value is not
|
||||
* set, redirectUrl() method will return the url specified in $loginRedirect.
|
||||
* set, redirectUrl() method will return the URL specified in $loginRedirect.
|
||||
*
|
||||
* @var mixed
|
||||
* @link http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#AuthComponent::$loginRedirect
|
||||
|
@ -375,7 +375,7 @@ class AuthComponent extends Component {
|
|||
}
|
||||
|
||||
/**
|
||||
* Normalizes $loginAction and checks if current request url is same as login action.
|
||||
* Normalizes $loginAction and checks if current request URL is same as login action.
|
||||
*
|
||||
* @param Controller $controller A reference to the controller object.
|
||||
* @return boolean True if current action is login action else false.
|
||||
|
|
|
@ -1105,7 +1105,7 @@ class Controller extends Object implements CakeEventListener {
|
|||
*
|
||||
* If this method returns false the controller will not continue on to redirect the request.
|
||||
* The $url, $status and $exit variables have same meaning as for the controller's method. You can also
|
||||
* return a string which will be interpreted as the url to redirect to or return associative array with
|
||||
* return a string which will be interpreted as the URL to redirect to or return associative array with
|
||||
* key 'url' and optionally 'status' and 'exit'.
|
||||
*
|
||||
* @param string|array $url A string or array-based URL pointing to another location within the app,
|
||||
|
@ -1114,7 +1114,7 @@ class Controller extends Object implements CakeEventListener {
|
|||
* @param boolean $exit If true, exit() will be called after the redirect
|
||||
* @return mixed
|
||||
* false to stop redirection event,
|
||||
* string controllers a new redirection url or
|
||||
* string controllers a new redirection URL or
|
||||
* array with the keys url, status and exit to be used by the redirect method.
|
||||
* @link http://book.cakephp.org/2.0/en/controllers.html#request-life-cycle-callbacks
|
||||
*/
|
||||
|
|
|
@ -32,7 +32,7 @@ App::uses('Hash', 'Utility');
|
|||
class CakeRequest implements ArrayAccess {
|
||||
|
||||
/**
|
||||
* Array of parameters parsed from the url.
|
||||
* Array of parameters parsed from the URL.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
@ -62,14 +62,14 @@ class CakeRequest implements ArrayAccess {
|
|||
public $query = array();
|
||||
|
||||
/**
|
||||
* The url string used for the request.
|
||||
* The URL string used for the request.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $url;
|
||||
|
||||
/**
|
||||
* Base url path.
|
||||
* Base URL path.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
|
@ -127,7 +127,7 @@ class CakeRequest implements ArrayAccess {
|
|||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $url Trimmed url string to use. Should not contain the application base path.
|
||||
* @param string $url Trimmed URL string to use. Should not contain the application base path.
|
||||
* @param boolean $parseEnvironment Set to false to not auto parse the environment. ie. GET, POST and FILES.
|
||||
*/
|
||||
public function __construct($url = null, $parseEnvironment = true) {
|
||||
|
@ -817,7 +817,7 @@ class CakeRequest implements ArrayAccess {
|
|||
|
||||
/**
|
||||
* Provides a read accessor for `$this->query`. Allows you
|
||||
* to use a syntax similar to `CakeSession` for reading url query data.
|
||||
* to use a syntax similar to `CakeSession` for reading URL query data.
|
||||
*
|
||||
* @param string $name Query string variable name
|
||||
* @return mixed The value being read
|
||||
|
|
|
@ -372,7 +372,7 @@ class Router {
|
|||
* routes that end in `*` are greedy. As you can remap URLs and not loose any passed/named args.
|
||||
*
|
||||
* @param string $route A string describing the template of the route
|
||||
* @param array $url An URL to redirect to. Can be a string or a Cake array-based URL
|
||||
* @param array $url A URL to redirect to. Can be a string or a Cake array-based URL
|
||||
* @param array $options An array matching the named elements in the route to regular expressions which that
|
||||
* element should match. Also contains additional parameters such as which routed parameters should be
|
||||
* shifted into the passed arguments. As well as supplying patterns for routing parameters.
|
||||
|
@ -542,7 +542,7 @@ class Router {
|
|||
}
|
||||
|
||||
/**
|
||||
* Parses given URL string. Returns 'routing' parameters for that url.
|
||||
* Parses given URL string. Returns 'routing' parameters for that URL.
|
||||
*
|
||||
* @param string $url URL to be parsed
|
||||
* @return array Parsed elements from URL
|
||||
|
@ -619,7 +619,7 @@ class Router {
|
|||
|
||||
/**
|
||||
* Takes parameter and path information back from the Dispatcher, sets these
|
||||
* parameters as the current request parameters that are merged with url arrays
|
||||
* parameters as the current request parameters that are merged with URL arrays
|
||||
* created later in the request.
|
||||
*
|
||||
* Nested requests will create a stack of requests. You can remove requests using
|
||||
|
@ -767,7 +767,7 @@ class Router {
|
|||
*
|
||||
* There are a few 'special' parameters that can change the final URL string that is generated
|
||||
*
|
||||
* - `base` - Set to false to remove the base path from the generated url. If your application
|
||||
* - `base` - Set to false to remove the base path from the generated URL. If your application
|
||||
* is not in the root directory, this can be used to generate URLs that are 'cake relative'.
|
||||
* cake relative URLs are required when using requestAction.
|
||||
* - `?` - Takes an array of query string parameters
|
||||
|
@ -906,8 +906,8 @@ class Router {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the full base url that will be used as a prefix for generating
|
||||
* fully qualified URLs for this application. If not parameters are passed,
|
||||
* Sets the full base URL that will be used as a prefix for generating
|
||||
* fully qualified URLs for this application. If no parameters are passed,
|
||||
* the currently configured value is returned.
|
||||
*
|
||||
* ## Note:
|
||||
|
@ -1139,7 +1139,7 @@ class Router {
|
|||
*
|
||||
* @param string $base Base URL
|
||||
* @param string $plugin Plugin name
|
||||
* @return string base url with plugin name removed if present
|
||||
* @return string base URL with plugin name removed if present
|
||||
*/
|
||||
public static function stripPlugin($base, $plugin = null) {
|
||||
if ($plugin) {
|
||||
|
|
|
@ -1205,7 +1205,7 @@ class AuthComponentTest extends CakeTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* test that logout deletes the session variables. and returns the correct url
|
||||
* test that logout deletes the session variables. and returns the correct URL
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -449,7 +449,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* test that redirects with ajax and no url don't do anything.
|
||||
* test that redirects with ajax and no URL don't do anything.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -255,7 +255,7 @@ class ModelWriteTest extends BaseModelTest {
|
|||
/**
|
||||
* test that Caches are getting cleared on save().
|
||||
* ensure that both inflections of controller names are getting cleared
|
||||
* as url for controller could be either overallFavorites/index or overall_favorites/index
|
||||
* as URL for controller could be either overallFavorites/index or overall_favorites/index
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -127,7 +127,7 @@ class CakeRequestTest extends CakeTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Test that querystring args provided in the url string are parsed.
|
||||
* Test that querystring args provided in the URL string are parsed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
@ -1290,8 +1290,8 @@ class CakeRequestTest extends CakeTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Test base, webroot, url and here parsing when there is url rewriting but
|
||||
* CakePHP gets called with index.php in url nonetheless.
|
||||
* Test base, webroot, URL and here parsing when there is URL rewriting but
|
||||
* CakePHP gets called with index.php in URL nonetheless.
|
||||
*
|
||||
* Tests uri with
|
||||
* - index.php/
|
||||
|
@ -1354,7 +1354,7 @@ class CakeRequestTest extends CakeTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Test base, webroot, and url parsing when there is no url rewriting
|
||||
* Test base, webroot, and URL parsing when there is no URL rewriting
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -129,7 +129,7 @@ class AssetDispatcherTest extends CakeTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Test that no exceptions are thrown for //index.php type urls.
|
||||
* Test that no exceptions are thrown for //index.php type URLs.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -652,7 +652,7 @@ class RouterTest extends CakeTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Test url generation with an admin prefix
|
||||
* Test URL generation with an admin prefix
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
@ -1583,7 +1583,7 @@ class RouterTest extends CakeTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* test url generation with legacy (1.2) style prefix routes.
|
||||
* Test URL generation with legacy (1.2) style prefix routes.
|
||||
*
|
||||
* @return void
|
||||
* @see testUrlGenerationWithAutoPrefixes
|
||||
|
@ -2556,7 +2556,7 @@ class RouterTest extends CakeTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* test that a route object returning a full url is not modified.
|
||||
* test that a route object returning a full URL is not modified.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -515,7 +515,7 @@ class CacheHelperTest extends CakeTestCase {
|
|||
*
|
||||
* This test verifies view cache is created correctly when the app name is contained in part of the controller name.
|
||||
* (webapp Name) base name is 'cache' controller is 'cacheTest' action is 'cache_name'
|
||||
* apps url would look something like http://localhost/cache/cacheTest/cache_name
|
||||
* apps URL would look something like http://localhost/cache/cacheTest/cache_name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -7761,7 +7761,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Test base form url when url param is passed with multiple parameters (&)
|
||||
* Test base form URL when url param is passed with multiple parameters (&)
|
||||
*
|
||||
*/
|
||||
public function testCreateQuerystringrequest() {
|
||||
|
|
|
@ -557,7 +557,7 @@ class HelperTest extends CakeTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Ensure HTML escaping of url params. So link addresses are valid and not exploited
|
||||
* Ensure HTML escaping of URL params. So link addresses are valid and not exploited
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -44,7 +44,7 @@ class TestsAppsPostsController extends AppController {
|
|||
}
|
||||
|
||||
/**
|
||||
* check url params
|
||||
* check URL params
|
||||
*
|
||||
*/
|
||||
public function url_var() {
|
||||
|
|
|
@ -191,7 +191,7 @@ class CakeTestSuiteDispatcher {
|
|||
}
|
||||
|
||||
/**
|
||||
* Parse url params into a 'request'
|
||||
* Parse URL params into a 'request'
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -111,7 +111,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
|
|||
/**
|
||||
* Get the baseUrl if one is available.
|
||||
*
|
||||
* @return string The base url for the request.
|
||||
* @return string The base URL for the request.
|
||||
*/
|
||||
public function baseUrl() {
|
||||
if (!empty($_SERVER['PHP_SELF'])) {
|
||||
|
|
|
@ -141,7 +141,7 @@ class CakeTextReporter extends CakeBaseReporter {
|
|||
|
||||
/**
|
||||
* Generate a test case list in plain text.
|
||||
* Creates as series of url's for tests that can be run.
|
||||
* Creates as series of URLs for tests that can be run.
|
||||
* One case per line.
|
||||
*
|
||||
* @return void
|
||||
|
|
|
@ -246,7 +246,7 @@ class Helper extends Object {
|
|||
* Returns an URL pointing at the provided parameters.
|
||||
*
|
||||
* @param string|array $url Either a relative string url like `/products/view/23` or
|
||||
* an array of url parameters. Using an array for URLs will allow you to leverage
|
||||
* an array of URL parameters. Using an array for URLs will allow you to leverage
|
||||
* the reverse routing features of CakePHP.
|
||||
* @param boolean $full If true, the full base URL will be prepended to the result
|
||||
* @return string Full translated URL with base path.
|
||||
|
@ -293,16 +293,16 @@ class Helper extends Object {
|
|||
}
|
||||
|
||||
/**
|
||||
* Generate url for given asset file. Depending on options passed provides full url with domain name.
|
||||
* Generate URL for given asset file. Depending on options passed provides full URL with domain name.
|
||||
* Also calls Helper::assetTimestamp() to add timestamp to local files
|
||||
*
|
||||
* @param string|array Path string or url array
|
||||
* @param string|array Path string or URL array
|
||||
* @param array $options Options array. Possible keys:
|
||||
* `fullBase` Return full url with domain name
|
||||
* `fullBase` Return full URL with domain name
|
||||
* `pathPrefix` Path prefix for relative URLs
|
||||
* `ext` Asset extension to append
|
||||
* `plugin` False value will prevent parsing path as a plugin
|
||||
* @return string Generated url
|
||||
* @return string Generated URL
|
||||
*/
|
||||
public function assetUrl($path, $options = array()) {
|
||||
if (is_array($path)) {
|
||||
|
@ -341,8 +341,8 @@ class Helper extends Object {
|
|||
/**
|
||||
* Encodes an URL for use in HTML attributes.
|
||||
*
|
||||
* @param string $url The url to encode.
|
||||
* @return string The url encoded for both URL & HTML contexts.
|
||||
* @param string $url The URL to encode.
|
||||
* @return string The URL encoded for both URL & HTML contexts.
|
||||
*/
|
||||
protected function _encodeUrl($url) {
|
||||
$path = parse_url($url, PHP_URL_PATH);
|
||||
|
|
|
@ -1721,7 +1721,7 @@ class FormHelper extends AppHelper {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates an HTML link, but access the url using the method you specify (defaults to POST).
|
||||
* Creates an HTML link, but access the URL using the method you specify (defaults to POST).
|
||||
* Requires javascript to be enabled in browser.
|
||||
*
|
||||
* This method creates a `<form>` element. So do not use this method inside an existing form.
|
||||
|
|
|
@ -401,7 +401,7 @@ class HtmlHelper extends AppHelper {
|
|||
* This overrides the `inline` option.
|
||||
* - `plugin` False value will prevent parsing path as a plugin
|
||||
* - `rel` Defaults to 'stylesheet'. If equal to 'import' the stylesheet will be imported.
|
||||
* - `fullBase` If true the url will get a full address for the css file.
|
||||
* - `fullBase` If true the URL will get a full address for the css file.
|
||||
*
|
||||
* @param string|array $path The name of a CSS style sheet or an array containing names of
|
||||
* CSS stylesheets. If `$path` is prefixed with '/', the path will be relative to the webroot
|
||||
|
|
|
@ -66,7 +66,7 @@ class PaginatorHelper extends AppHelper {
|
|||
* If this key isn't specified Paginator will use plain HTML links.
|
||||
* - `paging['paramType']` The type of parameters to use when creating links. Valid options are
|
||||
* 'querystring' and 'named'. See PaginatorComponent::$settings for more information.
|
||||
* - `convertKeys` - A list of keys in url arrays that should be converted to querysting params
|
||||
* - `convertKeys` - A list of keys in URL arrays that should be converted to querysting params
|
||||
* if paramType == 'querystring'.
|
||||
*
|
||||
* @var array
|
||||
|
@ -103,7 +103,7 @@ class PaginatorHelper extends AppHelper {
|
|||
}
|
||||
|
||||
/**
|
||||
* Before render callback. Overridden to merge passed args with url options.
|
||||
* Before render callback. Overridden to merge passed args with URL options.
|
||||
*
|
||||
* @param string $viewFile
|
||||
* @return void
|
||||
|
@ -380,7 +380,7 @@ class PaginatorHelper extends AppHelper {
|
|||
* - `model` The model to use, defaults to PaginatorHelper::defaultModel()
|
||||
*
|
||||
* @param string $title Title for the link.
|
||||
* @param string|array $url Url for the action. See Router::url()
|
||||
* @param string|array $url URL for the action. See Router::url()
|
||||
* @param array $options Options for the link. See #options for list of keys.
|
||||
* @return string A link with pagination parameters.
|
||||
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#PaginatorHelper::link
|
||||
|
@ -409,7 +409,7 @@ class PaginatorHelper extends AppHelper {
|
|||
* Merges passed URL options with current pagination state to generate a pagination URL.
|
||||
*
|
||||
* @param array $options Pagination/URL options array
|
||||
* @param boolean $asArray Return the url as an array, or a URI string
|
||||
* @param boolean $asArray Return the URL as an array, or a URI string
|
||||
* @param string $model Which model to paginate on
|
||||
* @return mixed By default, returns a full pagination URL string for use in non-standard contexts (i.e. JavaScript)
|
||||
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html#PaginatorHelper::url
|
||||
|
@ -442,9 +442,9 @@ class PaginatorHelper extends AppHelper {
|
|||
/**
|
||||
* Converts the keys being used into the format set by options.paramType
|
||||
*
|
||||
* @param array $url Array of url params to convert
|
||||
* @param array $url Array of URL params to convert
|
||||
* @param string $type
|
||||
* @return array converted url params.
|
||||
* @return array converted URL params.
|
||||
*/
|
||||
protected function _convertUrlKeys($url, $type) {
|
||||
if ($type === 'named') {
|
||||
|
|
Loading…
Reference in a new issue