WIP: schedulers..
This commit is contained in:
@@ -504,7 +504,6 @@ function get_user_array($add_blank = true, $status = "Active", $assigned_user =
|
||||
$query .= " OR id='$assigned_user'";
|
||||
}
|
||||
$query = $query . ' ORDER BY user_name ASC';
|
||||
$GLOBALS['log']->debug("get_user_array query: $query");
|
||||
$result = $db->query($query, true, "Error filling in user array: ");
|
||||
|
||||
if ($add_blank == true) {
|
||||
@@ -623,7 +622,6 @@ function safe_map($request_var, & $focus, $always_copy = false) {
|
||||
*/
|
||||
function safe_map_named($request_var, & $focus, $member_var, $always_copy) {
|
||||
if (isset($_REQUEST[$request_var]) && ($always_copy || is_null($focus->$member_var))) {
|
||||
$GLOBALS['log']->debug("safe map named called assigning '{$_REQUEST[$request_var]}' to $member_var");
|
||||
$focus->$member_var = $_REQUEST[$request_var];
|
||||
}
|
||||
}
|
||||
@@ -688,32 +686,26 @@ function return_app_list_strings_language($language) {
|
||||
if ($language_used != $default_language) {
|
||||
if (file_exists("custom/application/Ext/Language/$default_language.lang.ext.php")) {
|
||||
$app_list_strings = _mergeCustomAppListStrings("custom/application/Ext/Language/" . $default_language . ".lang.ext.php", $app_list_strings);
|
||||
$GLOBALS['log']->info("Found extended language file: " . $default_language . ".lang.ext.php");
|
||||
}
|
||||
if (file_exists("custom/include/language/" . $default_language . ".lang.php")) {
|
||||
include("custom/include/language/" . $default_language . ".lang.php");
|
||||
$GLOBALS['log']->info("Found custom language file: " . $default_language . ".lang.php");
|
||||
}
|
||||
}
|
||||
|
||||
if (file_exists("custom/application/Ext/Language/" . $language . ".lang.ext.php")) {
|
||||
$app_list_strings = _mergeCustomAppListStrings("custom/application/Ext/Language/" . $language . ".lang.ext.php", $app_list_strings);
|
||||
$GLOBALS['log']->info("Found extended language file: " . $language . ".lang.ext.php");
|
||||
}
|
||||
|
||||
if (file_exists("custom/include/language/" . $language . ".lang.php")) {
|
||||
include("custom/include/language/" . $language . ".lang.php");
|
||||
$GLOBALS['log']->info("Found custom language file: " . $language . ".lang.php");
|
||||
}
|
||||
|
||||
if (!isset($app_list_strings)) {
|
||||
$GLOBALS['log']->warn("Unable to find the application language file for language: " . $language);
|
||||
$language_used = $default_language;
|
||||
$app_list_strings = $en_app_list_strings;
|
||||
}
|
||||
|
||||
if (!isset($app_list_strings)) {
|
||||
$GLOBALS['log']->fatal("Unable to load the application language file for the selected language(" . $language . ") or the default language(" . $default_language . ")");
|
||||
return null;
|
||||
}
|
||||
//add mz 2015-01-07
|
||||
@@ -824,16 +816,13 @@ function return_application_language($language) {
|
||||
}
|
||||
if (file_exists("custom/application/Ext/Language/$language.lang.ext.php")) {
|
||||
include("custom/application/Ext/Language/$language.lang.ext.php");
|
||||
$GLOBALS['log']->info("Found extended language file: $language.lang.ext.php");
|
||||
}
|
||||
if (file_exists("custom/include/language/$language.lang.php")) {
|
||||
include("custom/include/language/$language.lang.php");
|
||||
$GLOBALS['log']->info("Found custom language file: $language.lang.php");
|
||||
}
|
||||
|
||||
|
||||
if (!isset($app_strings)) {
|
||||
$GLOBALS['log']->warn("Unable to find the application language file for language: " . $language);
|
||||
require("include/language/$default_language.lang.php");
|
||||
if (file_exists("include/language/$default_language.lang.override.php")) {
|
||||
include("include/language/$default_language.lang.override.php");
|
||||
@@ -844,13 +833,11 @@ function return_application_language($language) {
|
||||
|
||||
if (file_exists("custom/application/Ext/Language/$default_language.lang.ext.php")) {
|
||||
include("custom/application/Ext/Language/$default_language.lang.ext.php");
|
||||
$GLOBALS['log']->info("Found extended language file: $default_language.lang.ext.php");
|
||||
}
|
||||
$language_used = $default_language;
|
||||
}
|
||||
|
||||
if (!isset($app_strings)) {
|
||||
$GLOBALS['log']->fatal("Unable to load the application language file for the selected language($language) or the default language($default_language)");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -892,7 +879,6 @@ function return_module_language($language, $module, $refresh = false) {
|
||||
// Jenny - Bug 8119: Need to check if $module is not empty
|
||||
if (empty($module)) {
|
||||
$stack = debug_backtrace();
|
||||
$GLOBALS['log']->warn("Variable module is not in return_module_language " . var_export($stack, true));
|
||||
return array();
|
||||
}
|
||||
|
||||
@@ -991,7 +977,6 @@ function return_mod_list_strings_language($language, $module) {
|
||||
|
||||
// if we still don't have a language pack, then log an error
|
||||
if (!isset($mod_list_strings)) {
|
||||
$GLOBALS['log']->fatal("Unable to load the application list language file for the selected language($language) or the default language($default_language) for module({$module})");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1022,13 +1007,11 @@ function return_theme_language($language, $theme) {
|
||||
include(SugarThemeRegistry::get($theme)->getFilePath() . "/language/$current_language.lang.php.override");
|
||||
}
|
||||
if (!isset($theme_strings)) {
|
||||
$GLOBALS['log']->warn("Unable to find the theme file for language: " . $language . " and theme: " . $theme);
|
||||
require(SugarThemeRegistry::get($theme)->getFilePath() . "/language/$default_language.lang.php");
|
||||
$language_used = $default_language;
|
||||
}
|
||||
|
||||
if (!isset($theme_strings)) {
|
||||
$GLOBALS['log']->fatal("Unable to load the theme($theme) language file for the selected language($language) or the default language($default_language)");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1091,7 +1074,6 @@ function generate_where_statement($where_clauses) {
|
||||
$where .= $clause;
|
||||
}
|
||||
|
||||
$GLOBALS['log']->info("Here is the where clause for the list view: $where");
|
||||
return $where;
|
||||
}
|
||||
|
||||
@@ -1697,9 +1679,6 @@ function clean_string($str, $filter = "STANDARD") {
|
||||
);
|
||||
|
||||
if (preg_match($filters[$filter], $str)) {
|
||||
if (isset($GLOBALS['log']) && is_object($GLOBALS['log'])) {
|
||||
$GLOBALS['log']->fatal("SECURITY: bad data passed in; string: {$str}");
|
||||
}
|
||||
die("Bad data passed in; <a href=\"{$sugar_config['site_url']}\">Return to Home</a>");
|
||||
} else {
|
||||
return $str;
|
||||
@@ -2246,7 +2225,6 @@ function get_bean_select_array($add_blank = true, $bean_name, $display_columns,
|
||||
$query .= ' order by ' . $order_by;
|
||||
}
|
||||
|
||||
$GLOBALS['log']->debug("get_user_array query: $query");
|
||||
$result = $db->query($query, true, "Error filling in user array: ");
|
||||
|
||||
if ($add_blank == true) {
|
||||
@@ -3566,7 +3544,6 @@ function getJavascriptSiteURL() {
|
||||
$site_url = preg_replace('/^http\:/', 'https:', $site_url);
|
||||
}
|
||||
}
|
||||
$GLOBALS['log']->debug("getJavascriptSiteURL(), site_url=" . $site_url);
|
||||
return $site_url;
|
||||
}
|
||||
|
||||
@@ -4105,7 +4082,6 @@ function verify_image_file($path, $jpeg = false) {
|
||||
$data = fread($fp, 4096);
|
||||
fclose($fp);
|
||||
if (preg_match("/<(html|!doctype|script|body|head|plaintext|table|img |pre(>| )|frameset|iframe|object|link|base|style|font|applet|meta|center|form|isindex)/i", $data, $m)) {
|
||||
$GLOBALS['log']->info("Found {$m[0]} in $path, not allowing upload");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user