|
iTx Technologies offre gratuitement
|
||
[Vue de la source] [Imprimer] [Statistique du projet]
(aucune description)
| Taille du fichier: | 4433 lignes (125 kb) |
| Inclus ou requis: | 5 fois |
| Réferencé: | 1 fois |
| Inclus ou requis: | 14 fichiers include/utils/user_utils.php include/utils/logic_utils.php include/upload_file.php modules/Trackers/Tracker.php include/language/en_us.lang.php include/utils/security_utils.php modules/DynamicFields/DynamicField.php include/SugarObjects/SugarConfig.php include/utils/db_utils.php include/utils/external_cache.php include/timezone/timezones.php modules/Administration/QuickRepairAndRebuild.php include/modules.php include/JSON.php |
| make_sugar_config(&$sugar_config) X-Ref |
| Aucune description |
| get_sugar_config_defaults() X-Ref |
| Aucune description |
| load_menu($path) X-Ref |
| Aucune description |
| sugar_config_union( $default, $override ) X-Ref |
| Aucune description |
| make_not_writable( $file ) X-Ref |
| Aucune description |
| return_name($row, $first_column, $last_column) X-Ref |
| Aucune description |
| get_languages() X-Ref |
| Aucune description |
| get_language_display($key) X-Ref |
| Aucune description |
| get_assigned_user_name($assigned_user_id, $is_group = '') X-Ref |
| Aucune description |
| get_user_name($id) X-Ref |
| retrieves the user_name column value (login) param: string id GUID of user return: string |
| get_user_array($add_blank=true, $status="Active", $assigned_user="", $use_real_name=false, $user_name_begins = null, $is_group=' AND portal_only=0 ', $from_cache = true) X-Ref |
| Aucune description |
| getUserArrayFromFullName($args) X-Ref |
| uses a different query to return a list of users than get_user_array() param: args string where clause entry return: array Array of Users' details that match passed criteria |
| showFullName() X-Ref |
| based on user pref then system pref |
| clean($string, $maxLength) X-Ref |
| Aucune description |
| safe_map($request_var, & $focus, $always_copy = false) X-Ref |
| Copy the specified request variable to the member variable of the specified object. Do no copy if the member variable is already set. Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights Reserved. Contributor(s): ______________________________________.. |
| safe_map_named($request_var, & $focus, $member_var, $always_copy) X-Ref |
| Copy the specified request variable to the member variable of the specified object. Do no copy if the member variable is already set. Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights Reserved. Contributor(s): ______________________________________.. |
| return_app_list_strings_language($language) X-Ref |
| Aucune description |
| _mergeCustomAppListStrings($file , $app_list_strings) X-Ref |
| The dropdown items in custom language files is $app_list_strings['$key']['$second_key'] = $value not $GLOBALS['app_list_strings']['$key'] = $value, so we have to delete the original ones in app_list_strings and relace it with the custom ones. param: file string the language that you want include, param: app_list_strings array the golbal strings return: array |
| return_application_language($language) X-Ref |
| Aucune description |
| return_module_language($language, $module, $refresh=false) X-Ref |
| Aucune description |
| return_mod_list_strings_language($language,$module) X-Ref |
| Aucune description |
| return_theme_language($language, $theme) X-Ref |
| Aucune description |
| return_session_value_or_default($varname, $default) X-Ref |
| Aucune description |
| append_where_clause(&$where_clauses, $variable_name, $SQL_name = null) X-Ref |
| Creates an array of where restrictions. These are used to construct a where SQL statement on the query It looks for the variable in the $_REQUEST array. If it is set and is not "" it will create a where clause out of it. param: &$where_clauses - The array to append the clause to param: $variable_name - The name of the variable to look for an add to the where clause if found param: $SQL_name - [Optional] If specified, this is the SQL column name that is used. If not specified, the $variable_name is used as the SQL_name. |
| generate_where_statement($where_clauses) X-Ref |
| Generate the appropriate SQL based on the where clauses. returns: string where_clause - The final SQL where clause to be executed. param: $where_clauses - An Array of individual where clauses stored as strings |
| is_guid($guid) X-Ref |
| determines if a passed string matches the criteria for a Sugar GUID param: string $guid return: bool False on failure |
| create_guid() X-Ref |
| A temporary method of generating GUIDs of the correct format for our DB. return: String contianing a GUID in the format: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee |
| create_guid_section($characters) X-Ref |
| Aucune description |
| ensure_length(&$string, $length) X-Ref |
| Aucune description |
| microtime_diff($a, $b) X-Ref |
| Aucune description |
| displayStudioForCurrentUser() X-Ref |
| Aucune description |
| displayWorkflowForCurrentUser() X-Ref |
| Aucune description |
| get_admin_modules_for_user($user) X-Ref |
| Aucune description |
| get_workflow_admin_modules_for_user($user) X-Ref |
| Aucune description |
| is_admin_for_any_module($user) X-Ref |
| Aucune description |
| is_admin_for_module($user,$module) X-Ref |
| Aucune description |
| is_admin($user) X-Ref |
| Check if user id belongs to a system admin. Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights Reserved. Contributor(s): ______________________________________.. |
| get_theme_display($theme) X-Ref |
| Return the display name for a theme if it exists. Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights Reserved. Contributor(s): ______________________________________.. |
| get_themes() X-Ref |
| Return an array of directory names. Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights Reserved. Contributor(s): ______________________________________.. |
| get_select_options($option_list, $selected) X-Ref |
| THIS FUNCTION IS DEPRECATED AND SHOULD NOT BE USED; USE get_select_options_with_id() Create HTML to display select options in a dropdown list. To be used inside of a select statement in a form. param $option_list - the array of strings to that contains the option list param $selected - the string which contains the default value Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights Reserved. Contributor(s): ______________________________________.. |
| get_select_options_with_id($option_list, $selected_key) X-Ref |
| Create HTML to display select options in a dropdown list. To be used inside of a select statement in a form. This method expects the option list to have keys and values. The keys are the ids. The values are the display strings. param $option_list - the array of strings to that contains the option list param $selected - the string which contains the default value Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights Reserved. Contributor(s): ______________________________________.. |
| get_select_options_with_id_separate_key($label_list, $key_list, $selected_key) X-Ref |
| Create HTML to display select options in a dropdown list. To be used inside of a select statement in a form. This method expects the option list to have keys and values. The keys are the ids. The values are the display strings. param $label_list - the array of strings to that contains the option list param $key_list - the array of strings to that contains the values list param $selected - the string which contains the default value Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights Reserved. Contributor(s): ______________________________________.. |
| sugar_die($error_message) X-Ref |
| Call this method instead of die(). Then we call the die method with the error message that is passed in. |
| get_clear_form_js() X-Ref |
| Create javascript to clear values of all elements in a form. Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights Reserved. Contributor(s): ______________________________________.. |
| clear_form(form) X-Ref |
| Aucune description |
| get_set_focus_js() X-Ref |
| Create javascript to set the cursor focus to specific field in a form when the screen is rendered. The field name is currently hardcoded into the the function. Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights Reserved. Contributor(s): ______________________________________.. |
| array_csort() X-Ref |
| Very cool algorithm for sorting multi-dimensional arrays. Found at http://us2.php.net/manual/en/function.array-multisort.php Syntax: $new_array = array_csort($array [, 'col1' [, SORT_FLAG [, SORT_FLAG]]]...); Explanation: $array is the array you want to sort, 'col1' is the name of the column you want to sort, SORT_FLAGS are : SORT_ASC, SORT_DESC, SORT_REGULAR, SORT_NUMERIC, SORT_STRING you can repeat the 'col',FLAG,FLAG, as often you want, the highest prioritiy is given to the first - so the array is sorted by the last given column first, then the one before ... Example: $array = array_csort($array,'town','age',SORT_DESC,'name'); Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights Reserved. Contributor(s): ______________________________________.. |
| parse_calendardate($local_format) X-Ref |
| Converts localized date format string to jscalendar format Example: $array = array_csort($array,'town','age',SORT_DESC,'name'); Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights Reserved. Contributor(s): ______________________________________.. |
| translate($string, $mod='', $selectedValue='') X-Ref |
| Aucune description |
| unTranslateNum($num) X-Ref |
| Aucune description |
| add_http($url) X-Ref |
| Aucune description |
| getDefaultXssTags() X-Ref |
| returns a default array of XSS tags to clean return: array |
| clean_xss($str, $cleanImg=true) X-Ref |
| Detects typical XSS attack patterns param: string str String to search for XSS attack vectors param: bool cleanImg Flag to allow <img> tags to survive - only used by InboundEmail for inline images. return: array Array of matches, empty on clean string |
| xss_check_pattern($pattern, $str) X-Ref |
| Helper function used by clean_xss() to parse for known-bad vectors param: string pattern Regex pattern to use param: string str String to parse for badness return: array |
| clean_string($str, $filter = "STANDARD") X-Ref |
| Aucune description |
| clean_special_arguments() X-Ref |
| Aucune description |
| clean_superglobals($key, $filter = 'STANDARD') X-Ref |
| cleans the given key in superglobals $_GET, $_POST, $_REQUEST |
| set_superglobals($key, $val) X-Ref |
| Aucune description |
| clean_incoming_data() X-Ref |
| Aucune description |
| str_begin($str, $begin) X-Ref |
| Aucune description |
| str_end($str, $end) X-Ref |
| Aucune description |
| securexss($value) X-Ref |
| Aucune description |
| securexsskey($value, $die=true) X-Ref |
| Aucune description |
| preprocess_param($value) X-Ref |
| Aucune description |
| set_register_value($category, $name, $value) X-Ref |
| Aucune description |
| get_register_value($category,$name) X-Ref |
| Aucune description |
| convert_id($string) X-Ref |
| Aucune description |
| get_image($image,$other_attributes,$width="",$height="") X-Ref |
| getImagePath($image_name) X-Ref |
| getWebPath($relative_path) X-Ref |
| Aucune description |
| getJSPath($relative_path, $additional_attrs='') X-Ref |
| Aucune description |
| getSWFPath($relative_path, $additional_params='') X-Ref |
| Aucune description |
| getSQLDate($date_str) X-Ref |
| Aucune description |
| clone_history(&$db, $from_id,$to_id, $to_type) X-Ref |
| Aucune description |
| values_to_keys($array) X-Ref |
| Aucune description |
| clone_relationship(&$db, $tables = array() X-Ref |
| Aucune description |
| get_unlinked_email_query($type, $bean) X-Ref |
| Aucune description |
| number_empty($value) X-Ref |
| Check to see if the number is empty or non-zero param: $value return: boolean |
| get_bean_select_array($add_blank=true, $bean_name, $display_columns, $where='', $order_by='', $blank_is_none=false) X-Ref |
| Aucune description |
| parse_list_modules(&$listArray) X-Ref |
param: unknown_type $listArray |
| display_notice($msg = false) X-Ref |
| Aucune description |
| skype_formatted($number) X-Ref |
| Aucune description |
| format_skype($number) X-Ref |
| Aucune description |
| insert_charset_header() X-Ref |
| Aucune description |
| getCurrentURL() X-Ref |
| Aucune description |
| javascript_escape($str) X-Ref |
| Aucune description |
| js_escape($str, $keep=true) X-Ref |
| Aucune description |
| br2nl($str) X-Ref |
| Aucune description |
| _ppd($mixed) X-Ref |
| Private helper function for displaying the contents of a given variable. This function is only intended to be used for SugarCRM internal development. The ppd stands for Pre Print Die. |
| _ppl($mixed, $die=false, $displayStackTrace=false, $loglevel="fatal") X-Ref |
| Private helper function for displaying the contents of a given variable in the Logger. This function is only intended to be used for SugarCRM internal development. The pp stands for Pre Print. param: $mixed var to print_r() param: $die boolean end script flow param: $displayStackTrace also show stack trace |
| _ppf($bean, $die=false) X-Ref |
| private helper function to quickly show the major, direct, field attributes of a given bean. The ppf stands for Pre[formatted] Print Focus [object] param: object bean The focus bean |
| _pp($mixed) X-Ref |
| Private helper function for displaying the contents of a given variable. This function is only intended to be used for SugarCRM internal development. The pp stands for Pre Print. |
| _pstack_trace($mixed=NULL) X-Ref |
| Private helper function for displaying the contents of a given variable. This function is only intended to be used for SugarCRM internal development. The pp stands for Pre Print. |
| _ppt($mixed, $textOnly=false) X-Ref |
| Private helper function for displaying the contents of a given variable. This function is only intended to be used for SugarCRM internal development. The pp stands for Pre Print Trace. |
| _pptd($mixed) X-Ref |
| Private helper function for displaying the contents of a given variable. This function is only intended to be used for SugarCRM internal development. The pp stands for Pre Print Trace Die. |
| decodeJavascriptUTF8($str) X-Ref |
| Private helper function for decoding javascript UTF8 This function is only intended to be used for SugarCRM internal development. |
| check_php_version($sys_php_version = '') X-Ref |
| Will check if a given PHP version string is supported (tested on this ver), unsupported (results unknown), or invalid (something will break on this ver). Do not pass in any pararameter to default to a check against the current environment's PHP version. return: 1 implies supported, 0 implies unsupported, -1 implies invalid |
| check_iis_version($sys_iis_version = '') X-Ref |
| Will check if a given IIS version string is supported (tested on this ver), unsupported (results unknown), or invalid (something will break on this ver). return: 1 implies supported, 0 implies unsupported, -1 implies invalid |
| pre_login_check() X-Ref |
| Aucune description |
| set_focus() X-Ref |
| Aucune description |
| sugar_cleanup($exit = false) X-Ref |
| Aucune description |
| check_logic_hook_file($module_name, $event, $action_array) X-Ref |
| Aucune description |
| remove_logic_hook($module_name, $event, $action_array) X-Ref |
| Aucune description |
| display_stack_trace($textOnly=false) X-Ref |
| Aucune description |
| StackTraceErrorHandler($errno, $errstr, $errfile,$errline, $errcontext) X-Ref |
| Aucune description |
| get_sub_cookies($name) X-Ref |
| Aucune description |
| mark_delete_components($sub_object_array, $run_second_level=false, $sub_sub_array="") X-Ref |
| Aucune description |
| return_bytes($val) X-Ref |
| For translating the php.ini memory values into bytes. e.g. input value of '8M' will return 8388608. |
| url2html($string) X-Ref |
| Adds the href HTML tags around any URL in the $string |
| is_windows() X-Ref |
| tries to determine whether the Host machine is a Windows machine |
| is_writable_windows($file) X-Ref |
| equivalent for windows filesystem for PHP's is_writable() param: string file Full path to the file/dir return: bool true if writable |
| lookupTimezone($userOffset = 0) X-Ref |
| best guesses Timezone based on webserver's TZ settings |
| convert_module_to_singular($module_array) X-Ref |
| Aucune description |
| get_singular_bean_name($bean_name) X-Ref |
| Aucune description |
| get_label($label_tag, $temp_module_strings) X-Ref |
| Aucune description |
| search_filter_rel_info(& $focus, $tar_rel_module, $relationship_name) X-Ref |
| Aucune description |
| get_module_info($module_name) X-Ref |
| Aucune description |
| get_valid_bean_name($module_name) X-Ref |
| In order to have one place to obtain the proper object name. aCase for example causes issues throughout the application. param: string $moduleName |
| checkAuthUserStatus() X-Ref |
| Aucune description |
| getPhpInfo($level=-1) X-Ref |
| This function returns an array of phpinfo() results that can be parsed and used to figure out what version we run, what modules are compiled in, etc. author: original by "code at adspeed dot com" Fron php.net author: customized for Sugar by Chris N. param: $level int info level constant (1,2,4,8...64); return: $returnInfo array array of info about the PHP environment |
| string_format($format, $args) X-Ref |
| This function will take a string that has tokens like {0}, {1} and will replace those tokens with the args provided param: $format string to format param: $args args to replace return: $result a formatted string |
| format_number_display($num, $system_id) X-Ref |
| Generate a string for displaying a unique identifier that is composed of a system_id and number. This is use to allow us to generate quote numbers using a DB auto-increment key from offline clients and still have the number be unique (since it is modified by the system_id. param: $num of bean param: $system_id from system return: $result a formatted string |
| checkLoginUserStatus() X-Ref |
| Aucune description |
| appendPortToHost($url, $port) X-Ref |
| This function will take a number and system_id and format param: $url URL containing host to append port param: $port the port number - if '' is passed, no change to url return: $resulturl the new URL with the port appended to the host |
| getJSONobj() X-Ref |
| Singleton to return JSON object return: JSON object |
| setPhpIniSettings() X-Ref |
| Set default php.ini settings for entry points |
| sugarArrayMerge($gimp, $dom) X-Ref |
| like array_merge() but will handle array elements that are themselves arrays; PHP's version just overwrites the element with the new one. param: array gimp the array whose values will be overloaded param: array dom the array whose values will pwn the gimp's return: array beaten gimp |
| sugarArrayMergeRecursive($gimp, $dom) X-Ref |
| Similiar to sugarArrayMerge except arrays of N depth are merged. param: array gimp the array whose values will be overloaded param: array dom the array whose values will pwn the gimp's return: array beaten gimp |
| returnPhpJsonStatus() X-Ref |
| finds the correctly working versions of PHP-JSON return: bool True if NOT found or WRONG version |
| getTrackerSubstring($name) X-Ref |
| returns a 20-char or less string for the Tracker to display in the header param: string name field for a given Object return: string 20-char or less name |
| generate_search_where($field_list=array() X-Ref |
| Aucune description |
| add_quotes($str) X-Ref |
| Aucune description |
| rebuildConfigFile($sugar_config, $sugar_version) X-Ref |
| This function will rebuild the config file param: $sugar_config param: $sugar_version return: bool true if successful |
| getJavascriptSiteURL() X-Ref |
| getJavascriptSiteURL This function returns a URL for the client javascript calls to access the site. It uses $_SERVER['HTTP_REFERER'] in the event that Proxy servers are used to access the site. Thus, the hostname in the URL returned may not always match that of $sugar_config['site_url']. Basically, the assumption is that however the user accessed the website is how they will continue to with subsequent javascript requests. If the variable $_SERVER['HTTP_REFERER'] is not found then we default to old algorithm. return: $site_url The url used to refer to the website |
| add_squotes($str) X-Ref |
| Aucune description |
| array_depth($array, $depth_count=-1, $depth_array=array() X-Ref |
| Aucune description |
| createGroupUser($name) X-Ref |
| Creates a new Group User param: string $name Name of Group User return: string GUID of new Group User |
| _getIcon($iconFileName) X-Ref |
| Aucune description |
| getStudioIcon($iconFileName='', $altFileName='', $width='48', $height='48', $align='baseline' ) X-Ref |
| Function to grab the correct icon image for Studio param: string $iconFileName Name of the icon file param: string $altfilename Name of a fallback icon file (displayed if the imagefilename doesn't exist) param: string $width Width of image param: string $height Height of image param: string $align Alignment of image return: string $string <img> tag with corresponding image |
| get_dashlets_dialog_icon($module='', $width='32', $height='32', $align='absmiddle') X-Ref |
| Function to grab the correct icon image for Dashlets Dialog param: string $filename Location of the icon file param: string $module Name of the module to fall back onto if file does not exist param: string $width Width of image param: string $height Height of image param: string $align Alignment of image return: string $string <img> tag with corresponding image |
| html_entity_decode_utf8($string) X-Ref |
| Aucune description |
| code2utf($num) X-Ref |
| Aucune description |
| str_split_php4($string, $length = 1) X-Ref |
| Aucune description |
| str_split($string, $length = 1) X-Ref |
| Aucune description |
| is_freetds() X-Ref |
| Aucune description |
| stripos($haystack,$needle,$offset=0) X-Ref |
| Aucune description |
| chartStyle() X-Ref |
| Chart dashlet helper function that returns the correct CSS file, dependent on the current theme. return: chart.css file to use |
| chartColors() X-Ref |
| Chart dashlet helper functions that returns the correct XML color file for charts, dependent on the current theme. return: sugarColors.xml to use |
| ajaxInit() X-Ref |
| This function is designed to set up the php enviroment for AJAX requests. |
| getAbsolutePath($path,$currentServer = false) X-Ref |
| Returns an absolute path from the given path, determining if it is relative or absolute param: string $path return: string |
| loadBean($module) X-Ref |
| Returns the bean object of the given module param: string $module return: object |
| get_alt_hot_key() X-Ref |
| Returns the shortcut keys to access the shortcut links. Shortcut keys vary depending on browser versions and operating systems. return: String value of the shortcut keys |
| can_start_session() X-Ref |
| Aucune description |
| load_link_class($properties) X-Ref |
| Aucune description |
| inDeveloperMode() X-Ref |
| Aucune description |
| sugar_substr($string, $length, $charset='UTF-8') X-Ref |
| The function is used because currently we are not supporting mbstring.func_overload For some user using mssql without FreeTDS, they may store multibyte charaters in varchar using latin_general collation. It cannot store so many mutilbyte characters, so we need to use strlen. The varchar in MySQL, Orcale, and nvarchar in FreeTDS, we can store $length mutilbyte charaters in it. we need mb_substr to keep more info. returns: the substred strings. |
| sugar_ucfirst($string, $charset='UTF-8') X-Ref |
| The function is used because on FastCGI enviroment, the ucfirst(Chinese Characters) will produce bad charcters. This will work even without setting the mbstring.*encoding |
| unencodeMultienum($string) X-Ref |
| Aucune description |
| encodeMultienumValue($arr) X-Ref |
| Aucune description |
| create_export_query_relate_link_patch($module, $searchFields, $where) X-Ref |
| create_export_query is used for export and massupdate We haven't handle the these fields: $field['type'] == 'relate' && isset($field['link'] This function will correct the where clause and output necessary join condition for them param: $module: the module name param: $searchFields: searchFields which is got after $searchForm->populateFromArray() param: $where: where clauses return: $ret_array['where']: corrected where clause return: $ret_array['join']: extra join condition |
| clearAllJsAndJsLangFilesWithoutOutput() X-Ref |
| We need to clear all the js cache files, including the js language files in serval places in MB. So I extract them into a util function here. |
| getVersionStatus($version) X-Ref |
| Given a version such as 5.5.0RC1 return RC. If we have a version such as: 5.5 then return GA param: string $version return: string RC, BETA, GA |
| getMajorMinorVersion($version) X-Ref |
| Return the numeric portion of a version. For example if passed 5.5.0RC1 then return 5.5. If given 5.5.1RC1 then return 5.5.1 param: string $version return: version |
|
|
|
|