From 08f0f8b751c0e956e12fade9f6eea2bd581042ac Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 9 Nov 2012 10:27:43 +0200 Subject: [PATCH] Polish docs for URL and XML helpers and deprecate obsolete options for String helper random_string() and URL helper url_title() --- system/helpers/url_helper.php | 17 +- user_guide_src/source/changelog.rst | 34 +- .../source/helpers/string_helper.rst | 9 +- user_guide_src/source/helpers/text_helper.rst | 4 +- user_guide_src/source/helpers/url_helper.rst | 300 ++++++++++-------- .../source/installation/upgrade_300.rst | 27 +- 6 files changed, 235 insertions(+), 156 deletions(-) diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 8e9cb7b0364..0aa358a0be4 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -474,9 +474,11 @@ function prep_url($str = '') * human-friendly URL string with a "separator" string * as the word separator. * - * @param string the string - * @param string the separator - * @param bool + * @todo Remove old 'dash' and 'underscore' usage in 3.1+. + * @param string $str Input string + * @param string $separator Word separator + * (usually '-' or '_') + * @param bool $lowercase Wether to transform the output string to lowercase * @return string */ function url_title($str, $separator = '-', $lowercase = FALSE) @@ -525,10 +527,11 @@ function url_title($str, $separator = '-', $lowercase = FALSE) * For very fine grained control over headers, you could use the Output * Library's set_header() function. * - * @param string the URL - * @param string the method: location or refresh - * @param int - * @return string + * @param string $uri URL + * @param string $method Redirect method + * 'auto', 'location' or 'refresh' + * @param int $code HTTP Response status code + * @return void */ function redirect($uri = '', $method = 'auto', $code = NULL) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 3296e876dfc..27fc975b51a 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -66,31 +66,33 @@ Release Date: Not Released - Added function ``date_range()`` that generates a list of dates between a specified period. - ``create_captcha()`` accepts additional colors parameter, allowing for color customization. - :doc:`URL Helper ` changes include: - - ``url_title()`` will now trim extra dashes from beginning and end. - - ``anchor_popup()`` will now fill the *href* attribute with the URL and its JS code will return FALSE instead. - - Added JS window name support to ``anchor_popup()`` function. - - Added support (auto-detection) for HTTP/1.1 response code 303 in ``redirect()``. - - "auto" method in ``redirect()`` now chooses the "refresh" method only on IIS servers, instead of all servers on Windows. + - Deprecated *separator* options **dash** and **underscore** for function :php:func:`url_title()` (they are only aliases for '-' and '_' respectively). + - :php:func:`url_title()` will now trim extra dashes from beginning and end. + - :php:func:`anchor_popup()` will now fill the *href* attribute with the URL and its JS code will return FALSE instead. + - Added JS window name support to the :php:func:`anchor_popup()` function. + - Added support (auto-detection) for HTTP/1.1 response code 303 in :php:func:`redirect()`. + - Changed :php:func:`redirect()` to only choose the **refresh** method only on IIS servers, instead of all servers on Windows (when **auto** is used). - Added XHTML Basic 1.1 doctype to :doc:`HTML Helper `. - :doc:`Inflector Helper ` changes include: - - Changed :php:func:`humanize()` to allow passing an input separator as its second parameter. - - Refactored :php:func:`plural()` and :php:func:`singular()` to avoid double pluralization and support more words. + - Changed :php:func:`humanize()` to allow passing an input separator as its second parameter. + - Refactored :php:func:`plural()` and :php:func:`singular()` to avoid double pluralization and support more words. - Added an optional third parameter to ``force_download()`` that enables/disables sending the actual file MIME type in the Content-Type header (disabled by default). - Added a work-around in ``force_download()`` for a bug Android <= 2.1, where the filename extension needs to be in uppercase. - :doc:`Form Helper ` changes include: - - :php:func:`form_dropdown()` will now also take an array for unity with other form helpers. - - :php:func:`form_prep()`'s second argument now only accepts a boolean value, which determines whether the value is escaped for a