CoreAPI
[ class tree: CoreAPI ] [ index: CoreAPI ] [ all elements ]

Procedural File: string_api.php

Source Location: /core/string_api.php



Page Details:



Tags:

copyright:  Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
copyright:  Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
link:  http://www.mantisbt.org


Includes:

require_once('user_pref_api.php') [line 33]
requires user_pref_api

require_once('bug_api.php') [line 28]
requires bug_api







string_attribute [line 214]

string string_attribute( string $p_string)

Process a string for display in a text box



Parameters

string   $p_string  
[ Top ]



string_contains_scripting_chars [line 893]

bool string_contains_scripting_chars( string $p_string)

Checks the supplied string for scripting characters, if it contains any, then return true, otherwise return false.



Parameters

string   $p_string  
[ Top ]



string_display [line 127]

string string_display( string $p_string)

Prepare a multiple line string for display to HTML



Parameters

string   $p_string  
[ Top ]



string_display_line [line 137]

string string_display_line( string $p_string)

Prepare a single line string for display to HTML



Parameters

string   $p_string  
[ Top ]



string_display_line_links [line 159]

string string_display_line_links( string $p_string)

Prepare a single line string for display to HTML and add href anchors for

URLs, emails, bug references, and cvs references




Parameters

string   $p_string  
[ Top ]



string_display_links [line 148]

string string_display_links( string $p_string)

Prepare a string for display to HTML and add href anchors for URLs, emails,

bug references, and cvs references




Parameters

string   $p_string  
[ Top ]



string_email [line 184]

string string_email( string $p_string)

Prepare a string for plain text display in email



Parameters

string   $p_string  
[ Top ]



string_email_links [line 194]

string string_email_links( string $p_string)

Prepare a string for plain text display in email and add URLs for bug

links and cvs links




Parameters

string   $p_string  
[ Top ]



string_format_complete_date [line 776]

string string_format_complete_date( int $p_date)

Format date for display



Parameters

int   $p_date  
[ Top ]



string_get_bugnote_view_link [line 616]

string string_get_bugnote_view_link( int $p_bug_id, int $p_bugnote_id, [int $p_user_id = null], [bool $p_detail_info = true], [bool $p_fqdn = false])

return an href anchor that links to a bug VIEW page for the given bug

account for the user preference and site override




Parameters

int   $p_bug_id  
int   $p_bugnote_id  
int   $p_user_id  
bool   $p_detail_info  
bool   $p_fqdn  
[ Top ]



string_get_bugnote_view_url [line 657]

string string_get_bugnote_view_url( int $p_bug_id, int $p_bugnote_id)

return the name and GET parameters of a bug VIEW page for the given bug



Parameters

int   $p_bug_id  
int   $p_bugnote_id  
[ Top ]



string_get_bugnote_view_url_with_fqdn [line 671]

string string_get_bugnote_view_url_with_fqdn( int $p_bug_id, int $p_bugnote_id, [int $p_user_id = null])

return the name and GET parameters of a bug VIEW page for the given bug account for the user preference and site override The returned url includes the fully qualified domain, hence it is suitable to be included in emails.



Parameters

int   $p_bug_id  
int   $p_bugnote_id  
int   $p_user_id  
[ Top ]



string_get_bug_page [line 554]

string string_get_bug_page( string $p_action, [int $p_user_id = null])

return the name of a bug page for the user

account for the user preference and site override $p_action should be something like 'view', 'update', or 'report' If $p_user_id is null or not specified, use the current user * @param string $p_action




Parameters

string   $p_action  
int   $p_user_id  
[ Top ]



string_get_bug_report_link [line 736]

string string_get_bug_report_link( [int $p_user_id = null])

return an href anchor that links to a bug REPORT page for the given bug

account for the user preference and site override




Parameters

int   $p_user_id  
[ Top ]



string_get_bug_report_page [line 756]

string string_get_bug_report_page( [int $p_user_id = null])

return the name of a bug REPORT page for the user

account for the user preference and site override




Parameters

int   $p_user_id  
[ Top ]



string_get_bug_report_url [line 746]

string string_get_bug_report_url( [int $p_user_id = null])

return the name and GET parameters of a bug REPORT page for the given bug

account for the user preference and site override




Parameters

int   $p_user_id  
[ Top ]



string_get_bug_update_link [line 704]

string string_get_bug_update_link( int $p_bug_id, [int $p_user_id = null])

return an href anchor that links to a bug UPDATE page for the given bug

account for the user preference and site override




Parameters

int   $p_bug_id  
int   $p_user_id  
[ Top ]



string_get_bug_update_page [line 726]

string string_get_bug_update_page( [int $p_user_id = null])

return the name of a bug UPDATE page for the user

account for the user preference and site override




Parameters

int   $p_user_id  
[ Top ]



string_get_bug_update_url [line 716]

string string_get_bug_update_url( int $p_bug_id, [int $p_user_id = null])

return the name and GET parameters of a bug UPDATE page for the given bug

account for the user preference and site override




Parameters

int   $p_bug_id  
int   $p_user_id  
[ Top ]



string_get_bug_view_link [line 579]

string string_get_bug_view_link( int $p_bug_id, [int $p_user_id = null], [bool $p_detail_info = true], [bool $p_fqdn = false])

return an href anchor that links to a bug VIEW page for the given bug

account for the user preference and site override




Parameters

int   $p_bug_id  
int   $p_user_id  
bool   $p_detail_info  
bool   $p_fqdn  
[ Top ]



string_get_bug_view_page [line 693]

string string_get_bug_view_page( [int $p_user_id = null])

return the name of a bug VIEW page for the user

account for the user preference and site override




Parameters

int   $p_user_id  
[ Top ]



string_get_bug_view_url [line 647]

string string_get_bug_view_url( int $p_bug_id)

return the name and GET parameters of a bug VIEW page for the given bug



Parameters

int   $p_bug_id  
[ Top ]



string_get_bug_view_url_with_fqdn [line 683]

string string_get_bug_view_url_with_fqdn( int $p_bug_id, [int $p_user_id = null])

return the name and GET parameters of a bug VIEW page for the given bug account for the user preference and site override The returned url includes the fully qualified domain, hence it is suitable to be included in emails.



Parameters

int   $p_bug_id  
int   $p_user_id  
[ Top ]



string_get_confirm_hash_url [line 766]

string string_get_confirm_hash_url( int $p_user_id, string $p_confirm_hash)

return the complete url link to checkin using the confirm_hash



Parameters

int   $p_user_id  
string   $p_confirm_hash  
[ Top ]



string_get_field_name [line 836]

string string_get_field_name( string $p_string)

remap a field name to a string name (for sort filter)



Parameters

string   $p_string  
[ Top ]



string_html_entities [line 861]

string string_html_entities( string $p_string)

Calls htmlentities on the specified string, passing along the current charset.



Parameters

string   $p_string  
[ Top ]



string_html_specialchars [line 870]

string string_html_specialchars( string $p_string)

Calls htmlspecialchars on the specified string, handling utf8



Parameters

string   $p_string  
[ Top ]



string_insert_hrefs [line 447]

string string_insert_hrefs( string $p_string)

Detect URLs and email addresses in the string and replace them with href anchors



Parameters

string   $p_string  
[ Top ]



string_nl2br [line 96]

string string_nl2br( string $p_string, [int $p_wrap = 100])

Similar to nl2br, but fixes up a problem where new lines are doubled between html pre tags.

additionally, wrap the text an $p_wrap character intervals if the config is set




Parameters

string   $p_string  
int   $p_wrap  
[ Top ]



string_normalize [line 827]

string string_normalize( string $p_string)

Normalize a string by removing leading, trailing and excessive internal spaces

note a space is used as the pattern instead of '\s' to make it work with UTF-8 strings




Parameters

string   $p_string  
[ Top ]



string_no_break [line 80]

string string_no_break( string $p_string)

Prepare a string to be printed without being broken into multiple lines



Parameters

string   $p_string  
[ Top ]



string_prepare_header [line 882]

string string_prepare_header( string $p_string)

Prepares a string to be used as part of header().



Parameters

string   $p_string  
[ Top ]



string_preserve_spaces_at_bol [line 44]

string string_preserve_spaces_at_bol( string $p_string)

Preserve spaces at beginning of lines.

Lines must be separated by \n rather than




Parameters

string   $p_string  
[ Top ]



string_process_bugnote_link [line 396]

string string_process_bugnote_link( string $p_string, [bool $p_include_anchor = true], [bool $p_detail_info = true], [bool $p_fqdn = false])

Process $p_string, looking for bugnote ID references and creating bug view links for them.

Returns the processed string.

If $p_include_anchor is true, include the href tag, otherwise just insert the URL

The bugnote tag ('~' by default) must be at the beginning of the string or preceeded by a character that is not a letter, a number or an underscore

if $p_include_anchor = false, $p_fqdn is ignored and assumed to true.




Parameters

string   $p_string  
bool   $p_include_anchor  
bool   $p_detail_info  
bool   $p_fqdn  
[ Top ]



string_process_bug_link [line 340]

string string_process_bug_link( string $p_string, [bool $p_include_anchor = true], [bool $p_detail_info = true], [bool $p_fqdn = false])

Process $p_string, looking for bug ID references and creating bug view links for them.

Returns the processed string.

If $p_include_anchor is true, include the href tag, otherwise just insert the URL

The bug tag ('#' by default) must be at the beginning of the string or preceeded by a character that is not a letter, a number or an underscore

if $p_include_anchor = false, $p_fqdn is ignored and assumed to true.




Parameters

string   $p_string  
bool   $p_include_anchor  
bool   $p_detail_info  
bool   $p_fqdn  
[ Top ]



string_process_cvs_link [line 307]

string string_process_cvs_link( string $p_string, [bool $p_include_anchor = true])

process the $p_string and convert filenames in the format

cvs:filename.ext or cvs:filename.ext:n.nn to a html link if $p_include_anchor is true, include an <a href="..."> tag, otherwise, just insert the URL as text




Parameters

string   $p_string  
bool   $p_include_anchor  
[ Top ]



string_restore_valid_html_tags [line 512]

string string_restore_valid_html_tags( string $p_string, [bool $p_multiline = true])

This function looks for text with htmlentities

like &lt;b&gt; and converts is into corresponding html < b > tag based on the configuration presets




Parameters

string   $p_string  
bool   $p_multiline  
[ Top ]



string_rss_links [line 169]

string string_rss_links( string $p_string)

Prepare a string for display in rss



Parameters

string   $p_string  
[ Top ]



string_sanitize_url [line 233]

string string_sanitize_url( string $p_url, [bool $p_return_absolute = false])

validate the url as part of this site before continuing



Parameters

string   $p_url  
bool   $p_return_absolute  
[ Top ]



string_shorten [line 787]

string string_shorten( string $p_string, [int $p_max = null])

Shorten a string for display on a dropdown to prevent the page rendering too wide

ref issues #4630, #5072, #5131




Parameters

string   $p_string  
int   $p_max  
[ Top ]



string_strip_hrefs [line 494]

string string_strip_hrefs( string $p_string)

Detect href anchors in the string and replace them with URLs and email addresses



Parameters

string   $p_string  
[ Top ]



string_textarea [line 205]

string string_textarea( string $p_string)



Tags:

todo:  function documentation


Parameters

string   $p_string  
[ Top ]



string_url [line 223]

string string_url( string $p_string)

Process a string for inclusion in a URL as a GET parameter



Parameters

string   $p_string  
[ Top ]



Documentation generated on Sun, 12 Dec 2010 23:50:50 +0900 by phpDocumentor 1.4.3
inserted by FC2 system