@@ -43,40 +43,40 @@ discard block |
||
43 | 43 | * *******************************************************************************/ |
44 | 44 | |
45 | 45 | $mod_strings = array( |
46 | - 'LBL_BASIC_SEARCH' => 'Basic Search', |
|
47 | - 'LBL_ADVANCED_SEARCH' => 'Advanced Search', |
|
48 | - 'LBL_BASIC_TYPE' => 'Basic Type', |
|
49 | - 'LBL_ADVANCED_TYPE' => 'Advanced Type', |
|
50 | - 'LBL_SYSOPTS_1' => 'Select from the following system configuration options below.', |
|
46 | + 'LBL_BASIC_SEARCH' => 'Basic Search', |
|
47 | + 'LBL_ADVANCED_SEARCH' => 'Advanced Search', |
|
48 | + 'LBL_BASIC_TYPE' => 'Basic Type', |
|
49 | + 'LBL_ADVANCED_TYPE' => 'Advanced Type', |
|
50 | + 'LBL_SYSOPTS_1' => 'Select from the following system configuration options below.', |
|
51 | 51 | 'LBL_SYSOPTS_2' => 'What type of database will be used for the SuiteCRM instance you are about to install?', |
52 | - 'LBL_SYSOPTS_CONFIG' => 'System Configuration', |
|
53 | - 'LBL_SYSOPTS_DB_TYPE' => '', |
|
54 | - 'LBL_SYSOPTS_DB' => 'Specify Database Type', |
|
52 | + 'LBL_SYSOPTS_CONFIG' => 'System Configuration', |
|
53 | + 'LBL_SYSOPTS_DB_TYPE' => '', |
|
54 | + 'LBL_SYSOPTS_DB' => 'Specify Database Type', |
|
55 | 55 | 'LBL_SYSOPTS_DB_TITLE' => 'Database Type', |
56 | - 'LBL_SYSOPTS_ERRS_TITLE' => 'Please fix the following errors before proceeding:', |
|
57 | - 'LBL_MAKE_DIRECTORY_WRITABLE' => 'Please make the following directory writable:', |
|
56 | + 'LBL_SYSOPTS_ERRS_TITLE' => 'Please fix the following errors before proceeding:', |
|
57 | + 'LBL_MAKE_DIRECTORY_WRITABLE' => 'Please make the following directory writable:', |
|
58 | 58 | 'ERR_DB_VERSION_FAILURE' => 'Unable to check database version.', |
59 | - 'DEFAULT_CHARSET' => 'UTF-8', |
|
59 | + 'DEFAULT_CHARSET' => 'UTF-8', |
|
60 | 60 | 'ERR_ADMIN_USER_NAME_BLANK' => 'Provide the user name for the SuiteCRM admin user. ', |
61 | - 'ERR_ADMIN_PASS_BLANK' => 'Provide the password for the SuiteCRM admin user. ', |
|
61 | + 'ERR_ADMIN_PASS_BLANK' => 'Provide the password for the SuiteCRM admin user. ', |
|
62 | 62 | |
63 | 63 | //'ERR_CHECKSYS_CALL_TIME' => 'Allow Call Time Pass Reference is Off (please enable in php.ini)', |
64 | 64 | 'ERR_CHECKSYS' => 'Errors have been detected during compatibility check. In order for your SuiteCRM Installation to function properly, please take the proper steps to address the issues listed below and either press the recheck button, or try installing again.', |
65 | 65 | 'ERR_CHECKSYS_CALL_TIME' => 'Allow Call Time Pass Reference is On (this should be set to Off in php.ini)', |
66 | - 'ERR_CHECKSYS_CURL' => 'Not found: SuiteCRM Scheduler will run with limited functionality.', |
|
66 | + 'ERR_CHECKSYS_CURL' => 'Not found: SuiteCRM Scheduler will run with limited functionality.', |
|
67 | 67 | 'ERR_CHECKSYS_IMAP' => 'Not found: InboundEmail and Campaigns (Email) require the IMAP libraries. Neither will be functional.', |
68 | - 'ERR_CHECKSYS_MSSQL_MQGPC' => 'Magic Quotes GPC cannot be turned "On" when using MS SQL Server.', |
|
69 | - 'ERR_CHECKSYS_MEM_LIMIT_0' => 'Warning: ', |
|
70 | - 'ERR_CHECKSYS_MEM_LIMIT_1' => ' (Set this to ', |
|
71 | - 'ERR_CHECKSYS_MEM_LIMIT_2' => 'M or larger in your php.ini file)', |
|
72 | - 'ERR_CHECKSYS_MYSQL_VERSION' => 'Minimum Version 4.1.2 - Found: ', |
|
73 | - 'ERR_CHECKSYS_NO_SESSIONS' => 'Failed to write and read session variables. Unable to proceed with the installation.', |
|
74 | - 'ERR_CHECKSYS_NOT_VALID_DIR' => 'Not A Valid Directory', |
|
75 | - 'ERR_CHECKSYS_NOT_WRITABLE' => 'Warning: Not Writable', |
|
76 | - 'ERR_CHECKSYS_PHP_INVALID_VER' => 'Your version of PHP is not supported by SuiteCRM. You will need to install a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported PHP Versions. Your version is ', |
|
77 | - 'ERR_CHECKSYS_IIS_INVALID_VER' => 'Your version of IIS is not supported by SuiteCRM. You will need to install a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported IIS Versions. Your version is ', |
|
78 | - 'ERR_CHECKSYS_FASTCGI' => 'We detect that you are not using a FastCGI handler mapping for PHP. You will need to install/configure a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported Versions. Please see <a href="http://www.iis.net/php/" target="_blank">http://www.iis.net/php/</a> for details ', |
|
79 | - 'ERR_CHECKSYS_FASTCGI_LOGGING' => 'For optimal experience using IIS/FastCGI sapi, set fastcgi.logging to 0 in your php.ini file.', |
|
68 | + 'ERR_CHECKSYS_MSSQL_MQGPC' => 'Magic Quotes GPC cannot be turned "On" when using MS SQL Server.', |
|
69 | + 'ERR_CHECKSYS_MEM_LIMIT_0' => 'Warning: ', |
|
70 | + 'ERR_CHECKSYS_MEM_LIMIT_1' => ' (Set this to ', |
|
71 | + 'ERR_CHECKSYS_MEM_LIMIT_2' => 'M or larger in your php.ini file)', |
|
72 | + 'ERR_CHECKSYS_MYSQL_VERSION' => 'Minimum Version 4.1.2 - Found: ', |
|
73 | + 'ERR_CHECKSYS_NO_SESSIONS' => 'Failed to write and read session variables. Unable to proceed with the installation.', |
|
74 | + 'ERR_CHECKSYS_NOT_VALID_DIR' => 'Not A Valid Directory', |
|
75 | + 'ERR_CHECKSYS_NOT_WRITABLE' => 'Warning: Not Writable', |
|
76 | + 'ERR_CHECKSYS_PHP_INVALID_VER' => 'Your version of PHP is not supported by SuiteCRM. You will need to install a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported PHP Versions. Your version is ', |
|
77 | + 'ERR_CHECKSYS_IIS_INVALID_VER' => 'Your version of IIS is not supported by SuiteCRM. You will need to install a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported IIS Versions. Your version is ', |
|
78 | + 'ERR_CHECKSYS_FASTCGI' => 'We detect that you are not using a FastCGI handler mapping for PHP. You will need to install/configure a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported Versions. Please see <a href="http://www.iis.net/php/" target="_blank">http://www.iis.net/php/</a> for details ', |
|
79 | + 'ERR_CHECKSYS_FASTCGI_LOGGING' => 'For optimal experience using IIS/FastCGI sapi, set fastcgi.logging to 0 in your php.ini file.', |
|
80 | 80 | 'ERR_CHECKSYS_PHP_UNSUPPORTED' => 'Unsupported PHP Version Installed: ( ver', |
81 | 81 | 'LBL_DB_UNAVAILABLE' => 'Database unavailable', |
82 | 82 | 'LBL_CHECKSYS_DB_SUPPORT_NOT_AVAILABLE' => 'Database Support was not found. Please make sure you have the necessary drivers for one of the following supported Database Types: MySQL or MS SQLServer. You might need to uncomment the extension in the php.ini file, or recompile with the right binary file, depending on your version of PHP. Please refer to your PHP Manual for more information on how to enable Database Support.', |
@@ -89,184 +89,184 @@ discard block |
||
89 | 89 | 'ERR_CHECKSYS_CUSTOM_NOT_WRITABLE' => 'The Custom Directory exists but is not writeable. You may have to change permissions on it (chmod 766) or right click on it and uncheck the read only option, depending on your Operating System. Please take the needed steps to make the file writeable.', |
90 | 90 | 'ERR_CHECKSYS_FILES_NOT_WRITABLE' => "The files or directories listed below are not writeable or are missing and cannot be created. Depending on your Operating System, correcting this may require you to change permissions on the files or parent directory (chmod 755), or to right click on the parent directory and uncheck the 'read only' option and apply it to all subfolders.", |
91 | 91 | 'LBL_CHECKSYS_OVERRIDE_CONFIG' => 'Config override', |
92 | - //'ERR_CHECKSYS_SAFE_MODE' => 'Safe Mode is On (please disable in php.ini)', |
|
93 | - 'ERR_CHECKSYS_SAFE_MODE' => 'Safe Mode is On (you may wish to disable in php.ini)', |
|
92 | + //'ERR_CHECKSYS_SAFE_MODE' => 'Safe Mode is On (please disable in php.ini)', |
|
93 | + 'ERR_CHECKSYS_SAFE_MODE' => 'Safe Mode is On (you may wish to disable in php.ini)', |
|
94 | 94 | 'ERR_CHECKSYS_ZLIB' => 'ZLib support not found: SuiteCRM reaps enormous performance benefits with zlib compression.', |
95 | 95 | 'ERR_CHECKSYS_ZIP' => 'ZIP support not found: SuiteCRM needs ZIP support in order to process compressed files.', |
96 | 96 | 'ERR_CHECKSYS_PCRE' => 'PCRE library not found: SuiteCRM needs PCRE library in order to process Perl style of regular expression pattern matching.', |
97 | 97 | 'ERR_CHECKSYS_PCRE_VER' => 'PCRE library version: SuiteCRM needs PCRE library 7.0 or above to process Perl style of regular expression pattern matching.', |
98 | - 'ERR_DB_ADMIN' => 'The provided database administrator username and/or password is invalid, and a connection to the database could not be established. Please enter a valid user name and password. (Error: ', |
|
98 | + 'ERR_DB_ADMIN' => 'The provided database administrator username and/or password is invalid, and a connection to the database could not be established. Please enter a valid user name and password. (Error: ', |
|
99 | 99 | 'ERR_DB_ADMIN_MSSQL' => 'The provided database administrator username and/or password is invalid, and a connection to the database could not be established. Please enter a valid user name and password.', |
100 | - 'ERR_DB_EXISTS_NOT' => 'The specified database does not exist.', |
|
101 | - 'ERR_DB_EXISTS_WITH_CONFIG' => 'Database already exists with config data. To run an install with the chosen database, please re-run the install and choose: "Drop and recreate existing SuiteCRM tables?" To upgrade, use the Upgrade Wizard in the Admin Console. Please read the upgrade documentation located <a href="http://www.suitecrm.com target="_new">here</a>.', |
|
102 | - 'ERR_DB_EXISTS' => 'The provided Database Name already exists -- cannot create another one with the same name.', |
|
100 | + 'ERR_DB_EXISTS_NOT' => 'The specified database does not exist.', |
|
101 | + 'ERR_DB_EXISTS_WITH_CONFIG' => 'Database already exists with config data. To run an install with the chosen database, please re-run the install and choose: "Drop and recreate existing SuiteCRM tables?" To upgrade, use the Upgrade Wizard in the Admin Console. Please read the upgrade documentation located <a href="http://www.suitecrm.com target="_new">here</a>.', |
|
102 | + 'ERR_DB_EXISTS' => 'The provided Database Name already exists -- cannot create another one with the same name.', |
|
103 | 103 | 'ERR_DB_EXISTS_PROCEED' => 'The provided Database Name already exists. You can<br>1. hit the back button and choose a new database name <br>2. click next and continue but all existing tables on this database will be dropped. <strong>This means your tables and data will be blown away.</strong>', |
104 | - 'ERR_DB_HOSTNAME' => 'Host name cannot be blank.', |
|
105 | - 'ERR_DB_INVALID' => 'Invalid database type selected.', |
|
106 | - 'ERR_DB_LOGIN_FAILURE' => 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password', |
|
107 | - 'ERR_DB_LOGIN_FAILURE_MYSQL' => 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password', |
|
108 | - 'ERR_DB_LOGIN_FAILURE_MSSQL' => 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password', |
|
109 | - 'ERR_DB_MYSQL_VERSION' => 'Your MySQL version (%s) is not supported by SuiteCRM. You will need to install a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported MySQL versions.', |
|
110 | - 'ERR_DB_NAME' => 'Database name cannot be blank.', |
|
111 | - 'ERR_DB_NAME2' => "Database name cannot contain a '\\', '/', or '.'", |
|
104 | + 'ERR_DB_HOSTNAME' => 'Host name cannot be blank.', |
|
105 | + 'ERR_DB_INVALID' => 'Invalid database type selected.', |
|
106 | + 'ERR_DB_LOGIN_FAILURE' => 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password', |
|
107 | + 'ERR_DB_LOGIN_FAILURE_MYSQL' => 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password', |
|
108 | + 'ERR_DB_LOGIN_FAILURE_MSSQL' => 'The provided database host, username, and/or password is invalid, and a connection to the database could not be established. Please enter a valid host, username and password', |
|
109 | + 'ERR_DB_MYSQL_VERSION' => 'Your MySQL version (%s) is not supported by SuiteCRM. You will need to install a version that is compatible with the SuiteCRM application. Please consult the Compatibility Matrix in the Release Notes for supported MySQL versions.', |
|
110 | + 'ERR_DB_NAME' => 'Database name cannot be blank.', |
|
111 | + 'ERR_DB_NAME2' => "Database name cannot contain a '\\', '/', or '.'", |
|
112 | 112 | 'ERR_DB_MYSQL_DB_NAME_INVALID' => "Database name cannot contain a '\\', '/', or '.'", |
113 | 113 | 'ERR_DB_MSSQL_DB_NAME_INVALID' => "Database name cannot begin with a number, '#', or '@' and cannot contain a space, '\"', \"'\", '*', '/', '\', '?', ':', '<', '>', '&', '!', or '-'", |
114 | 114 | 'ERR_DB_OCI8_DB_NAME_INVALID' => "Database name can only consist of alphanumeric characters and the symbols '#', '_' or '$'", |
115 | - 'ERR_DB_PASSWORD' => 'The passwords provided for the SuiteCRM database administrator do not match. Please re-enter the same passwords in the password fields.', |
|
116 | - 'ERR_DB_PRIV_USER' => 'Provide a database administrator user name. The user is required for the initial connection to the database.', |
|
117 | - 'ERR_DB_USER_EXISTS' => 'User name for SuiteCRM database user already exists -- cannot create another one with the same name. Please enter a new user name.', |
|
118 | - 'ERR_DB_USER' => 'Enter a user name for the SuiteCRM database administrator.', |
|
119 | - 'ERR_DBCONF_VALIDATION' => 'Please fix the following errors before proceeding:', |
|
115 | + 'ERR_DB_PASSWORD' => 'The passwords provided for the SuiteCRM database administrator do not match. Please re-enter the same passwords in the password fields.', |
|
116 | + 'ERR_DB_PRIV_USER' => 'Provide a database administrator user name. The user is required for the initial connection to the database.', |
|
117 | + 'ERR_DB_USER_EXISTS' => 'User name for SuiteCRM database user already exists -- cannot create another one with the same name. Please enter a new user name.', |
|
118 | + 'ERR_DB_USER' => 'Enter a user name for the SuiteCRM database administrator.', |
|
119 | + 'ERR_DBCONF_VALIDATION' => 'Please fix the following errors before proceeding:', |
|
120 | 120 | 'ERR_DBCONF_PASSWORD_MISMATCH' => 'The passwords provided for the SuiteCRM database user do not match. Please re-enter the same passwords in the password fields.', |
121 | - 'ERR_ERROR_GENERAL' => 'The following errors were encountered:', |
|
122 | - 'ERR_LANG_CANNOT_DELETE_FILE' => 'Cannot delete file: ', |
|
123 | - 'ERR_LANG_MISSING_FILE' => 'Cannot find file: ', |
|
124 | - 'ERR_LANG_NO_LANG_FILE' => 'No language pack file found at include/language inside: ', |
|
125 | - 'ERR_LANG_UPLOAD_1' => 'There was a problem with your upload. Please try again.', |
|
126 | - 'ERR_LANG_UPLOAD_2' => 'Language Packs must be ZIP archives.', |
|
127 | - 'ERR_LANG_UPLOAD_3' => 'PHP could not move the temp file to the upgrade directory.', |
|
128 | - 'ERR_LICENSE_MISSING' => 'Missing Required Fields', |
|
129 | - 'ERR_LICENSE_NOT_FOUND' => 'License file not found!', |
|
130 | - 'ERR_LOG_DIRECTORY_NOT_EXISTS' => 'Log directory provided is not a valid directory.', |
|
131 | - 'ERR_LOG_DIRECTORY_NOT_WRITABLE' => 'Log directory provided is not a writable directory.', |
|
132 | - 'ERR_LOG_DIRECTORY_REQUIRED' => 'Log directory is required if you wish to specify your own.', |
|
133 | - 'ERR_NO_DIRECT_SCRIPT' => 'Unable to process script directly.', |
|
134 | - 'ERR_NO_SINGLE_QUOTE' => 'Cannot use the single quotation mark for ', |
|
135 | - 'ERR_PASSWORD_MISMATCH' => 'The passwords provided for the SuiteCRM admin user do not match. Please re-enter the same passwords in the password fields.', |
|
136 | - 'ERR_PERFORM_CONFIG_PHP_1' => 'Cannot write to the <span class=stop>config.php</span> file.', |
|
137 | - 'ERR_PERFORM_CONFIG_PHP_2' => 'You can continue this installation by manually creating the config.php file and pasting the configuration information below into the config.php file. However, you <strong>must </strong>create the config.php file before you continue to the next step.', |
|
138 | - 'ERR_PERFORM_CONFIG_PHP_3' => 'Did you remember to create the config.php file?', |
|
139 | - 'ERR_PERFORM_CONFIG_PHP_4' => 'Warning: Could not write to config.php file. Please ensure it exists.', |
|
140 | - 'ERR_PERFORM_HTACCESS_1' => 'Cannot write to the ', |
|
141 | - 'ERR_PERFORM_HTACCESS_2' => ' file.', |
|
142 | - 'ERR_PERFORM_HTACCESS_3' => 'If you want to secure your log file from being accessible via browser, create an .htaccess file in your log directory with the line:', |
|
143 | - 'ERR_PERFORM_NO_TCPIP' => '<b>We could not detect an Internet connection.</b> When you do have a connection, please visit <a href="http://www.suitecrm.com/">http://www.suitecrm.com/</a> to register with SuiteCRM. By letting us know a little bit about how your company plans to use SuiteCRM, we can ensure we are always delivering the right application for your business needs.', |
|
144 | - 'ERR_SESSION_DIRECTORY_NOT_EXISTS' => 'Session directory provided is not a valid directory.', |
|
145 | - 'ERR_SESSION_DIRECTORY' => 'Session directory provided is not a writable directory.', |
|
146 | - 'ERR_SESSION_PATH' => 'Session path is required if you wish to specify your own.', |
|
147 | - 'ERR_SI_NO_CONFIG' => 'You did not include config_si.php in the document root, or you did not define $sugar_config_si in config.php', |
|
148 | - 'ERR_SITE_GUID' => 'Application ID is required if you wish to specify your own.', |
|
121 | + 'ERR_ERROR_GENERAL' => 'The following errors were encountered:', |
|
122 | + 'ERR_LANG_CANNOT_DELETE_FILE' => 'Cannot delete file: ', |
|
123 | + 'ERR_LANG_MISSING_FILE' => 'Cannot find file: ', |
|
124 | + 'ERR_LANG_NO_LANG_FILE' => 'No language pack file found at include/language inside: ', |
|
125 | + 'ERR_LANG_UPLOAD_1' => 'There was a problem with your upload. Please try again.', |
|
126 | + 'ERR_LANG_UPLOAD_2' => 'Language Packs must be ZIP archives.', |
|
127 | + 'ERR_LANG_UPLOAD_3' => 'PHP could not move the temp file to the upgrade directory.', |
|
128 | + 'ERR_LICENSE_MISSING' => 'Missing Required Fields', |
|
129 | + 'ERR_LICENSE_NOT_FOUND' => 'License file not found!', |
|
130 | + 'ERR_LOG_DIRECTORY_NOT_EXISTS' => 'Log directory provided is not a valid directory.', |
|
131 | + 'ERR_LOG_DIRECTORY_NOT_WRITABLE' => 'Log directory provided is not a writable directory.', |
|
132 | + 'ERR_LOG_DIRECTORY_REQUIRED' => 'Log directory is required if you wish to specify your own.', |
|
133 | + 'ERR_NO_DIRECT_SCRIPT' => 'Unable to process script directly.', |
|
134 | + 'ERR_NO_SINGLE_QUOTE' => 'Cannot use the single quotation mark for ', |
|
135 | + 'ERR_PASSWORD_MISMATCH' => 'The passwords provided for the SuiteCRM admin user do not match. Please re-enter the same passwords in the password fields.', |
|
136 | + 'ERR_PERFORM_CONFIG_PHP_1' => 'Cannot write to the <span class=stop>config.php</span> file.', |
|
137 | + 'ERR_PERFORM_CONFIG_PHP_2' => 'You can continue this installation by manually creating the config.php file and pasting the configuration information below into the config.php file. However, you <strong>must </strong>create the config.php file before you continue to the next step.', |
|
138 | + 'ERR_PERFORM_CONFIG_PHP_3' => 'Did you remember to create the config.php file?', |
|
139 | + 'ERR_PERFORM_CONFIG_PHP_4' => 'Warning: Could not write to config.php file. Please ensure it exists.', |
|
140 | + 'ERR_PERFORM_HTACCESS_1' => 'Cannot write to the ', |
|
141 | + 'ERR_PERFORM_HTACCESS_2' => ' file.', |
|
142 | + 'ERR_PERFORM_HTACCESS_3' => 'If you want to secure your log file from being accessible via browser, create an .htaccess file in your log directory with the line:', |
|
143 | + 'ERR_PERFORM_NO_TCPIP' => '<b>We could not detect an Internet connection.</b> When you do have a connection, please visit <a href="http://www.suitecrm.com/">http://www.suitecrm.com/</a> to register with SuiteCRM. By letting us know a little bit about how your company plans to use SuiteCRM, we can ensure we are always delivering the right application for your business needs.', |
|
144 | + 'ERR_SESSION_DIRECTORY_NOT_EXISTS' => 'Session directory provided is not a valid directory.', |
|
145 | + 'ERR_SESSION_DIRECTORY' => 'Session directory provided is not a writable directory.', |
|
146 | + 'ERR_SESSION_PATH' => 'Session path is required if you wish to specify your own.', |
|
147 | + 'ERR_SI_NO_CONFIG' => 'You did not include config_si.php in the document root, or you did not define $sugar_config_si in config.php', |
|
148 | + 'ERR_SITE_GUID' => 'Application ID is required if you wish to specify your own.', |
|
149 | 149 | 'ERROR_SPRITE_SUPPORT' => "Currently we are not able to locate the GD library, as a result you will not be able to use the CSS Sprite functionality.", |
150 | - 'ERR_UPLOAD_MAX_FILESIZE' => 'Warning: Your PHP configuration should be changed to allow files of at least 6MB to be uploaded.', |
|
150 | + 'ERR_UPLOAD_MAX_FILESIZE' => 'Warning: Your PHP configuration should be changed to allow files of at least 6MB to be uploaded.', |
|
151 | 151 | 'LBL_UPLOAD_MAX_FILESIZE_TITLE' => 'Upload File Size', |
152 | - 'ERR_URL_BLANK' => 'Provide the base URL for the SuiteCRM instance.', |
|
153 | - 'ERR_UW_NO_UPDATE_RECORD' => 'Could not locate installation record of', |
|
154 | - 'ERROR_FLAVOR_INCOMPATIBLE' => 'The uploaded file is not compatible with this flavor (Community Edition, Professional, or Enterprise) of SuiteCRM: ', |
|
155 | - 'ERROR_LICENSE_EXPIRED' => "Error: Your license expired ", |
|
156 | - 'ERROR_LICENSE_EXPIRED2' => " day(s) ago. Please go to the <a href='index.php?action=LicenseSettings&module=Administration'>'\"License Management\"</a> in the Admin screen to enter your new license key. If you do not enter a new license key within 30 days of your license key expiration, you will no longer be able to log in to this application.", |
|
157 | - 'ERROR_MANIFEST_TYPE' => 'Manifest file must specify the package type.', |
|
158 | - 'ERROR_PACKAGE_TYPE' => 'Manifest file specifies an unrecognized package type', |
|
159 | - 'ERROR_VALIDATION_EXPIRED' => "Error: Your validation key expired ", |
|
160 | - 'ERROR_VALIDATION_EXPIRED2' => " day(s) ago. Please go to the <a href='index.php?action=LicenseSettings&module=Administration'>'\"License Management\"</a> in the Admin screen to enter your new validation key. If you do not enter a new validation key within 30 days of your validation key expiration, you will no longer be able to log in to this application.", |
|
161 | - 'ERROR_VERSION_INCOMPATIBLE' => 'The uploaded file is not compatible with this version of SuiteCRM: ', |
|
162 | - |
|
163 | - 'LBL_BACK' => 'Back', |
|
152 | + 'ERR_URL_BLANK' => 'Provide the base URL for the SuiteCRM instance.', |
|
153 | + 'ERR_UW_NO_UPDATE_RECORD' => 'Could not locate installation record of', |
|
154 | + 'ERROR_FLAVOR_INCOMPATIBLE' => 'The uploaded file is not compatible with this flavor (Community Edition, Professional, or Enterprise) of SuiteCRM: ', |
|
155 | + 'ERROR_LICENSE_EXPIRED' => "Error: Your license expired ", |
|
156 | + 'ERROR_LICENSE_EXPIRED2' => " day(s) ago. Please go to the <a href='index.php?action=LicenseSettings&module=Administration'>'\"License Management\"</a> in the Admin screen to enter your new license key. If you do not enter a new license key within 30 days of your license key expiration, you will no longer be able to log in to this application.", |
|
157 | + 'ERROR_MANIFEST_TYPE' => 'Manifest file must specify the package type.', |
|
158 | + 'ERROR_PACKAGE_TYPE' => 'Manifest file specifies an unrecognized package type', |
|
159 | + 'ERROR_VALIDATION_EXPIRED' => "Error: Your validation key expired ", |
|
160 | + 'ERROR_VALIDATION_EXPIRED2' => " day(s) ago. Please go to the <a href='index.php?action=LicenseSettings&module=Administration'>'\"License Management\"</a> in the Admin screen to enter your new validation key. If you do not enter a new validation key within 30 days of your validation key expiration, you will no longer be able to log in to this application.", |
|
161 | + 'ERROR_VERSION_INCOMPATIBLE' => 'The uploaded file is not compatible with this version of SuiteCRM: ', |
|
162 | + |
|
163 | + 'LBL_BACK' => 'Back', |
|
164 | 164 | 'LBL_CANCEL' => 'Cancel', |
165 | 165 | 'LBL_ACCEPT' => 'I Accept', |
166 | - 'LBL_CHECKSYS_1' => 'In order for your SuiteCRM installation to function properly, please ensure all of the system check items listed below are green. If any are red, please take the necessary steps to fix them.<BR><BR> For help on these system checks, please visit the <a href="http://www.suitecrm.com" target="_blank">SuiteCRM</a>.', |
|
167 | - 'LBL_CHECKSYS_CACHE' => 'Writable Cache Sub-Directories', |
|
166 | + 'LBL_CHECKSYS_1' => 'In order for your SuiteCRM installation to function properly, please ensure all of the system check items listed below are green. If any are red, please take the necessary steps to fix them.<BR><BR> For help on these system checks, please visit the <a href="http://www.suitecrm.com" target="_blank">SuiteCRM</a>.', |
|
167 | + 'LBL_CHECKSYS_CACHE' => 'Writable Cache Sub-Directories', |
|
168 | 168 | 'LBL_DROP_DB_CONFIRM' => 'The provided Database Name already exists.<br>You can either:<br>1. Click on the Cancel button and choose a new database name, or <br>2. Click the Accept button and continue. All existing tables in the database will be dropped. <strong>This means that all of the tables and pre-existing data will be blown away.</strong>', |
169 | - 'LBL_CHECKSYS_CALL_TIME' => 'PHP Allow Call Time Pass Reference Turned Off', |
|
169 | + 'LBL_CHECKSYS_CALL_TIME' => 'PHP Allow Call Time Pass Reference Turned Off', |
|
170 | 170 | 'LBL_CHECKSYS_COMPONENT' => 'Component', |
171 | - 'LBL_CHECKSYS_COMPONENT_OPTIONAL' => 'Optional Components', |
|
172 | - 'LBL_CHECKSYS_CONFIG' => 'Writable SuiteCRM Configuration File (config.php)', |
|
173 | - 'LBL_CHECKSYS_CONFIG_OVERRIDE' => 'Writable SuiteCRM Configuration File (config_override.php)', |
|
174 | - 'LBL_CHECKSYS_CURL' => 'cURL Module', |
|
171 | + 'LBL_CHECKSYS_COMPONENT_OPTIONAL' => 'Optional Components', |
|
172 | + 'LBL_CHECKSYS_CONFIG' => 'Writable SuiteCRM Configuration File (config.php)', |
|
173 | + 'LBL_CHECKSYS_CONFIG_OVERRIDE' => 'Writable SuiteCRM Configuration File (config_override.php)', |
|
174 | + 'LBL_CHECKSYS_CURL' => 'cURL Module', |
|
175 | 175 | 'LBL_CHECKSYS_SESSION_SAVE_PATH' => 'Session Save Path Setting', |
176 | - 'LBL_CHECKSYS_CUSTOM' => 'Writeable Custom Directory', |
|
177 | - 'LBL_CHECKSYS_DATA' => 'Writable Data Sub-Directories', |
|
178 | - 'LBL_CHECKSYS_IMAP' => 'IMAP Module', |
|
179 | - 'LBL_CHECKSYS_FASTCGI' => 'FastCGI', |
|
180 | - 'LBL_CHECKSYS_MQGPC' => 'Magic Quotes GPC', |
|
181 | - 'LBL_CHECKSYS_MBSTRING' => 'MB Strings Module', |
|
182 | - 'LBL_CHECKSYS_MEM_OK' => 'OK (No Limit)', |
|
183 | - 'LBL_CHECKSYS_MEM_UNLIMITED' => 'OK (Unlimited)', |
|
184 | - 'LBL_CHECKSYS_MEM' => 'PHP Memory Limit', |
|
185 | - 'LBL_CHECKSYS_MODULE' => 'Writable Modules Sub-Directories and Files', |
|
186 | - 'LBL_CHECKSYS_MYSQL_VERSION' => 'MySQL Version', |
|
187 | - 'LBL_CHECKSYS_NOT_AVAILABLE' => 'Not Available', |
|
188 | - 'LBL_CHECKSYS_OK' => 'OK', |
|
189 | - 'LBL_CHECKSYS_PHP_INI' => 'Location of your PHP configuration file (php.ini):', |
|
190 | - 'LBL_CHECKSYS_PHP_OK' => 'OK (ver ', |
|
191 | - 'LBL_CHECKSYS_PHPVER' => 'PHP Version', |
|
176 | + 'LBL_CHECKSYS_CUSTOM' => 'Writeable Custom Directory', |
|
177 | + 'LBL_CHECKSYS_DATA' => 'Writable Data Sub-Directories', |
|
178 | + 'LBL_CHECKSYS_IMAP' => 'IMAP Module', |
|
179 | + 'LBL_CHECKSYS_FASTCGI' => 'FastCGI', |
|
180 | + 'LBL_CHECKSYS_MQGPC' => 'Magic Quotes GPC', |
|
181 | + 'LBL_CHECKSYS_MBSTRING' => 'MB Strings Module', |
|
182 | + 'LBL_CHECKSYS_MEM_OK' => 'OK (No Limit)', |
|
183 | + 'LBL_CHECKSYS_MEM_UNLIMITED' => 'OK (Unlimited)', |
|
184 | + 'LBL_CHECKSYS_MEM' => 'PHP Memory Limit', |
|
185 | + 'LBL_CHECKSYS_MODULE' => 'Writable Modules Sub-Directories and Files', |
|
186 | + 'LBL_CHECKSYS_MYSQL_VERSION' => 'MySQL Version', |
|
187 | + 'LBL_CHECKSYS_NOT_AVAILABLE' => 'Not Available', |
|
188 | + 'LBL_CHECKSYS_OK' => 'OK', |
|
189 | + 'LBL_CHECKSYS_PHP_INI' => 'Location of your PHP configuration file (php.ini):', |
|
190 | + 'LBL_CHECKSYS_PHP_OK' => 'OK (ver ', |
|
191 | + 'LBL_CHECKSYS_PHPVER' => 'PHP Version', |
|
192 | 192 | 'LBL_CHECKSYS_IISVER' => 'IIS Version', |
193 | - 'LBL_CHECKSYS_RECHECK' => 'Re-check', |
|
194 | - 'LBL_CHECKSYS_SAFE_MODE' => 'PHP Safe Mode Turned Off', |
|
195 | - 'LBL_CHECKSYS_SESSION' => 'Writable Session Save Path (', |
|
196 | - 'LBL_CHECKSYS_STATUS' => 'Status', |
|
197 | - 'LBL_CHECKSYS_TITLE' => 'System Check Acceptance', |
|
198 | - 'LBL_CHECKSYS_VER' => 'Found: ( ver ', |
|
199 | - 'LBL_CHECKSYS_XML' => 'XML Parsing', |
|
200 | - 'LBL_CHECKSYS_ZLIB' => 'ZLIB Compression Module', |
|
201 | - 'LBL_CHECKSYS_ZIP' => 'ZIP Handling Module', |
|
202 | - 'LBL_CHECKSYS_PCRE' => 'PCRE Library', |
|
203 | - 'LBL_CHECKSYS_FIX_FILES' => 'Please fix the following files or directories before proceeding:', |
|
193 | + 'LBL_CHECKSYS_RECHECK' => 'Re-check', |
|
194 | + 'LBL_CHECKSYS_SAFE_MODE' => 'PHP Safe Mode Turned Off', |
|
195 | + 'LBL_CHECKSYS_SESSION' => 'Writable Session Save Path (', |
|
196 | + 'LBL_CHECKSYS_STATUS' => 'Status', |
|
197 | + 'LBL_CHECKSYS_TITLE' => 'System Check Acceptance', |
|
198 | + 'LBL_CHECKSYS_VER' => 'Found: ( ver ', |
|
199 | + 'LBL_CHECKSYS_XML' => 'XML Parsing', |
|
200 | + 'LBL_CHECKSYS_ZLIB' => 'ZLIB Compression Module', |
|
201 | + 'LBL_CHECKSYS_ZIP' => 'ZIP Handling Module', |
|
202 | + 'LBL_CHECKSYS_PCRE' => 'PCRE Library', |
|
203 | + 'LBL_CHECKSYS_FIX_FILES' => 'Please fix the following files or directories before proceeding:', |
|
204 | 204 | 'LBL_CHECKSYS_FIX_MODULE_FILES' => 'Please fix the following module directories and the files under them before proceeding:', |
205 | 205 | 'LBL_CHECKSYS_UPLOAD' => 'Writable Upload Directory', |
206 | 206 | 'LBL_CLOSE' => 'Close', |
207 | 207 | 'LBL_THREE' => '3', |
208 | - 'LBL_CONFIRM_BE_CREATED' => 'be created', |
|
209 | - 'LBL_CONFIRM_DB_TYPE' => 'Database Type', |
|
210 | - 'LBL_CONFIRM_DIRECTIONS' => 'Please confirm the settings below. If you would like to change any of the values, click "Back" to edit. Otherwise, click "Next" to start the installation.', |
|
211 | - 'LBL_CONFIRM_LICENSE_TITLE' => 'License Information', |
|
212 | - 'LBL_CONFIRM_NOT' => 'not', |
|
213 | - 'LBL_CONFIRM_TITLE' => 'Confirm Settings', |
|
214 | - 'LBL_CONFIRM_WILL' => 'will', |
|
215 | - 'LBL_DBCONF_CREATE_DB' => 'Create Database', |
|
216 | - 'LBL_DBCONF_CREATE_USER' => 'Create User', |
|
217 | - 'LBL_DBCONF_DB_DROP_CREATE_WARN' => 'Caution: All SuiteCRM data will be erased<br>if this box is checked.', |
|
218 | - 'LBL_DBCONF_DB_DROP_CREATE' => 'Drop and Recreate Existing SuiteCRM tables?', |
|
208 | + 'LBL_CONFIRM_BE_CREATED' => 'be created', |
|
209 | + 'LBL_CONFIRM_DB_TYPE' => 'Database Type', |
|
210 | + 'LBL_CONFIRM_DIRECTIONS' => 'Please confirm the settings below. If you would like to change any of the values, click "Back" to edit. Otherwise, click "Next" to start the installation.', |
|
211 | + 'LBL_CONFIRM_LICENSE_TITLE' => 'License Information', |
|
212 | + 'LBL_CONFIRM_NOT' => 'not', |
|
213 | + 'LBL_CONFIRM_TITLE' => 'Confirm Settings', |
|
214 | + 'LBL_CONFIRM_WILL' => 'will', |
|
215 | + 'LBL_DBCONF_CREATE_DB' => 'Create Database', |
|
216 | + 'LBL_DBCONF_CREATE_USER' => 'Create User', |
|
217 | + 'LBL_DBCONF_DB_DROP_CREATE_WARN' => 'Caution: All SuiteCRM data will be erased<br>if this box is checked.', |
|
218 | + 'LBL_DBCONF_DB_DROP_CREATE' => 'Drop and Recreate Existing SuiteCRM tables?', |
|
219 | 219 | 'LBL_DBCONF_DB_DROP' => 'Drop Tables', |
220 | 220 | 'LBL_DBCONF_DB_NAME' => 'Database Name', |
221 | - 'LBL_DBCONF_DB_PASSWORD' => 'SuiteCRM Database User Password', |
|
222 | - 'LBL_DBCONF_DB_PASSWORD2' => 'Re-enter SuiteCRM Database User Password', |
|
223 | - 'LBL_DBCONF_DB_USER' => 'SuiteCRM Database User', |
|
221 | + 'LBL_DBCONF_DB_PASSWORD' => 'SuiteCRM Database User Password', |
|
222 | + 'LBL_DBCONF_DB_PASSWORD2' => 'Re-enter SuiteCRM Database User Password', |
|
223 | + 'LBL_DBCONF_DB_USER' => 'SuiteCRM Database User', |
|
224 | 224 | 'LBL_DBCONF_SUGAR_DB_USER' => 'SuiteCRM Database User', |
225 | 225 | 'LBL_DBCONF_DB_ADMIN_USER' => 'Database Administrator Username', |
226 | 226 | 'LBL_DBCONF_DB_ADMIN_PASSWORD' => 'Database Admin Password', |
227 | - 'LBL_DBCONF_DEMO_DATA' => 'Populate Database with Demo Data?', |
|
227 | + 'LBL_DBCONF_DEMO_DATA' => 'Populate Database with Demo Data?', |
|
228 | 228 | 'LBL_DBCONF_DEMO_DATA_TITLE' => 'Choose Demo Data', |
229 | - 'LBL_DBCONF_HOST_NAME' => 'Host Name', |
|
230 | - 'LBL_DBCONF_HOST_INSTANCE' => 'Host Instance', |
|
231 | - 'LBL_DBCONF_HOST_PORT' => 'Port', |
|
232 | - 'LBL_DBCONF_INSTRUCTIONS' => 'Please enter your database configuration information below. If you are unsure of what to fill in, we suggest that you use the default values.', |
|
233 | - 'LBL_DBCONF_MB_DEMO_DATA' => 'Use multi-byte text in demo data?', |
|
229 | + 'LBL_DBCONF_HOST_NAME' => 'Host Name', |
|
230 | + 'LBL_DBCONF_HOST_INSTANCE' => 'Host Instance', |
|
231 | + 'LBL_DBCONF_HOST_PORT' => 'Port', |
|
232 | + 'LBL_DBCONF_INSTRUCTIONS' => 'Please enter your database configuration information below. If you are unsure of what to fill in, we suggest that you use the default values.', |
|
233 | + 'LBL_DBCONF_MB_DEMO_DATA' => 'Use multi-byte text in demo data?', |
|
234 | 234 | 'LBL_DBCONFIG_MSG2' => 'Name of web server or machine (host) on which the database is located ( such as localhost or www.mydomain.com ):', |
235 | - 'LBL_DBCONFIG_MSG2_LABEL' => 'Host Name', |
|
235 | + 'LBL_DBCONFIG_MSG2_LABEL' => 'Host Name', |
|
236 | 236 | 'LBL_DBCONFIG_MSG3' => 'Name of the database that will contain the data for the SuiteCRM instance you are about to install:', |
237 | - 'LBL_DBCONFIG_MSG3_LABEL' => 'Database Name', |
|
237 | + 'LBL_DBCONFIG_MSG3_LABEL' => 'Database Name', |
|
238 | 238 | 'LBL_DBCONFIG_B_MSG1' => 'The username and password of a database administrator who can create database tables and users and who can write to the database is necessary in order to set up the SuiteCRM database.', |
239 | - 'LBL_DBCONFIG_B_MSG1_LABEL' => '', |
|
239 | + 'LBL_DBCONFIG_B_MSG1_LABEL' => '', |
|
240 | 240 | 'LBL_DBCONFIG_SECURITY' => 'For security purposes, you can specify an exclusive database user to connect to the SuiteCRM database. This user must be able to write, update and retrieve data on the SuiteCRM database that will be created for this instance. This user can be the database administrator specified above, or you can provide new or existing database user information.', |
241 | 241 | 'LBL_DBCONFIG_AUTO_DD' => 'Do it for me', |
242 | 242 | 'LBL_DBCONFIG_PROVIDE_DD' => 'Provide existing user', |
243 | 243 | 'LBL_DBCONFIG_CREATE_DD' => 'Define user to create', |
244 | 244 | 'LBL_DBCONFIG_SAME_DD' => 'Same as Admin User', |
245 | - //'LBL_DBCONF_I18NFIX' => 'Apply database column expansion for varchar and char types (up to 255) for multi-byte data?', |
|
245 | + //'LBL_DBCONF_I18NFIX' => 'Apply database column expansion for varchar and char types (up to 255) for multi-byte data?', |
|
246 | 246 | 'LBL_FTS' => 'Full Text Search', |
247 | 247 | 'LBL_FTS_INSTALLED' => 'Installed', |
248 | 248 | 'LBL_FTS_INSTALLED_ERR1' => 'Full Text Search capability is not installed.', |
249 | 249 | 'LBL_FTS_INSTALLED_ERR2' => 'You can still install but will not be able to use Full Text Search functionality. Please refer to your database server install guide on how to do this, or contact your Administrator.', |
250 | - 'LBL_DBCONF_PRIV_PASS' => 'Privileged Database User Password', |
|
251 | - 'LBL_DBCONF_PRIV_USER_2' => 'Database Account Above Is a Privileged User?', |
|
252 | - 'LBL_DBCONF_PRIV_USER_DIRECTIONS' => 'This privileged database user must have the proper permissions to create a database, drop/create tables, and create a user. This privileged database user will only be used to perform these tasks as needed during the installation process. You may also use the same database user as above if that user has sufficient privileges.', |
|
253 | - 'LBL_DBCONF_PRIV_USER' => 'Privileged Database User Name', |
|
254 | - 'LBL_DBCONF_TITLE' => 'Database Configuration', |
|
250 | + 'LBL_DBCONF_PRIV_PASS' => 'Privileged Database User Password', |
|
251 | + 'LBL_DBCONF_PRIV_USER_2' => 'Database Account Above Is a Privileged User?', |
|
252 | + 'LBL_DBCONF_PRIV_USER_DIRECTIONS' => 'This privileged database user must have the proper permissions to create a database, drop/create tables, and create a user. This privileged database user will only be used to perform these tasks as needed during the installation process. You may also use the same database user as above if that user has sufficient privileges.', |
|
253 | + 'LBL_DBCONF_PRIV_USER' => 'Privileged Database User Name', |
|
254 | + 'LBL_DBCONF_TITLE' => 'Database Configuration', |
|
255 | 255 | 'LBL_DBCONF_TITLE_NAME' => 'Provide Database Name', |
256 | 256 | 'LBL_DBCONF_TITLE_USER_INFO' => 'Provide Database User Information', |
257 | - 'LBL_DBCONF_TITLE_USER_INFO_LABEL' => 'User', |
|
258 | - 'LBL_DBCONF_TITLE_PSWD_INFO_LABEL' => 'Password', |
|
259 | - 'LBL_DISABLED_DESCRIPTION_2' => 'After this change has been made, you may click the "Start" button below to begin your installation. <i>After the installation is complete, you will want to change the value for \'installer_locked\' to \'true\'.</i>', |
|
260 | - 'LBL_DISABLED_DESCRIPTION' => 'The installer has already been run once. As a safety measure, it has been disabled from running a second time. If you are absolutely sure you want to run it again, please go to your config.php file and locate (or add) a variable called \'installer_locked\' and set it to \'false\'. The line should look like this:', |
|
261 | - 'LBL_DISABLED_HELP_1' => 'For installation help, please visit the SuiteCRM', |
|
257 | + 'LBL_DBCONF_TITLE_USER_INFO_LABEL' => 'User', |
|
258 | + 'LBL_DBCONF_TITLE_PSWD_INFO_LABEL' => 'Password', |
|
259 | + 'LBL_DISABLED_DESCRIPTION_2' => 'After this change has been made, you may click the "Start" button below to begin your installation. <i>After the installation is complete, you will want to change the value for \'installer_locked\' to \'true\'.</i>', |
|
260 | + 'LBL_DISABLED_DESCRIPTION' => 'The installer has already been run once. As a safety measure, it has been disabled from running a second time. If you are absolutely sure you want to run it again, please go to your config.php file and locate (or add) a variable called \'installer_locked\' and set it to \'false\'. The line should look like this:', |
|
261 | + 'LBL_DISABLED_HELP_1' => 'For installation help, please visit the SuiteCRM', |
|
262 | 262 | 'LBL_DISABLED_HELP_LNK' => 'http://www.suitecrm.com/forum/index', |
263 | - 'LBL_DISABLED_HELP_2' => 'support forums', |
|
264 | - 'LBL_DISABLED_TITLE_2' => 'SuiteCRM Installation has been Disabled', |
|
265 | - 'LBL_DISABLED_TITLE' => 'SuiteCRM Installation Disabled', |
|
266 | - 'LBL_EMAIL_CHARSET_DESC' => 'Character Set most commonly used in your locale', |
|
267 | - 'LBL_EMAIL_CHARSET_TITLE' => 'Outbound Email Settings', |
|
263 | + 'LBL_DISABLED_HELP_2' => 'support forums', |
|
264 | + 'LBL_DISABLED_TITLE_2' => 'SuiteCRM Installation has been Disabled', |
|
265 | + 'LBL_DISABLED_TITLE' => 'SuiteCRM Installation Disabled', |
|
266 | + 'LBL_EMAIL_CHARSET_DESC' => 'Character Set most commonly used in your locale', |
|
267 | + 'LBL_EMAIL_CHARSET_TITLE' => 'Outbound Email Settings', |
|
268 | 268 | 'LBL_EMAIL_CHARSET_CONF' => 'Character Set for Outbound Email ', |
269 | - 'LBL_HELP' => 'Help', |
|
269 | + 'LBL_HELP' => 'Help', |
|
270 | 270 | 'LBL_INSTALL' => 'Install', |
271 | 271 | 'LBL_INSTALL_TYPE_TITLE' => 'Installation Options', |
272 | 272 | 'LBL_INSTALL_TYPE_SUBTITLE' => 'Choose Install Type', |
@@ -275,157 +275,157 @@ discard block |
||
275 | 275 | 'LBL_INSTALL_TYPE_MSG1' => 'The key is required for general application functionality, but it is not required for installation. You do not need to enter the key at this time, but you will need to provide the key after you have installed the application.', |
276 | 276 | 'LBL_INSTALL_TYPE_MSG2' => 'Requires minimum information for the installation. Recommended for new users.', |
277 | 277 | 'LBL_INSTALL_TYPE_MSG3' => 'Provides additional options to set during the installation. Most of these options are also available after installation in the admin screens. Recommended for advanced users.', |
278 | - 'LBL_LANG_1' => 'To use a language in SuiteCRM other than the default language (US-English), you can upload and install the language pack at this time. You will be able to upload and install language packs from within the SuiteCRM application as well. If you would like to skip this step, click Next.', |
|
279 | - 'LBL_LANG_BUTTON_COMMIT' => 'Install', |
|
280 | - 'LBL_LANG_BUTTON_REMOVE' => 'Remove', |
|
281 | - 'LBL_LANG_BUTTON_UNINSTALL' => 'Uninstall', |
|
282 | - 'LBL_LANG_BUTTON_UPLOAD' => 'Upload', |
|
283 | - 'LBL_LANG_NO_PACKS' => 'none', |
|
284 | - 'LBL_LANG_PACK_INSTALLED' => 'The following language packs have been installed: ', |
|
285 | - 'LBL_LANG_PACK_READY' => 'The following language packs are ready to be installed: ', |
|
286 | - 'LBL_LANG_SUCCESS' => 'The language pack was successfully uploaded.', |
|
287 | - 'LBL_LANG_TITLE' => 'Language Pack', |
|
278 | + 'LBL_LANG_1' => 'To use a language in SuiteCRM other than the default language (US-English), you can upload and install the language pack at this time. You will be able to upload and install language packs from within the SuiteCRM application as well. If you would like to skip this step, click Next.', |
|
279 | + 'LBL_LANG_BUTTON_COMMIT' => 'Install', |
|
280 | + 'LBL_LANG_BUTTON_REMOVE' => 'Remove', |
|
281 | + 'LBL_LANG_BUTTON_UNINSTALL' => 'Uninstall', |
|
282 | + 'LBL_LANG_BUTTON_UPLOAD' => 'Upload', |
|
283 | + 'LBL_LANG_NO_PACKS' => 'none', |
|
284 | + 'LBL_LANG_PACK_INSTALLED' => 'The following language packs have been installed: ', |
|
285 | + 'LBL_LANG_PACK_READY' => 'The following language packs are ready to be installed: ', |
|
286 | + 'LBL_LANG_SUCCESS' => 'The language pack was successfully uploaded.', |
|
287 | + 'LBL_LANG_TITLE' => 'Language Pack', |
|
288 | 288 | 'LBL_LAUNCHING_SILENT_INSTALL' => 'Installing SuiteCRM now. This may take up to a few minutes.', |
289 | - 'LBL_LANG_UPLOAD' => 'Upload a Language Pack', |
|
290 | - 'LBL_LICENSE_ACCEPTANCE' => 'License Acceptance', |
|
289 | + 'LBL_LANG_UPLOAD' => 'Upload a Language Pack', |
|
290 | + 'LBL_LICENSE_ACCEPTANCE' => 'License Acceptance', |
|
291 | 291 | 'LBL_LICENSE_CHECKING' => 'Checking system for compatibility.', |
292 | 292 | 'LBL_LICENSE_CHKENV_HEADER' => 'Checking Environment', |
293 | 293 | 'LBL_LICENSE_CHKDB_HEADER' => 'Verifying DB Credentials.', |
294 | 294 | 'LBL_LICENSE_CHECK_PASSED' => 'System passed check for compatibility.', |
295 | - 'LBL_CREATE_CACHE' => 'Preparing to Install...', |
|
295 | + 'LBL_CREATE_CACHE' => 'Preparing to Install...', |
|
296 | 296 | 'LBL_LICENSE_REDIRECT' => 'Redirecting in ', |
297 | - 'LBL_LICENSE_DIRECTIONS' => 'If you have your license information, please enter it in the fields below.', |
|
298 | - 'LBL_LICENSE_DOWNLOAD_KEY' => 'Enter Download Key', |
|
299 | - 'LBL_LICENSE_EXPIRY' => 'Expiration Date', |
|
300 | - 'LBL_LICENSE_I_ACCEPT' => 'I Accept', |
|
301 | - 'LBL_LICENSE_NUM_USERS' => 'Number of Users', |
|
302 | - 'LBL_LICENSE_OC_DIRECTIONS' => 'Please enter the number of purchased offline clients.', |
|
303 | - 'LBL_LICENSE_OC_NUM' => 'Number of Offline Client Licenses', |
|
304 | - 'LBL_LICENSE_OC' => 'Offline Client Licenses', |
|
305 | - 'LBL_LICENSE_PRINTABLE' => ' Printable View ', |
|
297 | + 'LBL_LICENSE_DIRECTIONS' => 'If you have your license information, please enter it in the fields below.', |
|
298 | + 'LBL_LICENSE_DOWNLOAD_KEY' => 'Enter Download Key', |
|
299 | + 'LBL_LICENSE_EXPIRY' => 'Expiration Date', |
|
300 | + 'LBL_LICENSE_I_ACCEPT' => 'I Accept', |
|
301 | + 'LBL_LICENSE_NUM_USERS' => 'Number of Users', |
|
302 | + 'LBL_LICENSE_OC_DIRECTIONS' => 'Please enter the number of purchased offline clients.', |
|
303 | + 'LBL_LICENSE_OC_NUM' => 'Number of Offline Client Licenses', |
|
304 | + 'LBL_LICENSE_OC' => 'Offline Client Licenses', |
|
305 | + 'LBL_LICENSE_PRINTABLE' => ' Printable View ', |
|
306 | 306 | 'LBL_PRINT_SUMM' => 'Print Summary', |
307 | - 'LBL_LICENSE_TITLE_2' => 'SuiteCRM License', |
|
308 | - 'LBL_LICENSE_TITLE' => 'License Information', |
|
309 | - 'LBL_LICENSE_USERS' => 'Licensed Users', |
|
310 | - |
|
311 | - 'LBL_LOCALE_CURRENCY' => 'Currency Settings', |
|
312 | - 'LBL_LOCALE_CURR_DEFAULT' => 'Default Currency', |
|
313 | - 'LBL_LOCALE_CURR_SYMBOL' => 'Currency Symbol', |
|
314 | - 'LBL_LOCALE_CURR_ISO' => 'Currency Code (ISO 4217)', |
|
315 | - 'LBL_LOCALE_CURR_1000S' => '1000s Separator', |
|
316 | - 'LBL_LOCALE_CURR_DECIMAL' => 'Decimal Separator', |
|
317 | - 'LBL_LOCALE_CURR_EXAMPLE' => 'Example', |
|
318 | - 'LBL_LOCALE_CURR_SIG_DIGITS' => 'Significant Digits', |
|
319 | - 'LBL_LOCALE_DATEF' => 'Default Date Format', |
|
320 | - 'LBL_LOCALE_DESC' => 'The specified locale settings will be reflected globally within the SuiteCRM instance.', |
|
321 | - 'LBL_LOCALE_EXPORT' => 'Character Set for Import/Export<br> <i>(Email, .csv, vCard, PDF, data import)</i>', |
|
322 | - 'LBL_LOCALE_EXPORT_DELIMITER' => 'Export (.csv) Delimiter', |
|
323 | - 'LBL_LOCALE_EXPORT_TITLE' => 'Import/Export Settings', |
|
324 | - 'LBL_LOCALE_LANG' => 'Default Language', |
|
325 | - 'LBL_LOCALE_NAMEF' => 'Default Name Format', |
|
326 | - 'LBL_LOCALE_NAMEF_DESC' => 's = salutation<br />f = first name<br />l = last name', |
|
327 | - 'LBL_LOCALE_NAME_FIRST' => 'David', |
|
328 | - 'LBL_LOCALE_NAME_LAST' => 'Livingstone', |
|
329 | - 'LBL_LOCALE_NAME_SALUTATION' => 'Dr.', |
|
330 | - 'LBL_LOCALE_TIMEF' => 'Default Time Format', |
|
307 | + 'LBL_LICENSE_TITLE_2' => 'SuiteCRM License', |
|
308 | + 'LBL_LICENSE_TITLE' => 'License Information', |
|
309 | + 'LBL_LICENSE_USERS' => 'Licensed Users', |
|
310 | + |
|
311 | + 'LBL_LOCALE_CURRENCY' => 'Currency Settings', |
|
312 | + 'LBL_LOCALE_CURR_DEFAULT' => 'Default Currency', |
|
313 | + 'LBL_LOCALE_CURR_SYMBOL' => 'Currency Symbol', |
|
314 | + 'LBL_LOCALE_CURR_ISO' => 'Currency Code (ISO 4217)', |
|
315 | + 'LBL_LOCALE_CURR_1000S' => '1000s Separator', |
|
316 | + 'LBL_LOCALE_CURR_DECIMAL' => 'Decimal Separator', |
|
317 | + 'LBL_LOCALE_CURR_EXAMPLE' => 'Example', |
|
318 | + 'LBL_LOCALE_CURR_SIG_DIGITS' => 'Significant Digits', |
|
319 | + 'LBL_LOCALE_DATEF' => 'Default Date Format', |
|
320 | + 'LBL_LOCALE_DESC' => 'The specified locale settings will be reflected globally within the SuiteCRM instance.', |
|
321 | + 'LBL_LOCALE_EXPORT' => 'Character Set for Import/Export<br> <i>(Email, .csv, vCard, PDF, data import)</i>', |
|
322 | + 'LBL_LOCALE_EXPORT_DELIMITER' => 'Export (.csv) Delimiter', |
|
323 | + 'LBL_LOCALE_EXPORT_TITLE' => 'Import/Export Settings', |
|
324 | + 'LBL_LOCALE_LANG' => 'Default Language', |
|
325 | + 'LBL_LOCALE_NAMEF' => 'Default Name Format', |
|
326 | + 'LBL_LOCALE_NAMEF_DESC' => 's = salutation<br />f = first name<br />l = last name', |
|
327 | + 'LBL_LOCALE_NAME_FIRST' => 'David', |
|
328 | + 'LBL_LOCALE_NAME_LAST' => 'Livingstone', |
|
329 | + 'LBL_LOCALE_NAME_SALUTATION' => 'Dr.', |
|
330 | + 'LBL_LOCALE_TIMEF' => 'Default Time Format', |
|
331 | 331 | 'LBL_CUSTOMIZE_LOCALE' => 'Customize Locale Settings', |
332 | - 'LBL_LOCALE_UI' => 'User Interface', |
|
333 | - |
|
334 | - 'LBL_ML_ACTION' => 'Action', |
|
335 | - 'LBL_ML_DESCRIPTION' => 'Description', |
|
336 | - 'LBL_ML_INSTALLED' => 'Date Installed', |
|
337 | - 'LBL_ML_NAME' => 'Name', |
|
338 | - 'LBL_ML_PUBLISHED' => 'Date Published', |
|
339 | - 'LBL_ML_TYPE' => 'Type', |
|
340 | - 'LBL_ML_UNINSTALLABLE' => 'Uninstallable', |
|
341 | - 'LBL_ML_VERSION' => 'Version', |
|
342 | - 'LBL_MSSQL' => 'SQL Server', |
|
343 | - 'LBL_MSSQL2' => 'SQL Server (FreeTDS)', |
|
344 | - 'LBL_MSSQL_SQLSRV' => 'SQL Server (Microsoft SQL Server Driver for PHP)', |
|
345 | - 'LBL_MYSQL' => 'MySQL', |
|
332 | + 'LBL_LOCALE_UI' => 'User Interface', |
|
333 | + |
|
334 | + 'LBL_ML_ACTION' => 'Action', |
|
335 | + 'LBL_ML_DESCRIPTION' => 'Description', |
|
336 | + 'LBL_ML_INSTALLED' => 'Date Installed', |
|
337 | + 'LBL_ML_NAME' => 'Name', |
|
338 | + 'LBL_ML_PUBLISHED' => 'Date Published', |
|
339 | + 'LBL_ML_TYPE' => 'Type', |
|
340 | + 'LBL_ML_UNINSTALLABLE' => 'Uninstallable', |
|
341 | + 'LBL_ML_VERSION' => 'Version', |
|
342 | + 'LBL_MSSQL' => 'SQL Server', |
|
343 | + 'LBL_MSSQL2' => 'SQL Server (FreeTDS)', |
|
344 | + 'LBL_MSSQL_SQLSRV' => 'SQL Server (Microsoft SQL Server Driver for PHP)', |
|
345 | + 'LBL_MYSQL' => 'MySQL', |
|
346 | 346 | 'LBL_MYSQLI' => 'MySQL (mysqli extension)', |
347 | - 'LBL_IBM_DB2' => 'IBM DB2', |
|
348 | - 'LBL_NEXT' => 'Next', |
|
349 | - 'LBL_NO' => 'No', |
|
347 | + 'LBL_IBM_DB2' => 'IBM DB2', |
|
348 | + 'LBL_NEXT' => 'Next', |
|
349 | + 'LBL_NO' => 'No', |
|
350 | 350 | 'LBL_ORACLE' => 'Oracle', |
351 | - 'LBL_PERFORM_ADMIN_PASSWORD' => 'Setting site admin password', |
|
352 | - 'LBL_PERFORM_AUDIT_TABLE' => 'audit table / ', |
|
353 | - 'LBL_PERFORM_CONFIG_PHP' => 'Creating SuiteCRM configuration file', |
|
354 | - 'LBL_PERFORM_CREATE_DB_1' => '<b>Creating the database</b> ', |
|
355 | - 'LBL_PERFORM_CREATE_DB_2' => ' <b>on</b> ', |
|
356 | - 'LBL_PERFORM_CREATE_DB_USER' => 'Creating the Database username and password...', |
|
357 | - 'LBL_PERFORM_CREATE_DEFAULT' => 'Creating default SuiteCRM data', |
|
358 | - 'LBL_PERFORM_CREATE_LOCALHOST' => 'Creating the Database username and password for localhost...', |
|
359 | - 'LBL_PERFORM_CREATE_RELATIONSHIPS' => 'Creating SuiteCRM relationship tables', |
|
360 | - 'LBL_PERFORM_CREATING' => 'creating / ', |
|
361 | - 'LBL_PERFORM_DEFAULT_REPORTS' => 'Creating default reports', |
|
362 | - 'LBL_PERFORM_DEFAULT_SCHEDULER' => 'Creating default scheduler jobs', |
|
363 | - 'LBL_PERFORM_DEFAULT_SETTINGS' => 'Inserting default settings', |
|
364 | - 'LBL_PERFORM_DEFAULT_USERS' => 'Creating default users', |
|
365 | - 'LBL_PERFORM_DEMO_DATA' => 'Populating the database tables with demo data (this may take a little while)', |
|
366 | - 'LBL_PERFORM_DONE' => 'done<br>', |
|
367 | - 'LBL_PERFORM_DROPPING' => 'dropping / ', |
|
368 | - 'LBL_PERFORM_FINISH' => 'Finish', |
|
369 | - 'LBL_PERFORM_LICENSE_SETTINGS' => 'Updating license information', |
|
370 | - 'LBL_PERFORM_OUTRO_1' => 'The setup of SuiteCRM ', |
|
371 | - 'LBL_PERFORM_OUTRO_2' => ' is now complete!', |
|
372 | - 'LBL_PERFORM_OUTRO_3' => 'Total time: ', |
|
373 | - 'LBL_PERFORM_OUTRO_4' => ' seconds.', |
|
374 | - 'LBL_PERFORM_OUTRO_5' => 'Approximate memory used: ', |
|
375 | - 'LBL_PERFORM_OUTRO_6' => ' bytes.', |
|
376 | - 'LBL_PERFORM_OUTRO_7' => 'Your system is now installed and configured for use.', |
|
377 | - 'LBL_PERFORM_REL_META' => 'relationship meta ... ', |
|
378 | - 'LBL_PERFORM_SUCCESS' => 'Success!', |
|
379 | - 'LBL_PERFORM_TABLES' => 'Creating SuiteCRM application tables, audit tables and relationship metadata', |
|
380 | - 'LBL_PERFORM_TITLE' => 'Perform Setup', |
|
381 | - 'LBL_PRINT' => 'Print', |
|
382 | - 'LBL_REG_CONF_1' => 'Please complete the short form below to receive product announcements, training news, special offers and special event invitations from SuiteCRM. We do not sell, rent, share or otherwise distribute the information collected here to third parties.', |
|
383 | - 'LBL_REG_CONF_2' => 'Your name and email address are the only required fields for registration. All other fields are optional, but very helpful. We do not sell, rent, share, or otherwise distribute the information collected here to third parties.', |
|
384 | - 'LBL_REG_CONF_3' => 'Thank you for registering. Click on the Finish button to login to SuiteCRM. You will need to log in for the first time using the username "admin" and the password you entered in step 2.', |
|
385 | - 'LBL_REG_TITLE' => 'Registration', |
|
351 | + 'LBL_PERFORM_ADMIN_PASSWORD' => 'Setting site admin password', |
|
352 | + 'LBL_PERFORM_AUDIT_TABLE' => 'audit table / ', |
|
353 | + 'LBL_PERFORM_CONFIG_PHP' => 'Creating SuiteCRM configuration file', |
|
354 | + 'LBL_PERFORM_CREATE_DB_1' => '<b>Creating the database</b> ', |
|
355 | + 'LBL_PERFORM_CREATE_DB_2' => ' <b>on</b> ', |
|
356 | + 'LBL_PERFORM_CREATE_DB_USER' => 'Creating the Database username and password...', |
|
357 | + 'LBL_PERFORM_CREATE_DEFAULT' => 'Creating default SuiteCRM data', |
|
358 | + 'LBL_PERFORM_CREATE_LOCALHOST' => 'Creating the Database username and password for localhost...', |
|
359 | + 'LBL_PERFORM_CREATE_RELATIONSHIPS' => 'Creating SuiteCRM relationship tables', |
|
360 | + 'LBL_PERFORM_CREATING' => 'creating / ', |
|
361 | + 'LBL_PERFORM_DEFAULT_REPORTS' => 'Creating default reports', |
|
362 | + 'LBL_PERFORM_DEFAULT_SCHEDULER' => 'Creating default scheduler jobs', |
|
363 | + 'LBL_PERFORM_DEFAULT_SETTINGS' => 'Inserting default settings', |
|
364 | + 'LBL_PERFORM_DEFAULT_USERS' => 'Creating default users', |
|
365 | + 'LBL_PERFORM_DEMO_DATA' => 'Populating the database tables with demo data (this may take a little while)', |
|
366 | + 'LBL_PERFORM_DONE' => 'done<br>', |
|
367 | + 'LBL_PERFORM_DROPPING' => 'dropping / ', |
|
368 | + 'LBL_PERFORM_FINISH' => 'Finish', |
|
369 | + 'LBL_PERFORM_LICENSE_SETTINGS' => 'Updating license information', |
|
370 | + 'LBL_PERFORM_OUTRO_1' => 'The setup of SuiteCRM ', |
|
371 | + 'LBL_PERFORM_OUTRO_2' => ' is now complete!', |
|
372 | + 'LBL_PERFORM_OUTRO_3' => 'Total time: ', |
|
373 | + 'LBL_PERFORM_OUTRO_4' => ' seconds.', |
|
374 | + 'LBL_PERFORM_OUTRO_5' => 'Approximate memory used: ', |
|
375 | + 'LBL_PERFORM_OUTRO_6' => ' bytes.', |
|
376 | + 'LBL_PERFORM_OUTRO_7' => 'Your system is now installed and configured for use.', |
|
377 | + 'LBL_PERFORM_REL_META' => 'relationship meta ... ', |
|
378 | + 'LBL_PERFORM_SUCCESS' => 'Success!', |
|
379 | + 'LBL_PERFORM_TABLES' => 'Creating SuiteCRM application tables, audit tables and relationship metadata', |
|
380 | + 'LBL_PERFORM_TITLE' => 'Perform Setup', |
|
381 | + 'LBL_PRINT' => 'Print', |
|
382 | + 'LBL_REG_CONF_1' => 'Please complete the short form below to receive product announcements, training news, special offers and special event invitations from SuiteCRM. We do not sell, rent, share or otherwise distribute the information collected here to third parties.', |
|
383 | + 'LBL_REG_CONF_2' => 'Your name and email address are the only required fields for registration. All other fields are optional, but very helpful. We do not sell, rent, share, or otherwise distribute the information collected here to third parties.', |
|
384 | + 'LBL_REG_CONF_3' => 'Thank you for registering. Click on the Finish button to login to SuiteCRM. You will need to log in for the first time using the username "admin" and the password you entered in step 2.', |
|
385 | + 'LBL_REG_TITLE' => 'Registration', |
|
386 | 386 | 'LBL_REG_NO_THANKS' => 'No Thanks', |
387 | 387 | 'LBL_REG_SKIP_THIS_STEP' => 'Skip this Step', |
388 | - 'LBL_REQUIRED' => '* Required field', |
|
388 | + 'LBL_REQUIRED' => '* Required field', |
|
389 | 389 | |
390 | 390 | 'LBL_SITECFG_ADMIN_Name' => 'SuiteCRM Application Admin Name', |
391 | - 'LBL_SITECFG_ADMIN_PASS_2' => 'Re-enter SuiteCRM Admin User Password', |
|
392 | - 'LBL_SITECFG_ADMIN_PASS_WARN' => 'Caution: This will override the admin password of any previous installation.', |
|
393 | - 'LBL_SITECFG_ADMIN_PASS' => 'SuiteCRM Admin User Password', |
|
394 | - 'LBL_SITECFG_APP_ID' => 'Application ID', |
|
395 | - 'LBL_SITECFG_CUSTOM_ID_DIRECTIONS' => 'If selected, you must provide an application ID to override the auto-generated ID. The ID ensures that sessions of one SuiteCRM instance are not used by other instances. If you have a cluster of SuiteCRM installations, they all must share the same application ID.', |
|
396 | - 'LBL_SITECFG_CUSTOM_ID' => 'Provide Your Own Application ID', |
|
397 | - 'LBL_SITECFG_CUSTOM_LOG_DIRECTIONS' => 'If selected, you must specify a log directory to override the default directory for the SuiteCRM log. Regardless of where the log file is located, access to it through a web browser will be restricted via an .htaccess redirect.', |
|
398 | - 'LBL_SITECFG_CUSTOM_LOG' => 'Use a Custom Log Directory', |
|
399 | - 'LBL_SITECFG_CUSTOM_SESSION_DIRECTIONS' => 'If selected, you must provide a secure folder for storing SuiteCRM session information. This can be done to prevent session data from being vulnerable on shared servers.', |
|
400 | - 'LBL_SITECFG_CUSTOM_SESSION' => 'Use a Custom Session Directory for SuiteCRM', |
|
401 | - 'LBL_SITECFG_DIRECTIONS' => 'Please enter your site configuration information below. If you are unsure of the fields, we suggest that you use the default values.', |
|
402 | - 'LBL_SITECFG_FIX_ERRORS' => '<b>Please fix the following errors before proceeding:</b>', |
|
403 | - 'LBL_SITECFG_LOG_DIR' => 'Log Directory', |
|
404 | - 'LBL_SITECFG_SESSION_PATH' => 'Path to Session Directory<br>(must be writable)', |
|
405 | - 'LBL_SITECFG_SITE_SECURITY' => 'Select Security Options', |
|
406 | - 'LBL_SITECFG_SUGAR_UP_DIRECTIONS' => 'If selected, the system will periodically check for updated versions of the application.', |
|
407 | - 'LBL_SITECFG_SUGAR_UP' => 'Automatically Check For Updates?', |
|
408 | - 'LBL_SITECFG_SUGAR_UPDATES' => 'SuiteCRM Updates Config', |
|
409 | - 'LBL_SITECFG_TITLE' => 'Site Configuration', |
|
391 | + 'LBL_SITECFG_ADMIN_PASS_2' => 'Re-enter SuiteCRM Admin User Password', |
|
392 | + 'LBL_SITECFG_ADMIN_PASS_WARN' => 'Caution: This will override the admin password of any previous installation.', |
|
393 | + 'LBL_SITECFG_ADMIN_PASS' => 'SuiteCRM Admin User Password', |
|
394 | + 'LBL_SITECFG_APP_ID' => 'Application ID', |
|
395 | + 'LBL_SITECFG_CUSTOM_ID_DIRECTIONS' => 'If selected, you must provide an application ID to override the auto-generated ID. The ID ensures that sessions of one SuiteCRM instance are not used by other instances. If you have a cluster of SuiteCRM installations, they all must share the same application ID.', |
|
396 | + 'LBL_SITECFG_CUSTOM_ID' => 'Provide Your Own Application ID', |
|
397 | + 'LBL_SITECFG_CUSTOM_LOG_DIRECTIONS' => 'If selected, you must specify a log directory to override the default directory for the SuiteCRM log. Regardless of where the log file is located, access to it through a web browser will be restricted via an .htaccess redirect.', |
|
398 | + 'LBL_SITECFG_CUSTOM_LOG' => 'Use a Custom Log Directory', |
|
399 | + 'LBL_SITECFG_CUSTOM_SESSION_DIRECTIONS' => 'If selected, you must provide a secure folder for storing SuiteCRM session information. This can be done to prevent session data from being vulnerable on shared servers.', |
|
400 | + 'LBL_SITECFG_CUSTOM_SESSION' => 'Use a Custom Session Directory for SuiteCRM', |
|
401 | + 'LBL_SITECFG_DIRECTIONS' => 'Please enter your site configuration information below. If you are unsure of the fields, we suggest that you use the default values.', |
|
402 | + 'LBL_SITECFG_FIX_ERRORS' => '<b>Please fix the following errors before proceeding:</b>', |
|
403 | + 'LBL_SITECFG_LOG_DIR' => 'Log Directory', |
|
404 | + 'LBL_SITECFG_SESSION_PATH' => 'Path to Session Directory<br>(must be writable)', |
|
405 | + 'LBL_SITECFG_SITE_SECURITY' => 'Select Security Options', |
|
406 | + 'LBL_SITECFG_SUGAR_UP_DIRECTIONS' => 'If selected, the system will periodically check for updated versions of the application.', |
|
407 | + 'LBL_SITECFG_SUGAR_UP' => 'Automatically Check For Updates?', |
|
408 | + 'LBL_SITECFG_SUGAR_UPDATES' => 'SuiteCRM Updates Config', |
|
409 | + 'LBL_SITECFG_TITLE' => 'Site Configuration', |
|
410 | 410 | 'LBL_SITECFG_TITLE2' => 'Identify Administration User', |
411 | 411 | 'LBL_SITECFG_SECURITY_TITLE' => 'Site Security', |
412 | - 'LBL_SITECFG_URL' => 'URL of SuiteCRM Instance', |
|
413 | - 'LBL_SITECFG_USE_DEFAULTS' => 'Use Defaults?', |
|
414 | - 'LBL_SITECFG_ANONSTATS' => 'Send Anonymous Usage Statistics?', |
|
415 | - 'LBL_SITECFG_ANONSTATS_DIRECTIONS' => 'If selected, SuiteCRM will send <b>anonymous</b> statistics about your installation to SuiteCRM Inc. every time your system checks for new versions. This information will help us better understand how the application is used and guide improvements to the product.', |
|
412 | + 'LBL_SITECFG_URL' => 'URL of SuiteCRM Instance', |
|
413 | + 'LBL_SITECFG_USE_DEFAULTS' => 'Use Defaults?', |
|
414 | + 'LBL_SITECFG_ANONSTATS' => 'Send Anonymous Usage Statistics?', |
|
415 | + 'LBL_SITECFG_ANONSTATS_DIRECTIONS' => 'If selected, SuiteCRM will send <b>anonymous</b> statistics about your installation to SuiteCRM Inc. every time your system checks for new versions. This information will help us better understand how the application is used and guide improvements to the product.', |
|
416 | 416 | 'LBL_SITECFG_URL_MSG' => 'Enter the URL that will be used to access the SuiteCRM instance after installation. The URL will also be used as a base for the URLs in the SuiteCRM application pages. The URL should include the web server or machine name or IP address.', |
417 | 417 | 'LBL_SITECFG_SYS_NAME_MSG' => 'Enter a name for your system. This name will be displayed in the browser title bar when users visit the SuiteCRM application.', |
418 | 418 | 'LBL_SITECFG_PASSWORD_MSG' => 'After installation, you will need to use the SuiteCRM admin user (default username = admin) to log in to the SuiteCRM instance. Enter a password for this administrator user. This password can be changed after the initial login. You may also enter another admin username to use besides the default value provided.', |
419 | 419 | 'LBL_SITECFG_COLLATION_MSG' => 'Select collation (sorting) settings for your system. This settings will create the tables with the specific language you use. In case your language doesn\'t require special settings please use default value.', |
420 | 420 | 'LBL_SPRITE_SUPPORT' => 'Sprite Support', |
421 | - 'LBL_SYSTEM_CREDS' => 'System Credentials', |
|
421 | + 'LBL_SYSTEM_CREDS' => 'System Credentials', |
|
422 | 422 | 'LBL_SYSTEM_ENV' => 'System Environment', |
423 | - 'LBL_START' => 'Start', |
|
423 | + 'LBL_START' => 'Start', |
|
424 | 424 | 'LBL_SHOW_PASS' => 'Show Passwords', |
425 | 425 | 'LBL_HIDE_PASS' => 'Hide Passwords', |
426 | 426 | 'LBL_HIDDEN' => '<i>(hidden)</i>', |
427 | - 'LBL_STEP1' => 'Step 1 of 2 - Pre-Installation requirements', |
|
428 | - 'LBL_STEP2' => 'Step 2 of 2 - Configuration', |
|
427 | + 'LBL_STEP1' => 'Step 1 of 2 - Pre-Installation requirements', |
|
428 | + 'LBL_STEP2' => 'Step 2 of 2 - Configuration', |
|
429 | 429 | // 'LBL_STEP1' => 'Step 1 of 8 - Pre-Installation requirements', |
430 | 430 | // 'LBL_STEP2' => 'Step 2 of 8 - License Agreement', |
431 | 431 | // 'LBL_STEP3' => 'Step 3 of 8 - Installation Type', |
@@ -435,11 +435,11 @@ discard block |
||
435 | 435 | // 'LBL_STEP7' => 'Step 7 of 8 - Confirm Settings', |
436 | 436 | // 'LBL_STEP8' => 'Step 8 of 8 - Installation Successful', |
437 | 437 | // 'LBL_NO_THANKS' => 'Continue to installer', |
438 | - 'LBL_CHOOSE_LANG' => '<b>Choose your language</b>', |
|
439 | - 'LBL_STEP' => 'Step', |
|
440 | - 'LBL_TITLE_WELCOME' => 'Welcome to the SuiteCRM ', |
|
441 | - 'LBL_WELCOME_1' => 'This installer creates the SuiteCRM database tables and sets the configuration variables that you need to start. The entire process should take about ten minutes.', |
|
442 | - 'LBL_WELCOME_2' => 'For installation documentation, please visit the <a href="http://www.SuiteCRM.com/" target="_blank">SuiteCRM</a>. <BR><BR> You can also find help from the SuiteCRM Community in the <a href="http://www.SuiteCRM.com/" target="_blank">SuiteCRM Forums</a>.', |
|
438 | + 'LBL_CHOOSE_LANG' => '<b>Choose your language</b>', |
|
439 | + 'LBL_STEP' => 'Step', |
|
440 | + 'LBL_TITLE_WELCOME' => 'Welcome to the SuiteCRM ', |
|
441 | + 'LBL_WELCOME_1' => 'This installer creates the SuiteCRM database tables and sets the configuration variables that you need to start. The entire process should take about ten minutes.', |
|
442 | + 'LBL_WELCOME_2' => 'For installation documentation, please visit the <a href="http://www.SuiteCRM.com/" target="_blank">SuiteCRM</a>. <BR><BR> You can also find help from the SuiteCRM Community in the <a href="http://www.SuiteCRM.com/" target="_blank">SuiteCRM Forums</a>.', |
|
443 | 443 | //welcome page variables |
444 | 444 | 'LBL_TITLE_ARE_YOU_READY' => 'Are you ready to install?', |
445 | 445 | 'REQUIRED_SYS_COMP' => 'Required System Components', |
@@ -522,20 +522,20 @@ discard block |
||
522 | 522 | ', |
523 | 523 | 'LBL_WELCOME_PLEASE_READ_BELOW' => 'Please read the following important information before proceeding with the installation. The information will help you determine whether or not you are ready to install the application at this time.', |
524 | 524 | |
525 | - 'LBL_WELCOME_CHOOSE_LANGUAGE' => '<b>Choose your language</b>', |
|
526 | - 'LBL_WELCOME_SETUP_WIZARD' => 'Setup Wizard', |
|
527 | - 'LBL_WELCOME_TITLE_WELCOME' => 'Welcome to the SuiteCRM ', |
|
528 | - 'LBL_WELCOME_TITLE' => 'SuiteCRM Setup Wizard', |
|
529 | - 'LBL_WIZARD_TITLE' => 'SuiteCRM Setup Wizard: ', |
|
530 | - 'LBL_YES' => 'Yes', |
|
525 | + 'LBL_WELCOME_CHOOSE_LANGUAGE' => '<b>Choose your language</b>', |
|
526 | + 'LBL_WELCOME_SETUP_WIZARD' => 'Setup Wizard', |
|
527 | + 'LBL_WELCOME_TITLE_WELCOME' => 'Welcome to the SuiteCRM ', |
|
528 | + 'LBL_WELCOME_TITLE' => 'SuiteCRM Setup Wizard', |
|
529 | + 'LBL_WIZARD_TITLE' => 'SuiteCRM Setup Wizard: ', |
|
530 | + 'LBL_YES' => 'Yes', |
|
531 | 531 | 'LBL_YES_MULTI' => 'Yes - Multibyte', |
532 | - // OOTB Scheduler Job Names: |
|
533 | - 'LBL_OOTB_WORKFLOW' => 'Process Workflow Tasks', |
|
534 | - 'LBL_OOTB_REPORTS' => 'Run Report Generation Scheduled Tasks', |
|
535 | - 'LBL_OOTB_IE' => 'Check Inbound Mailboxes', |
|
536 | - 'LBL_OOTB_BOUNCE' => 'Run Nightly Process Bounced Campaign Emails', |
|
532 | + // OOTB Scheduler Job Names: |
|
533 | + 'LBL_OOTB_WORKFLOW' => 'Process Workflow Tasks', |
|
534 | + 'LBL_OOTB_REPORTS' => 'Run Report Generation Scheduled Tasks', |
|
535 | + 'LBL_OOTB_IE' => 'Check Inbound Mailboxes', |
|
536 | + 'LBL_OOTB_BOUNCE' => 'Run Nightly Process Bounced Campaign Emails', |
|
537 | 537 | 'LBL_OOTB_CAMPAIGN' => 'Run Nightly Mass Email Campaigns', |
538 | - 'LBL_OOTB_PRUNE' => 'Prune Database on 1st of Month', |
|
538 | + 'LBL_OOTB_PRUNE' => 'Prune Database on 1st of Month', |
|
539 | 539 | 'LBL_OOTB_TRACKER' => 'Prune tracker tables', |
540 | 540 | 'LBL_OOTB_SUGARFEEDS' => 'Prune SuiteCRM Feed Tables', |
541 | 541 | 'LBL_OOTB_SEND_EMAIL_REMINDERS' => 'Run Email Reminder Notifications', |
@@ -549,19 +549,19 @@ discard block |
||
549 | 549 | 'LBL_PATCH_1' => 'If you would like to skip this step, click Next.', |
550 | 550 | 'LBL_PATCH_TITLE' => 'System Patch', |
551 | 551 | 'LBL_PATCH_READY' => 'The following patch(es) are ready to be installed:', |
552 | - 'LBL_SESSION_ERR_DESCRIPTION' => "SuiteCRM relies upon PHP sessions to store important information while connected to this web server. Your PHP installation does not have the Session information correctly configured. |
|
552 | + 'LBL_SESSION_ERR_DESCRIPTION' => "SuiteCRM relies upon PHP sessions to store important information while connected to this web server. Your PHP installation does not have the Session information correctly configured. |
|
553 | 553 | <br><br>A common misconfiguration is that the <b>'session.save_path'</b> directive is not pointing to a valid directory. <br> |
554 | 554 | <br> Please correct your <a target=_new href='http://us2.php.net/manual/en/ref.session.php'>PHP configuration</a> in the php.ini file located here below.", |
555 | - 'LBL_SESSION_ERR_TITLE' => 'PHP Sessions Configuration Error', |
|
556 | - 'LBL_SYSTEM_NAME'=>'System Name', |
|
555 | + 'LBL_SESSION_ERR_TITLE' => 'PHP Sessions Configuration Error', |
|
556 | + 'LBL_SYSTEM_NAME'=>'System Name', |
|
557 | 557 | 'LBL_COLLATION' => 'Collation Settings', |
558 | - 'LBL_REQUIRED_SYSTEM_NAME'=>'Provide a System Name for the SuiteCRM instance.', |
|
559 | - 'LBL_PATCH_UPLOAD' => 'Select a patch file from your local computer', |
|
560 | - 'LBL_INCOMPATIBLE_PHP_VERSION' => 'Php version 5 or above is required.', |
|
561 | - 'LBL_MINIMUM_PHP_VERSION' => 'Minimum Php version required is 5.1.0. Recommended Php version is 5.2.x.', |
|
562 | - 'LBL_YOUR_PHP_VERSION' => '(Your current php version is ', |
|
563 | - 'LBL_RECOMMENDED_PHP_VERSION' =>' Recommended php version is 5.2.x)', |
|
564 | - 'LBL_BACKWARD_COMPATIBILITY_ON' => 'Php Backward Compatibility mode is turned on. Set zend.ze1_compatibility_mode to Off for proceeding further', |
|
558 | + 'LBL_REQUIRED_SYSTEM_NAME'=>'Provide a System Name for the SuiteCRM instance.', |
|
559 | + 'LBL_PATCH_UPLOAD' => 'Select a patch file from your local computer', |
|
560 | + 'LBL_INCOMPATIBLE_PHP_VERSION' => 'Php version 5 or above is required.', |
|
561 | + 'LBL_MINIMUM_PHP_VERSION' => 'Minimum Php version required is 5.1.0. Recommended Php version is 5.2.x.', |
|
562 | + 'LBL_YOUR_PHP_VERSION' => '(Your current php version is ', |
|
563 | + 'LBL_RECOMMENDED_PHP_VERSION' =>' Recommended php version is 5.2.x)', |
|
564 | + 'LBL_BACKWARD_COMPATIBILITY_ON' => 'Php Backward Compatibility mode is turned on. Set zend.ze1_compatibility_mode to Off for proceeding further', |
|
565 | 565 | 'LBL_STREAM' => 'PHP allows to use stream', |
566 | 566 | |
567 | 567 | 'advanced_password_new_account_email' => array( |
@@ -593,92 +593,92 @@ discard block |
||
593 | 593 | 'name' => 'Forgot Password email', |
594 | 594 | ), |
595 | 595 | |
596 | - // SMTP settings |
|
597 | - |
|
598 | - 'LBL_WIZARD_SMTP_DESC' => 'Provide the email account that will be used to send emails, such as the assignment notifications and new user passwords. Users will receive emails from SuiteCRM, as sent from the specified email account.', |
|
599 | - 'LBL_CHOOSE_EMAIL_PROVIDER' => 'Choose your Email provider:', |
|
600 | - |
|
601 | - 'LBL_SMTPTYPE_GMAIL' => 'Gmail', |
|
602 | - 'LBL_SMTPTYPE_YAHOO' => 'Yahoo! Mail', |
|
603 | - 'LBL_SMTPTYPE_EXCHANGE' => 'Microsoft Exchange', |
|
604 | - 'LBL_SMTPTYPE_OTHER' => 'Other', |
|
605 | - 'LBL_MAIL_SMTP_SETTINGS' => 'SMTP Server Specification', |
|
606 | - 'LBL_MAIL_SMTPSERVER' => 'SMTP Server:', |
|
607 | - 'LBL_MAIL_SMTPPORT' => 'SMTP Port:', |
|
608 | - 'LBL_MAIL_SMTPAUTH_REQ' => 'Use SMTP Authentication?', |
|
609 | - 'LBL_EMAIL_SMTP_SSL_OR_TLS' => 'Enable SMTP over SSL or TLS?', |
|
610 | - 'LBL_GMAIL_SMTPUSER' => 'Gmail Email Address:', |
|
611 | - 'LBL_GMAIL_SMTPPASS' => 'Gmail Password:', |
|
612 | - 'LBL_ALLOW_DEFAULT_SELECTION' => 'Allow users to use this account for outgoing email:', |
|
613 | - 'LBL_ALLOW_DEFAULT_SELECTION_HELP' => 'When this option is selected, all users will be able to send emails using the same outgoing mail account used to send system notifications and alerts. If the option is not selected, users can still use the outgoing mail server after providing their own account information.', |
|
614 | - |
|
615 | - 'LBL_YAHOOMAIL_SMTPPASS' => 'Yahoo! Mail Password:', |
|
616 | - 'LBL_YAHOOMAIL_SMTPUSER' => 'Yahoo! Mail ID:', |
|
617 | - |
|
618 | - 'LBL_EXCHANGE_SMTPPASS' => 'Exchange Password:', |
|
619 | - 'LBL_EXCHANGE_SMTPUSER' => 'Exchange Username:', |
|
620 | - 'LBL_EXCHANGE_SMTPPORT' => 'Exchange Server Port:', |
|
621 | - 'LBL_EXCHANGE_SMTPSERVER' => 'Exchange Server:', |
|
622 | - |
|
623 | - |
|
624 | - 'LBL_MAIL_SMTPUSER' => 'SMTP Username:', |
|
625 | - 'LBL_MAIL_SMTPPASS' => 'SMTP Password:', |
|
626 | - |
|
627 | - // Branding |
|
628 | - |
|
629 | - 'LBL_WIZARD_SYSTEM_TITLE' => 'Branding', |
|
630 | - 'LBL_WIZARD_SYSTEM_DESC' => 'Provide your organization\'s name and logo in order to brand your SuiteCRM.', |
|
631 | - 'SYSTEM_NAME_WIZARD'=>'Name:', |
|
632 | - 'SYSTEM_NAME_HELP'=>'This is the name that displays in the title bar of your browser.', |
|
633 | - 'NEW_LOGO'=>'Select Logo:', |
|
634 | - 'NEW_LOGO_HELP'=>'The image file format can be either .png or .jpg. The maximum height is 170px, and the maximum width is 450px. Any image uploaded that is larger in any direction will be scaled to these max dimensions.', |
|
635 | - 'COMPANY_LOGO_UPLOAD_BTN' => 'Upload', |
|
636 | - 'CURRENT_LOGO'=>'Current Logo:', |
|
596 | + // SMTP settings |
|
597 | + |
|
598 | + 'LBL_WIZARD_SMTP_DESC' => 'Provide the email account that will be used to send emails, such as the assignment notifications and new user passwords. Users will receive emails from SuiteCRM, as sent from the specified email account.', |
|
599 | + 'LBL_CHOOSE_EMAIL_PROVIDER' => 'Choose your Email provider:', |
|
600 | + |
|
601 | + 'LBL_SMTPTYPE_GMAIL' => 'Gmail', |
|
602 | + 'LBL_SMTPTYPE_YAHOO' => 'Yahoo! Mail', |
|
603 | + 'LBL_SMTPTYPE_EXCHANGE' => 'Microsoft Exchange', |
|
604 | + 'LBL_SMTPTYPE_OTHER' => 'Other', |
|
605 | + 'LBL_MAIL_SMTP_SETTINGS' => 'SMTP Server Specification', |
|
606 | + 'LBL_MAIL_SMTPSERVER' => 'SMTP Server:', |
|
607 | + 'LBL_MAIL_SMTPPORT' => 'SMTP Port:', |
|
608 | + 'LBL_MAIL_SMTPAUTH_REQ' => 'Use SMTP Authentication?', |
|
609 | + 'LBL_EMAIL_SMTP_SSL_OR_TLS' => 'Enable SMTP over SSL or TLS?', |
|
610 | + 'LBL_GMAIL_SMTPUSER' => 'Gmail Email Address:', |
|
611 | + 'LBL_GMAIL_SMTPPASS' => 'Gmail Password:', |
|
612 | + 'LBL_ALLOW_DEFAULT_SELECTION' => 'Allow users to use this account for outgoing email:', |
|
613 | + 'LBL_ALLOW_DEFAULT_SELECTION_HELP' => 'When this option is selected, all users will be able to send emails using the same outgoing mail account used to send system notifications and alerts. If the option is not selected, users can still use the outgoing mail server after providing their own account information.', |
|
614 | + |
|
615 | + 'LBL_YAHOOMAIL_SMTPPASS' => 'Yahoo! Mail Password:', |
|
616 | + 'LBL_YAHOOMAIL_SMTPUSER' => 'Yahoo! Mail ID:', |
|
617 | + |
|
618 | + 'LBL_EXCHANGE_SMTPPASS' => 'Exchange Password:', |
|
619 | + 'LBL_EXCHANGE_SMTPUSER' => 'Exchange Username:', |
|
620 | + 'LBL_EXCHANGE_SMTPPORT' => 'Exchange Server Port:', |
|
621 | + 'LBL_EXCHANGE_SMTPSERVER' => 'Exchange Server:', |
|
622 | + |
|
623 | + |
|
624 | + 'LBL_MAIL_SMTPUSER' => 'SMTP Username:', |
|
625 | + 'LBL_MAIL_SMTPPASS' => 'SMTP Password:', |
|
626 | + |
|
627 | + // Branding |
|
628 | + |
|
629 | + 'LBL_WIZARD_SYSTEM_TITLE' => 'Branding', |
|
630 | + 'LBL_WIZARD_SYSTEM_DESC' => 'Provide your organization\'s name and logo in order to brand your SuiteCRM.', |
|
631 | + 'SYSTEM_NAME_WIZARD'=>'Name:', |
|
632 | + 'SYSTEM_NAME_HELP'=>'This is the name that displays in the title bar of your browser.', |
|
633 | + 'NEW_LOGO'=>'Select Logo:', |
|
634 | + 'NEW_LOGO_HELP'=>'The image file format can be either .png or .jpg. The maximum height is 170px, and the maximum width is 450px. Any image uploaded that is larger in any direction will be scaled to these max dimensions.', |
|
635 | + 'COMPANY_LOGO_UPLOAD_BTN' => 'Upload', |
|
636 | + 'CURRENT_LOGO'=>'Current Logo:', |
|
637 | 637 | 'CURRENT_LOGO_HELP'=>'This logo is displayed in the left-hand corner of the footer of the SuiteCRM application.', |
638 | 638 | |
639 | - // System Local Settings |
|
640 | - |
|
641 | - |
|
642 | - 'LBL_LOCALE_TITLE' => 'System Locale Settings', |
|
643 | - 'LBL_WIZARD_LOCALE_DESC' => 'Specify how you would like data in SuiteCRM to be displayed, based on your geographical location. The settings you provide here will be the default settings. Users will be able set their own preferences.', |
|
644 | - 'LBL_DATE_FORMAT' => 'Date Format:', |
|
645 | - 'LBL_TIME_FORMAT' => 'Time Format:', |
|
646 | - 'LBL_TIMEZONE' => 'Time Zone:', |
|
647 | - 'LBL_LANGUAGE'=>'Language:', |
|
648 | - 'LBL_CURRENCY'=>'Currency:', |
|
649 | - 'LBL_CURRENCY_SYMBOL'=>'Currency Symbol:', |
|
650 | - 'LBL_CURRENCY_ISO4217' => 'ISO 4217 Currency Code:', |
|
651 | - 'LBL_NUMBER_GROUPING_SEP' => '1000s separator:', |
|
652 | - 'LBL_DECIMAL_SEP' => 'Decimal symbol:', |
|
653 | - 'LBL_NAME_FORMAT' => 'Name Format:', |
|
654 | - 'UPLOAD_LOGO' => 'Please wait, logo uploading..', |
|
655 | - 'ERR_UPLOAD_FILETYPE' => 'File type do not allowed, please upload a jpeg or png.', |
|
656 | - 'ERR_LANG_UPLOAD_UNKNOWN' => 'Unknown file upload error occured.', |
|
657 | - 'ERR_UPLOAD_FILE_UPLOAD_ERR_INI_SIZE' => 'The uploaded file exceeds the upload_max_filesize directive in php.ini.', |
|
658 | - 'ERR_UPLOAD_FILE_UPLOAD_ERR_FORM_SIZE' => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.', |
|
659 | - 'ERR_UPLOAD_FILE_UPLOAD_ERR_PARTIAL' => 'The uploaded file was only partially uploaded.', |
|
660 | - 'ERR_UPLOAD_FILE_UPLOAD_ERR_NO_FILE' => 'No file was uploaded.', |
|
661 | - 'ERR_UPLOAD_FILE_UPLOAD_ERR_NO_TMP_DIR' => 'Missing a temporary folder.', |
|
662 | - 'ERR_UPLOAD_FILE_UPLOAD_ERR_CANT_WRITE' => 'Failed to write file to disk.', |
|
663 | - 'ERR_UPLOAD_FILE_UPLOAD_ERR_EXTENSION' => 'A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop.', |
|
664 | - |
|
665 | - 'LBL_INSTALL_PROCESS' => 'Install...', |
|
666 | - |
|
667 | - 'LBL_EMAIL_ADDRESS' => 'Email Address:', |
|
668 | - 'ERR_ADMIN_EMAIL' => 'Administrator Email Address is incorrect.', |
|
669 | - 'ERR_SITE_URL' => 'Site URL is required.', |
|
670 | - |
|
671 | - 'STAT_CONFIGURATION' => 'Configuration relationships...', |
|
672 | - 'STAT_CREATE_DB' => 'Create database...', |
|
673 | - //'STAT_CREATE_DB_TABLE' => 'Create database... (table: %s)', |
|
674 | - 'STAT_CREATE_DEFAULT_SETTINGS' => 'Create default settings...', |
|
675 | - 'STAT_INSTALL_FINISH' => 'Install finish...', |
|
676 | - 'STAT_INSTALL_FINISH_LOGIN' => 'Installation process finished, <a href="%s">please log in...</a>', |
|
677 | - 'LBL_LICENCE_TOOLTIP' => 'Please accept license first', |
|
678 | - |
|
679 | - 'LBL_MORE_OPTIONS_TITLE' => 'More options', |
|
680 | - 'LBL_START' => '', |
|
681 | - 'LBL_DB_CONN_ERR' => 'Database error' |
|
639 | + // System Local Settings |
|
640 | + |
|
641 | + |
|
642 | + 'LBL_LOCALE_TITLE' => 'System Locale Settings', |
|
643 | + 'LBL_WIZARD_LOCALE_DESC' => 'Specify how you would like data in SuiteCRM to be displayed, based on your geographical location. The settings you provide here will be the default settings. Users will be able set their own preferences.', |
|
644 | + 'LBL_DATE_FORMAT' => 'Date Format:', |
|
645 | + 'LBL_TIME_FORMAT' => 'Time Format:', |
|
646 | + 'LBL_TIMEZONE' => 'Time Zone:', |
|
647 | + 'LBL_LANGUAGE'=>'Language:', |
|
648 | + 'LBL_CURRENCY'=>'Currency:', |
|
649 | + 'LBL_CURRENCY_SYMBOL'=>'Currency Symbol:', |
|
650 | + 'LBL_CURRENCY_ISO4217' => 'ISO 4217 Currency Code:', |
|
651 | + 'LBL_NUMBER_GROUPING_SEP' => '1000s separator:', |
|
652 | + 'LBL_DECIMAL_SEP' => 'Decimal symbol:', |
|
653 | + 'LBL_NAME_FORMAT' => 'Name Format:', |
|
654 | + 'UPLOAD_LOGO' => 'Please wait, logo uploading..', |
|
655 | + 'ERR_UPLOAD_FILETYPE' => 'File type do not allowed, please upload a jpeg or png.', |
|
656 | + 'ERR_LANG_UPLOAD_UNKNOWN' => 'Unknown file upload error occured.', |
|
657 | + 'ERR_UPLOAD_FILE_UPLOAD_ERR_INI_SIZE' => 'The uploaded file exceeds the upload_max_filesize directive in php.ini.', |
|
658 | + 'ERR_UPLOAD_FILE_UPLOAD_ERR_FORM_SIZE' => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.', |
|
659 | + 'ERR_UPLOAD_FILE_UPLOAD_ERR_PARTIAL' => 'The uploaded file was only partially uploaded.', |
|
660 | + 'ERR_UPLOAD_FILE_UPLOAD_ERR_NO_FILE' => 'No file was uploaded.', |
|
661 | + 'ERR_UPLOAD_FILE_UPLOAD_ERR_NO_TMP_DIR' => 'Missing a temporary folder.', |
|
662 | + 'ERR_UPLOAD_FILE_UPLOAD_ERR_CANT_WRITE' => 'Failed to write file to disk.', |
|
663 | + 'ERR_UPLOAD_FILE_UPLOAD_ERR_EXTENSION' => 'A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop.', |
|
664 | + |
|
665 | + 'LBL_INSTALL_PROCESS' => 'Install...', |
|
666 | + |
|
667 | + 'LBL_EMAIL_ADDRESS' => 'Email Address:', |
|
668 | + 'ERR_ADMIN_EMAIL' => 'Administrator Email Address is incorrect.', |
|
669 | + 'ERR_SITE_URL' => 'Site URL is required.', |
|
670 | + |
|
671 | + 'STAT_CONFIGURATION' => 'Configuration relationships...', |
|
672 | + 'STAT_CREATE_DB' => 'Create database...', |
|
673 | + //'STAT_CREATE_DB_TABLE' => 'Create database... (table: %s)', |
|
674 | + 'STAT_CREATE_DEFAULT_SETTINGS' => 'Create default settings...', |
|
675 | + 'STAT_INSTALL_FINISH' => 'Install finish...', |
|
676 | + 'STAT_INSTALL_FINISH_LOGIN' => 'Installation process finished, <a href="%s">please log in...</a>', |
|
677 | + 'LBL_LICENCE_TOOLTIP' => 'Please accept license first', |
|
678 | + |
|
679 | + 'LBL_MORE_OPTIONS_TITLE' => 'More options', |
|
680 | + 'LBL_START' => '', |
|
681 | + 'LBL_DB_CONN_ERR' => 'Database error' |
|
682 | 682 | |
683 | 683 | |
684 | 684 | ); |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | } |
428 | 428 | |
429 | 429 | //if field is of type radio. |
430 | - if ($vardef['type'] == "radioenum" || $vardef['type'] == "enum" || $vardef['type'] == "dynamicenum") { |
|
430 | + if ($vardef['type'] == "radioenum" || $vardef['type'] == "enum" || $vardef['type'] == "dynamicenum") { |
|
431 | 431 | $value = $app_list_strings[$vardef['options']][$value]; |
432 | 432 | } |
433 | 433 | |
@@ -476,10 +476,10 @@ discard block |
||
476 | 476 | $value .= "</a>"; |
477 | 477 | } |
478 | 478 | } |
479 | - if($vardef['type'] == "url") |
|
480 | - { |
|
481 | - $value = '<a href='.$value.' target="_blank">'.$value.'</a>'; |
|
482 | - } |
|
479 | + if($vardef['type'] == "url") |
|
480 | + { |
|
481 | + $value = '<a href='.$value.' target="_blank">'.$value.'</a>'; |
|
482 | + } |
|
483 | 483 | |
484 | 484 | return $value; |
485 | 485 | } |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | |
43 | 43 | global $current_language, $app_strings, $app_list_strings, $current_user, $beanFiles, $beanList; |
44 | 44 | |
45 | - $bean = BeanFactory::getBean($module,$id); |
|
45 | + $bean = BeanFactory::getBean($module, $id); |
|
46 | 46 | |
47 | - if(!checkAccess($bean)){ |
|
47 | + if (!checkAccess($bean)) { |
|
48 | 48 | return false; |
49 | 49 | } |
50 | 50 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $mod_strings = return_module_language($current_language, $module); |
55 | 55 | |
56 | 56 | // set the filename for this control |
57 | - $file = create_cache_directory('include/InlineEditing/') . $module . $view . $alt_type . $fieldname . '.tpl'; |
|
57 | + $file = create_cache_directory('include/InlineEditing/').$module.$view.$alt_type.$fieldname.'.tpl'; |
|
58 | 58 | |
59 | 59 | if (!is_file($file) |
60 | 60 | || inDeveloperMode() |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | if ($vardef['type'] == 'link') { |
100 | 100 | $vardef['type'] = 'relate'; |
101 | 101 | $vardef['rname'] = 'name'; |
102 | - $vardef['id_name'] = $vardef['name'] . '_id'; |
|
102 | + $vardef['id_name'] = $vardef['name'].'_id'; |
|
103 | 103 | if ((!isset($vardef['module']) || $vardef['module'] == '') && $focus->load_relationship($vardef['name'])) { |
104 | 104 | $vardef['module'] = $focus->{$vardef['name']}->getRelatedModuleName(); |
105 | 105 | } |
@@ -135,15 +135,15 @@ discard block |
||
135 | 135 | // Remove all the copyright comments |
136 | 136 | $contents = preg_replace('/\{\*[^\}]*?\*\}/', '', $contents); |
137 | 137 | // remove extra wrong javascript which breaks auto complete on flexi relationship parent fields |
138 | - $contents = preg_replace("/<script language=\"javascript\">if\(typeof sqs_objects == \'undefined\'\){var sqs_objects = new Array;}sqs_objects\[\'EditView_parent_name\'\].*?<\/script>/","",$contents); |
|
138 | + $contents = preg_replace("/<script language=\"javascript\">if\(typeof sqs_objects == \'undefined\'\){var sqs_objects = new Array;}sqs_objects\[\'EditView_parent_name\'\].*?<\/script>/", "", $contents); |
|
139 | 139 | |
140 | 140 | |
141 | 141 | if ($view == 'EditView' && ($vardef['type'] == 'relate' || $vardef['type'] == 'parent')) { |
142 | 142 | |
143 | - $contents = str_replace('"' . $vardef['id_name'] . '"', '{/literal}"{$fields.' . $vardef['name'] . '.id_name}"{literal}', $contents); |
|
144 | - $contents = str_replace('"' . $vardef['name'] . '"', '{/literal}"{$fields.' . $vardef['name'] . '.name}"{literal}', $contents); |
|
143 | + $contents = str_replace('"'.$vardef['id_name'].'"', '{/literal}"{$fields.'.$vardef['name'].'.id_name}"{literal}', $contents); |
|
144 | + $contents = str_replace('"'.$vardef['name'].'"', '{/literal}"{$fields.'.$vardef['name'].'.name}"{literal}', $contents); |
|
145 | 145 | // regex below fixes button javascript for flexi relationship |
146 | - if($vardef['type'] == 'parent') { |
|
146 | + if ($vardef['type'] == 'parent') { |
|
147 | 147 | $contents = str_replace("onclick='open_popup(document.{\$form_name}.parent_type.value, 600, 400, \"\", true, false, {literal}{\"call_back_function\":\"set_return\",\"form_name\":\"EditView\",\"field_to_name_array\":{\"id\":{/literal}\"{\$fields.parent_name.id_name}", "onclick='open_popup(document.{\$form_name}.parent_type.value, 600, 400, \"\", true, false, {literal}{\"call_back_function\":\"set_return\",\"form_name\":\"EditView\",\"field_to_name_array\":{\"id\":{/literal}\"parent_id", $contents); |
148 | 148 | } |
149 | 149 | } |
@@ -177,10 +177,10 @@ discard block |
||
177 | 177 | } |
178 | 178 | $t23 = strpos($time_format, '23') !== false ? '%H' : '%I'; |
179 | 179 | if (!isset($match[2]) || $match[2] == '') { |
180 | - $ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . "%M"); |
|
180 | + $ss->assign('CALENDAR_FORMAT', $date_format.' '.$t23.$time_separator."%M"); |
|
181 | 181 | } else { |
182 | 182 | $pm = $match[2] == "pm" ? "%P" : "%p"; |
183 | - $ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . "%M" . $pm); |
|
183 | + $ss->assign('CALENDAR_FORMAT', $date_format.' '.$t23.$time_separator."%M".$pm); |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | $ss->assign('CALENDAR_FDOW', $current_user->get_first_day_of_week()); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | } |
220 | 220 | |
221 | 221 | if ($fieldlist[$fieldname]['type'] == 'link') { |
222 | - $fieldlist[$fieldname]['id_name'] = $fieldlist[$fieldname]['name'] . '_id'; |
|
222 | + $fieldlist[$fieldname]['id_name'] = $fieldlist[$fieldname]['name'].'_id'; |
|
223 | 223 | |
224 | 224 | if ((!isset($fieldlist[$fieldname]['module']) || $fieldlist[$fieldname]['module'] == '') && $focus->load_relationship($fieldlist[$fieldname]['name'])) { |
225 | 225 | $relateField = $fieldlist[$fieldname]['name']; |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | } |
228 | 228 | } |
229 | 229 | |
230 | - if($fieldlist[$fieldname]['type'] == 'parent'){ |
|
230 | + if ($fieldlist[$fieldname]['type'] == 'parent') { |
|
231 | 231 | $fieldlist['parent_id']['name'] = 'parent_id'; |
232 | 232 | } |
233 | 233 | |
@@ -238,15 +238,15 @@ discard block |
||
238 | 238 | } |
239 | 239 | |
240 | 240 | if (isset($fieldlist[$fieldname]['id_name']) && $fieldlist[$fieldname]['id_name'] != '' && $fieldlist[$fieldname]['id_name'] != $fieldlist[$fieldname]['name']) { |
241 | - if($value){ |
|
241 | + if ($value) { |
|
242 | 242 | $relateIdField = $fieldlist[$fieldname]['id_name']; |
243 | - $rel_value = $bean->$relateIdField; |
|
243 | + $rel_value = $bean->$relateIdField; |
|
244 | 244 | |
245 | 245 | } |
246 | 246 | $fieldlist[$fieldlist[$fieldname]['id_name']]['value'] = $rel_value; |
247 | 247 | $fieldlist[$fieldname]['value'] = $value; |
248 | 248 | $fieldlist[$fieldname]['id_name'] = $aow_field; |
249 | - $fieldlist[$fieldname]['name'] = $aow_field . '_display'; |
|
249 | + $fieldlist[$fieldname]['name'] = $aow_field.'_display'; |
|
250 | 250 | } else if (isset($fieldlist[$fieldname]['type']) && ($fieldlist[$fieldname]['type'] == 'datetimecombo' || $fieldlist[$fieldname]['type'] == 'datetime')) { |
251 | 251 | $value = $focus->convertField($value, $fieldlist[$fieldname]); |
252 | 252 | if (!$value) { |
@@ -310,14 +310,14 @@ discard block |
||
310 | 310 | |
311 | 311 | if ($bean->field_defs[$field]['type'] == "multienum") { |
312 | 312 | $bean->$field = encodeMultienumValue($value); |
313 | - }else if ($bean->field_defs[$field]['type'] == "relate" || $bean->field_defs[$field]['type'] == 'parent'){ |
|
313 | + } else if ($bean->field_defs[$field]['type'] == "relate" || $bean->field_defs[$field]['type'] == 'parent') { |
|
314 | 314 | $save_field = $bean->field_defs[$field]['id_name']; |
315 | 315 | $bean->$save_field = $value; |
316 | 316 | if ($bean->field_defs[$field]['type'] == 'parent') { |
317 | 317 | $bean->parent_type = $_REQUEST['parent_type']; |
318 | 318 | $bean->fill_in_additional_parent_fields(); // get up to date parent info as need it to display name |
319 | 319 | } |
320 | - }else{ |
|
320 | + } else { |
|
321 | 321 | $bean->$field = $value; |
322 | 322 | } |
323 | 323 | |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | |
343 | 343 | $fieldlist[$field] = $bean->getFieldDefinition($field); |
344 | 344 | |
345 | - if(is_array($listViewDefs)){ |
|
345 | + if (is_array($listViewDefs)) { |
|
346 | 346 | $fieldlist[$field] = array_merge($fieldlist[$field], $listViewDefs); |
347 | 347 | } |
348 | 348 | |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | $vardef['module'] = $bean->module_dir; |
381 | 381 | |
382 | 382 | $SugarWidgetSubPanelDetailViewLink = new SugarWidgetSubPanelDetailViewLink($vardef); |
383 | - $value = "<b>" . $SugarWidgetSubPanelDetailViewLink->displayList($vardef) . "</b>"; |
|
383 | + $value = "<b>".$SugarWidgetSubPanelDetailViewLink->displayList($vardef)."</b>"; |
|
384 | 384 | |
385 | 385 | } |
386 | 386 | |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | } |
394 | 394 | $datetime_format = $timedate->get_date_time_format(); |
395 | 395 | // create utc date (as it's utc in db) |
396 | - $datetime = DateTime::createFromFormat("Y-m-d H:i:s", $value,new DateTimeZone('UTC')); |
|
396 | + $datetime = DateTime::createFromFormat("Y-m-d H:i:s", $value, new DateTimeZone('UTC')); |
|
397 | 397 | // convert it to timezone the user uses |
398 | 398 | $datetime = $timedate->tzUser($datetime); |
399 | 399 | |
@@ -432,24 +432,24 @@ discard block |
||
432 | 432 | } |
433 | 433 | |
434 | 434 | //if field is of type relate. |
435 | - if ($vardef['type'] == "relate" || $vardef['type'] == "parent") { |
|
435 | + if ($vardef['type'] == "relate" || $vardef['type'] == "parent") { |
|
436 | 436 | |
437 | - if($vardef['source'] == "non-db"){ |
|
437 | + if ($vardef['source'] == "non-db") { |
|
438 | 438 | |
439 | - if($vardef['module'] == "Employees"){ |
|
439 | + if ($vardef['module'] == "Employees") { |
|
440 | 440 | $vardef['ext2'] = "Users"; |
441 | 441 | $vardef['rname'] = "full_name"; |
442 | 442 | } |
443 | 443 | |
444 | 444 | } |
445 | - if($vardef['type'] == "parent") { |
|
445 | + if ($vardef['type'] == "parent") { |
|
446 | 446 | $vardef['module'] = $bean->parent_type; |
447 | 447 | $name = $bean->parent_name; |
448 | 448 | } |
449 | 449 | $idName = $vardef['id_name']; |
450 | 450 | $record = $bean->$idName; |
451 | 451 | |
452 | - if($vardef['name'] != "assigned_user_name") { |
|
452 | + if ($vardef['name'] != "assigned_user_name") { |
|
453 | 453 | $value = "<a class=\"listViewTdLinkS1\" href=\"index.php?action=DetailView&module=".$vardef['module']."&record=$record\">"; |
454 | 454 | } else { |
455 | 455 | $value = ""; |
@@ -457,26 +457,26 @@ discard block |
||
457 | 457 | |
458 | 458 | |
459 | 459 | //To fix github bug 880 (the rname was null and was causing a 500 error in the getFieldValueFromModule call to $fieldname |
460 | - $fieldName = 'name';//$vardef['name']; |
|
461 | - if(!is_null($vardef['rname'])) |
|
460 | + $fieldName = 'name'; //$vardef['name']; |
|
461 | + if (!is_null($vardef['rname'])) |
|
462 | 462 | $fieldName = $vardef['rname']; |
463 | 463 | |
464 | - if($vardef['ext2']){ |
|
464 | + if ($vardef['ext2']) { |
|
465 | 465 | |
466 | - $value .= getFieldValueFromModule($fieldName,$vardef['ext2'],$record); |
|
466 | + $value .= getFieldValueFromModule($fieldName, $vardef['ext2'], $record); |
|
467 | 467 | |
468 | - }else if(!empty($vardef['rname'])){ |
|
469 | - $value .= getFieldValueFromModule($fieldName,$vardef['module'],$record); |
|
468 | + } else if (!empty($vardef['rname'])) { |
|
469 | + $value .= getFieldValueFromModule($fieldName, $vardef['module'], $record); |
|
470 | 470 | |
471 | 471 | } else { |
472 | 472 | $value .= $name; |
473 | 473 | } |
474 | 474 | |
475 | - if($vardef['name'] != "assigned_user_name") { |
|
475 | + if ($vardef['name'] != "assigned_user_name") { |
|
476 | 476 | $value .= "</a>"; |
477 | 477 | } |
478 | 478 | } |
479 | - if($vardef['type'] == "url") |
|
479 | + if ($vardef['type'] == "url") |
|
480 | 480 | { |
481 | 481 | $value = '<a href='.$value.' target="_blank">'.$value.'</a>'; |
482 | 482 | } |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | function getFieldValueFromModule($fieldname, $module, $id) |
488 | 488 | { |
489 | 489 | //Github bug 880, if the fieldname is null, do no call from bean |
490 | - if(is_null($fieldname)) |
|
490 | + if (is_null($fieldname)) |
|
491 | 491 | return ''; |
492 | 492 | |
493 | 493 | $bean = BeanFactory::getBean($module, $id); |
@@ -508,11 +508,11 @@ discard block |
||
508 | 508 | return $value; |
509 | 509 | } |
510 | 510 | |
511 | -function checkAccess($bean){ |
|
511 | +function checkAccess($bean) { |
|
512 | 512 | |
513 | - if($bean->ACLAccess('EditView')) { |
|
513 | + if ($bean->ACLAccess('EditView')) { |
|
514 | 514 | return true; |
515 | - }else { |
|
515 | + } else { |
|
516 | 516 | return false; |
517 | 517 | } |
518 | 518 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -81,9 +81,9 @@ discard block |
||
81 | 81 | /** |
82 | 82 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
83 | 83 | */ |
84 | - public function SugarEmailAddress(){ |
|
84 | + public function SugarEmailAddress() { |
|
85 | 85 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
86 | - if(isset($GLOBALS['log'])) { |
|
86 | + if (isset($GLOBALS['log'])) { |
|
87 | 87 | $GLOBALS['log']->deprecated($deprecatedMessage); |
88 | 88 | } |
89 | 89 | else { |
@@ -99,16 +99,16 @@ discard block |
||
99 | 99 | * @param string $module |
100 | 100 | */ |
101 | 101 | function handleLegacySave($bean, $prefix = "") { |
102 | - if(!isset($_REQUEST) || !isset($_REQUEST['useEmailWidget'])) { |
|
102 | + if (!isset($_REQUEST) || !isset($_REQUEST['useEmailWidget'])) { |
|
103 | 103 | if (empty($this->addresses) || !isset($_REQUEST['massupdate'])) { |
104 | 104 | $this->addresses = array(); |
105 | 105 | $optOut = (isset($bean->email_opt_out) && $bean->email_opt_out == "1") ? true : false; |
106 | 106 | $invalid = (isset($bean->invalid_email) && $bean->invalid_email == "1") ? true : false; |
107 | 107 | |
108 | 108 | $isPrimary = true; |
109 | - for($i = 1; $i <= 10; $i++){ |
|
109 | + for ($i = 1; $i <= 10; $i++) { |
|
110 | 110 | $email = 'email'.$i; |
111 | - if(isset($bean->$email) && !empty($bean->$email)){ |
|
111 | + if (isset($bean->$email) && !empty($bean->$email)) { |
|
112 | 112 | $opt_out_field = $email.'_opt_out'; |
113 | 113 | $invalid_field = $email.'_invalid'; |
114 | 114 | $field_optOut = (isset($bean->$opt_out_field)) ? $bean->$opt_out_field : $optOut; |
@@ -119,8 +119,8 @@ discard block |
||
119 | 119 | } |
120 | 120 | } |
121 | 121 | } |
122 | - $this->populateAddresses($bean->id, $bean->module_dir, array(),''); |
|
123 | - if(isset($_REQUEST) && isset($_REQUEST['useEmailWidget'])) { |
|
122 | + $this->populateAddresses($bean->id, $bean->module_dir, array(), ''); |
|
123 | + if (isset($_REQUEST) && isset($_REQUEST['useEmailWidget'])) { |
|
124 | 124 | $this->populateLegacyFields($bean); |
125 | 125 | } |
126 | 126 | } |
@@ -142,11 +142,11 @@ discard block |
||
142 | 142 | return; |
143 | 143 | } |
144 | 144 | |
145 | - function populateLegacyFields(&$bean){ |
|
145 | + function populateLegacyFields(&$bean) { |
|
146 | 146 | $primary_found = false; |
147 | 147 | $alternate_found = false; |
148 | 148 | $alternate2_found = false; |
149 | - foreach($this->addresses as $k=>$address) { |
|
149 | + foreach ($this->addresses as $k=>$address) { |
|
150 | 150 | if ($primary_found && $alternate_found) |
151 | 151 | break; |
152 | 152 | if ($address['primary_address'] == 1 && !$primary_found) { |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | } elseif (!$alternate_found) { |
156 | 156 | $alternate_index = $k; |
157 | 157 | $alternate_found = true; |
158 | - } elseif (!$alternate2_found){ |
|
158 | + } elseif (!$alternate2_found) { |
|
159 | 159 | $alternate2_index = $k; |
160 | 160 | $alternate2_found = true; |
161 | 161 | } |
@@ -192,27 +192,27 @@ discard block |
||
192 | 192 | $args = func_get_args(); |
193 | 193 | return call_user_func_array(array($this, '_save'), $args); |
194 | 194 | } |
195 | - private function _save($id, $module, $new_addrs=array(), $primary='', $replyTo='', $invalid='', $optOut='', $in_workflow=false) { |
|
196 | - if(empty($this->addresses) || $in_workflow){ |
|
197 | - $this->populateAddresses($id, $module, $new_addrs,$primary); |
|
195 | + private function _save($id, $module, $new_addrs = array(), $primary = '', $replyTo = '', $invalid = '', $optOut = '', $in_workflow = false) { |
|
196 | + if (empty($this->addresses) || $in_workflow) { |
|
197 | + $this->populateAddresses($id, $module, $new_addrs, $primary); |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | //find all email addresses.. |
201 | - $current_links=array(); |
|
201 | + $current_links = array(); |
|
202 | 202 | // Need to correct this to handle the Employee/User split |
203 | 203 | $module = $this->getCorrectedModule($module); |
204 | - $q2="select * from email_addr_bean_rel eabr WHERE eabr.bean_id = '".$this->db->quote($id)."' AND eabr.bean_module = '".$this->db->quote($module)."' and eabr.deleted=0"; |
|
204 | + $q2 = "select * from email_addr_bean_rel eabr WHERE eabr.bean_id = '".$this->db->quote($id)."' AND eabr.bean_module = '".$this->db->quote($module)."' and eabr.deleted=0"; |
|
205 | 205 | $r2 = $this->db->query($q2); |
206 | - while(($row2=$this->db->fetchByAssoc($r2)) != null ) { |
|
207 | - $current_links[$row2['email_address_id']]=$row2; |
|
206 | + while (($row2 = $this->db->fetchByAssoc($r2)) != null) { |
|
207 | + $current_links[$row2['email_address_id']] = $row2; |
|
208 | 208 | } |
209 | 209 | |
210 | 210 | $isConversion = (isset($_REQUEST) && isset($_REQUEST['action']) && $_REQUEST['action'] == 'ConvertLead') ? true : false; |
211 | 211 | |
212 | 212 | if (!empty($this->addresses)) { |
213 | 213 | // insert new relationships and create email address record, if they don't exist |
214 | - foreach($this->addresses as $address) { |
|
215 | - if(!empty($address['email_address'])) { |
|
214 | + foreach ($this->addresses as $address) { |
|
215 | + if (!empty($address['email_address'])) { |
|
216 | 216 | $guid = create_guid(); |
217 | 217 | $emailId = isset($address['email_address_id']) |
218 | 218 | && isset($current_links[$address['email_address_id']]) |
@@ -220,14 +220,14 @@ discard block |
||
220 | 220 | $emailId = $this->AddUpdateEmailAddress($address['email_address'], |
221 | 221 | $address['invalid_email'], |
222 | 222 | $address['opt_out'], |
223 | - $emailId);// this will save the email address if not found |
|
223 | + $emailId); // this will save the email address if not found |
|
224 | 224 | |
225 | 225 | //verify linkage and flags. |
226 | - $upd_eabr=""; |
|
226 | + $upd_eabr = ""; |
|
227 | 227 | if (isset($current_links[$emailId])) { |
228 | 228 | if (!$isConversion) { // do not update anything if this is for lead conversion |
229 | - if ($address['primary_address'] != $current_links[$emailId]['primary_address'] or $address['reply_to_address'] != $current_links[$emailId]['reply_to_address'] ) { |
|
230 | - $upd_eabr="UPDATE email_addr_bean_rel SET primary_address='".$this->db->quote($address['primary_address'])."', reply_to_address='".$this->db->quote($address['reply_to_address'])."' WHERE id='".$this->db->quote($current_links[$emailId]['id'])."'"; |
|
229 | + if ($address['primary_address'] != $current_links[$emailId]['primary_address'] or $address['reply_to_address'] != $current_links[$emailId]['reply_to_address']) { |
|
230 | + $upd_eabr = "UPDATE email_addr_bean_rel SET primary_address='".$this->db->quote($address['primary_address'])."', reply_to_address='".$this->db->quote($address['reply_to_address'])."' WHERE id='".$this->db->quote($current_links[$emailId]['id'])."'"; |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | unset($current_links[$emailId]); |
@@ -258,13 +258,13 @@ discard block |
||
258 | 258 | // for lead conversion, do not delete email addresses |
259 | 259 | if (!empty($current_links) && !$isConversion) { |
260 | 260 | |
261 | - $delete=""; |
|
261 | + $delete = ""; |
|
262 | 262 | foreach ($current_links as $eabr) { |
263 | 263 | |
264 | - $delete.=empty($delete) ? "'".$this->db->quote($eabr['id']) . "' " : ",'" . $this->db->quote($eabr['id']) . "'"; |
|
264 | + $delete .= empty($delete) ? "'".$this->db->quote($eabr['id'])."' " : ",'".$this->db->quote($eabr['id'])."'"; |
|
265 | 265 | } |
266 | 266 | |
267 | - $eabr_unlink="update email_addr_bean_rel set deleted=1 where id in ({$delete})"; |
|
267 | + $eabr_unlink = "update email_addr_bean_rel set deleted=1 where id in ({$delete})"; |
|
268 | 268 | $this->db->query($eabr_unlink); |
269 | 269 | } |
270 | 270 | $this->stateBeforeWorkflow = null; |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | ) |
287 | 287 | { |
288 | 288 | $emailCaps = strtoupper(trim($email)); |
289 | - if(empty($emailCaps)) |
|
289 | + if (empty($emailCaps)) |
|
290 | 290 | return 0; |
291 | 291 | |
292 | 292 | $q = "SELECT * |
@@ -324,10 +324,10 @@ discard block |
||
324 | 324 | $r = $this->db->query($q, true); |
325 | 325 | |
326 | 326 | $retArr = array(); |
327 | - while($a = $this->db->fetchByAssoc($r)) { |
|
327 | + while ($a = $this->db->fetchByAssoc($r)) { |
|
328 | 328 | $retArr[] = $a['bean_id']; |
329 | 329 | } |
330 | - if(count($retArr) > 0) { |
|
330 | + if (count($retArr) > 0) { |
|
331 | 331 | return $retArr; |
332 | 332 | } else { |
333 | 333 | return false; |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | |
348 | 348 | $email = trim($email); |
349 | 349 | |
350 | - if(empty($email)) { |
|
350 | + if (empty($email)) { |
|
351 | 351 | return array(); |
352 | 352 | } |
353 | 353 | |
@@ -356,12 +356,12 @@ discard block |
||
356 | 356 | WHERE ea.email_address_caps = $emailCaps and eabl.deleted=0 "; |
357 | 357 | $r = $this->db->query($q); |
358 | 358 | |
359 | - while($a = $this->db->fetchByAssoc($r)) { |
|
360 | - if(isset($beanList[$a['bean_module']]) && !empty($beanList[$a['bean_module']])) { |
|
359 | + while ($a = $this->db->fetchByAssoc($r)) { |
|
360 | + if (isset($beanList[$a['bean_module']]) && !empty($beanList[$a['bean_module']])) { |
|
361 | 361 | $className = $beanList[$a['bean_module']]; |
362 | 362 | |
363 | - if(isset($beanFiles[$className]) && !empty($beanFiles[$className])) { |
|
364 | - if(!class_exists($className)) { |
|
363 | + if (isset($beanFiles[$className]) && !empty($beanFiles[$className])) { |
|
364 | + if (!class_exists($className)) { |
|
365 | 365 | require_once($beanFiles[$className]); |
366 | 366 | } |
367 | 367 | |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | * @param string $replyTo GUID of reply-to address |
390 | 390 | * @param string $invalid GUID of invalid address |
391 | 391 | */ |
392 | - function populateAddresses($id, $module, $new_addrs=array(), $primary='', $replyTo='', $invalid='', $optOut='') { |
|
392 | + function populateAddresses($id, $module, $new_addrs = array(), $primary = '', $replyTo = '', $invalid = '', $optOut = '') { |
|
393 | 393 | $module = $this->getCorrectedModule($module); |
394 | 394 | //One last check for the ConvertLead action in which case we need to change $module to 'Leads' |
395 | 395 | $module = (isset($_REQUEST) && isset($_REQUEST['action']) && $_REQUEST['action'] == 'ConvertLead') ? 'Leads' : $module; |
@@ -400,54 +400,54 @@ discard block |
||
400 | 400 | $hasEmailValue = false; |
401 | 401 | $email_ids = array(); |
402 | 402 | |
403 | - if (isset($_REQUEST) && isset($_REQUEST[$module .'_email_widget_id'])) { |
|
403 | + if (isset($_REQUEST) && isset($_REQUEST[$module.'_email_widget_id'])) { |
|
404 | 404 | |
405 | 405 | $fromRequest = false; |
406 | 406 | // determine which array to process |
407 | - foreach($_REQUEST as $k => $v) { |
|
408 | - if(strpos($k, 'emailAddress') !== false) { |
|
407 | + foreach ($_REQUEST as $k => $v) { |
|
408 | + if (strpos($k, 'emailAddress') !== false) { |
|
409 | 409 | $fromRequest = true; |
410 | 410 | break; |
411 | 411 | } |
412 | - $widget_id = $_REQUEST[$module .'_email_widget_id']; |
|
412 | + $widget_id = $_REQUEST[$module.'_email_widget_id']; |
|
413 | 413 | } |
414 | 414 | |
415 | 415 | //Iterate over the widgets for this module, in case there are multiple email widgets for this module |
416 | - while(isset($_REQUEST[$module . $widget_id . "emailAddress" . $widgetCount])) |
|
416 | + while (isset($_REQUEST[$module.$widget_id."emailAddress".$widgetCount])) |
|
417 | 417 | { |
418 | - if (empty($_REQUEST[$module . $widget_id . "emailAddress" . $widgetCount])) { |
|
418 | + if (empty($_REQUEST[$module.$widget_id."emailAddress".$widgetCount])) { |
|
419 | 419 | $widgetCount++; |
420 | 420 | continue; |
421 | 421 | } |
422 | 422 | |
423 | 423 | $hasEmailValue = true; |
424 | 424 | |
425 | - $eId = $module . $widget_id; |
|
426 | - if(isset($_REQUEST[$eId . 'emailAddressPrimaryFlag'])) { |
|
427 | - $primaryValue = $_REQUEST[$eId . 'emailAddressPrimaryFlag']; |
|
428 | - } else if(isset($_REQUEST[$module . 'emailAddressPrimaryFlag'])) { |
|
429 | - $primaryValue = $_REQUEST[$module . 'emailAddressPrimaryFlag']; |
|
425 | + $eId = $module.$widget_id; |
|
426 | + if (isset($_REQUEST[$eId.'emailAddressPrimaryFlag'])) { |
|
427 | + $primaryValue = $_REQUEST[$eId.'emailAddressPrimaryFlag']; |
|
428 | + } else if (isset($_REQUEST[$module.'emailAddressPrimaryFlag'])) { |
|
429 | + $primaryValue = $_REQUEST[$module.'emailAddressPrimaryFlag']; |
|
430 | 430 | } |
431 | 431 | |
432 | 432 | $optOutValues = array(); |
433 | - if(isset($_REQUEST[$eId .'emailAddressOptOutFlag'])) { |
|
434 | - $optOutValues = $_REQUEST[$eId .'emailAddressOptOutFlag']; |
|
435 | - } else if(isset($_REQUEST[$module . 'emailAddressOptOutFlag'])) { |
|
436 | - $optOutValues = $_REQUEST[$module . 'emailAddressOptOutFlag']; |
|
433 | + if (isset($_REQUEST[$eId.'emailAddressOptOutFlag'])) { |
|
434 | + $optOutValues = $_REQUEST[$eId.'emailAddressOptOutFlag']; |
|
435 | + } else if (isset($_REQUEST[$module.'emailAddressOptOutFlag'])) { |
|
436 | + $optOutValues = $_REQUEST[$module.'emailAddressOptOutFlag']; |
|
437 | 437 | } |
438 | 438 | |
439 | 439 | $invalidValues = array(); |
440 | - if(isset($_REQUEST[$eId .'emailAddressInvalidFlag'])) { |
|
441 | - $invalidValues = $_REQUEST[$eId .'emailAddressInvalidFlag']; |
|
442 | - } else if(isset($_REQUEST[$module . 'emailAddressInvalidFlag'])) { |
|
443 | - $invalidValues = $_REQUEST[$module . 'emailAddressInvalidFlag']; |
|
440 | + if (isset($_REQUEST[$eId.'emailAddressInvalidFlag'])) { |
|
441 | + $invalidValues = $_REQUEST[$eId.'emailAddressInvalidFlag']; |
|
442 | + } else if (isset($_REQUEST[$module.'emailAddressInvalidFlag'])) { |
|
443 | + $invalidValues = $_REQUEST[$module.'emailAddressInvalidFlag']; |
|
444 | 444 | } |
445 | 445 | |
446 | 446 | $deleteValues = array(); |
447 | - if(isset($_REQUEST[$eId .'emailAddressDeleteFlag'])) { |
|
448 | - $deleteValues = $_REQUEST[$eId .'emailAddressDeleteFlag']; |
|
449 | - } else if(isset($_REQUEST[$module . 'emailAddressDeleteFlag'])) { |
|
450 | - $deleteValues = $_REQUEST[$module . 'emailAddressDeleteFlag']; |
|
447 | + if (isset($_REQUEST[$eId.'emailAddressDeleteFlag'])) { |
|
448 | + $deleteValues = $_REQUEST[$eId.'emailAddressDeleteFlag']; |
|
449 | + } else if (isset($_REQUEST[$module.'emailAddressDeleteFlag'])) { |
|
450 | + $deleteValues = $_REQUEST[$module.'emailAddressDeleteFlag']; |
|
451 | 451 | } |
452 | 452 | |
453 | 453 | // prep from form save |
@@ -455,36 +455,36 @@ discard block |
||
455 | 455 | $replyToField = ''; |
456 | 456 | $invalidField = ''; |
457 | 457 | $optOutField = ''; |
458 | - if($fromRequest && empty($primary) && isset($primaryValue)) { |
|
458 | + if ($fromRequest && empty($primary) && isset($primaryValue)) { |
|
459 | 459 | $primaryField = $primaryValue; |
460 | 460 | } |
461 | 461 | |
462 | - if($fromRequest && empty($replyTo)) { |
|
463 | - if(isset($_REQUEST[$eId .'emailAddressReplyToFlag'])) { |
|
464 | - $replyToField = $_REQUEST[$eId .'emailAddressReplyToFlag']; |
|
465 | - } else if(isset($_REQUEST[$module . 'emailAddressReplyToFlag'])) { |
|
466 | - $replyToField = $_REQUEST[$module . 'emailAddressReplyToFlag']; |
|
462 | + if ($fromRequest && empty($replyTo)) { |
|
463 | + if (isset($_REQUEST[$eId.'emailAddressReplyToFlag'])) { |
|
464 | + $replyToField = $_REQUEST[$eId.'emailAddressReplyToFlag']; |
|
465 | + } else if (isset($_REQUEST[$module.'emailAddressReplyToFlag'])) { |
|
466 | + $replyToField = $_REQUEST[$module.'emailAddressReplyToFlag']; |
|
467 | 467 | } |
468 | 468 | } |
469 | - if($fromRequest && empty($new_addrs)) { |
|
470 | - foreach($_REQUEST as $k => $v) { |
|
471 | - if(preg_match('/'.$eId.'emailAddress[0-9]+$/i', $k) && !empty($v)) { |
|
469 | + if ($fromRequest && empty($new_addrs)) { |
|
470 | + foreach ($_REQUEST as $k => $v) { |
|
471 | + if (preg_match('/'.$eId.'emailAddress[0-9]+$/i', $k) && !empty($v)) { |
|
472 | 472 | $new_addrs[$k] = $v; |
473 | 473 | } |
474 | 474 | } |
475 | 475 | } |
476 | - if($fromRequest && empty($email_ids)) { |
|
477 | - foreach($_REQUEST as $k => $v) { |
|
478 | - if(preg_match('/'.$eId.'emailAddressId[0-9]+$/i', $k) && !empty($v)) { |
|
476 | + if ($fromRequest && empty($email_ids)) { |
|
477 | + foreach ($_REQUEST as $k => $v) { |
|
478 | + if (preg_match('/'.$eId.'emailAddressId[0-9]+$/i', $k) && !empty($v)) { |
|
479 | 479 | $key = str_replace('emailAddressId', 'emailAddress', $k); |
480 | 480 | $email_ids[$key] = $v; |
481 | 481 | } |
482 | 482 | } |
483 | 483 | } |
484 | 484 | |
485 | - if($fromRequest && empty($new_addrs)) { |
|
486 | - foreach($_REQUEST as $k => $v) { |
|
487 | - if(preg_match('/'.$eId.'emailAddressVerifiedValue[0-9]+$/i', $k) && !empty($v)) { |
|
485 | + if ($fromRequest && empty($new_addrs)) { |
|
486 | + foreach ($_REQUEST as $k => $v) { |
|
487 | + if (preg_match('/'.$eId.'emailAddressVerifiedValue[0-9]+$/i', $k) && !empty($v)) { |
|
488 | 488 | $validateFlag = str_replace("Value", "Flag", $k); |
489 | 489 | if (isset($_REQUEST[$validateFlag]) && $_REQUEST[$validateFlag] == "true") |
490 | 490 | $new_addrs[$k] = $v; |
@@ -493,21 +493,21 @@ discard block |
||
493 | 493 | } |
494 | 494 | |
495 | 495 | //empty the addresses array if the post happened from email address widget. |
496 | - if($post_from_email_address_widget) { |
|
497 | - $this->addresses=array(); //this gets populated during retrieve of the contact bean. |
|
496 | + if ($post_from_email_address_widget) { |
|
497 | + $this->addresses = array(); //this gets populated during retrieve of the contact bean. |
|
498 | 498 | } else { |
499 | 499 | $optOutValues = array(); |
500 | 500 | $invalidValues = array(); |
501 | - foreach($new_addrs as $k=>$email) { |
|
501 | + foreach ($new_addrs as $k=>$email) { |
|
502 | 502 | preg_match('/emailAddress([0-9])+$/', $k, $matches); |
503 | 503 | $count = $matches[1]; |
504 | - $result = $this->db->query("SELECT opt_out, invalid_email from email_addresses where email_address_caps = '" . $this->db->quote(strtoupper($email)) . "'"); |
|
505 | - if(!empty($result)) { |
|
506 | - $row=$this->db->fetchByAssoc($result); |
|
507 | - if(!empty($row['opt_out'])) { |
|
504 | + $result = $this->db->query("SELECT opt_out, invalid_email from email_addresses where email_address_caps = '".$this->db->quote(strtoupper($email))."'"); |
|
505 | + if (!empty($result)) { |
|
506 | + $row = $this->db->fetchByAssoc($result); |
|
507 | + if (!empty($row['opt_out'])) { |
|
508 | 508 | $optOutValues[$k] = "emailAddress$count"; |
509 | 509 | } |
510 | - if(!empty($row['invalid_email'])) { |
|
510 | + if (!empty($row['invalid_email'])) { |
|
511 | 511 | $invalidValues[$k] = "emailAddress$count"; |
512 | 512 | } |
513 | 513 | } |
@@ -515,11 +515,11 @@ discard block |
||
515 | 515 | } |
516 | 516 | // Re-populate the addresses class variable if we have new address(es). |
517 | 517 | if (!empty($new_addrs)) { |
518 | - foreach($new_addrs as $k => $reqVar) { |
|
518 | + foreach ($new_addrs as $k => $reqVar) { |
|
519 | 519 | //$key = preg_match("/^$eId/s", $k) ? substr($k, strlen($eId)) : $k; |
520 | 520 | $reqVar = trim($reqVar); |
521 | - if(strpos($k, 'emailAddress') !== false) { |
|
522 | - if(!empty($reqVar) && !in_array($k, $deleteValues)) { |
|
521 | + if (strpos($k, 'emailAddress') !== false) { |
|
522 | + if (!empty($reqVar) && !in_array($k, $deleteValues)) { |
|
523 | 523 | $email_id = (array_key_exists($k, $email_ids)) ? $email_ids[$k] : null; |
524 | 524 | $primary = ($k == $primaryValue) ? true : false; |
525 | 525 | $replyTo = ($k == $replyToField) ? true : false; |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | } |
537 | 537 | |
538 | 538 | //If no widgets, set addresses array to empty |
539 | - if($post_from_email_address_widget && !$hasEmailValue) { |
|
539 | + if ($post_from_email_address_widget && !$hasEmailValue) { |
|
540 | 540 | $this->addresses = array(); |
541 | 541 | } |
542 | 542 | } |
@@ -547,9 +547,9 @@ discard block |
||
547 | 547 | * @param bool $primary Default false |
548 | 548 | * @param bool $replyTo Default false |
549 | 549 | */ |
550 | - function addAddress($addr, $primary=false, $replyTo=false, $invalid=false, $optOut=false, $email_id = null) { |
|
550 | + function addAddress($addr, $primary = false, $replyTo = false, $invalid = false, $optOut = false, $email_id = null) { |
|
551 | 551 | $addr = html_entity_decode($addr, ENT_QUOTES); |
552 | - if(preg_match($this->regex, $addr)) { |
|
552 | + if (preg_match($this->regex, $addr)) { |
|
553 | 553 | $primaryFlag = ($primary) ? '1' : '0'; |
554 | 554 | $replyToFlag = ($replyTo) ? '1' : '0'; |
555 | 555 | $invalidFlag = ($invalid) ? '1' : '0'; |
@@ -585,17 +585,17 @@ discard block |
||
585 | 585 | * Updates invalid_email and opt_out flags for each address |
586 | 586 | */ |
587 | 587 | function updateFlags() { |
588 | - if(!empty($this->addresses)) { |
|
589 | - foreach($this->addresses as $addressMeta) { |
|
590 | - if(isset($addressMeta['email_address']) && !empty($addressMeta['email_address'])) { |
|
588 | + if (!empty($this->addresses)) { |
|
589 | + foreach ($this->addresses as $addressMeta) { |
|
590 | + if (isset($addressMeta['email_address']) && !empty($addressMeta['email_address'])) { |
|
591 | 591 | $address = $this->db->quote($this->_cleanAddress($addressMeta['email_address'])); |
592 | 592 | |
593 | 593 | $q = "SELECT * FROM email_addresses WHERE email_address = '{$address}'"; |
594 | 594 | $r = $this->db->query($q); |
595 | 595 | $a = $this->db->fetchByAssoc($r); |
596 | 596 | |
597 | - if(!empty($a)) { |
|
598 | - if(isset($a['invalid_email']) && isset($addressMeta['invalid_email']) && isset($addressMeta['opt_out']) && $a['invalid_email'] != $addressMeta['invalid_email'] || $a['opt_out'] != $addressMeta['opt_out']) { |
|
597 | + if (!empty($a)) { |
|
598 | + if (isset($a['invalid_email']) && isset($addressMeta['invalid_email']) && isset($addressMeta['opt_out']) && $a['invalid_email'] != $addressMeta['invalid_email'] || $a['opt_out'] != $addressMeta['opt_out']) { |
|
599 | 599 | $qUpdate = "UPDATE email_addresses SET invalid_email = ".intval($addressMeta['invalid_email']).", opt_out = ".intval($addressMeta['opt_out']).", date_modified = '".TimeDate::getInstance()->nowDb()."' WHERE id = '".$this->db->quote($a['id'])."'"; |
600 | 600 | $rUpdate = $this->db->query($qUpdate); |
601 | 601 | } |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | public function splitEmailAddress($addr) |
609 | 609 | { |
610 | 610 | $email = $this->_cleanAddress($addr); |
611 | - if(!preg_match($this->regex, $email)) { |
|
611 | + if (!preg_match($this->regex, $email)) { |
|
612 | 612 | $email = ''; // remove bad email addr |
613 | 613 | } |
614 | 614 | $name = trim(str_replace(array($email, '<', '>', '"', "'"), '', $addr)); |
@@ -624,8 +624,8 @@ discard block |
||
624 | 624 | function _cleanAddress($addr) { |
625 | 625 | $addr = trim(from_html($addr)); |
626 | 626 | |
627 | - if(strpos($addr, "<") !== false && strpos($addr, ">") !== false) { |
|
628 | - $address = trim(substr($addr, strrpos($addr, "<") +1, strrpos($addr, ">") - strrpos($addr, "<") -1)); |
|
627 | + if (strpos($addr, "<") !== false && strpos($addr, ">") !== false) { |
|
628 | + $address = trim(substr($addr, strrpos($addr, "<") + 1, strrpos($addr, ">") - strrpos($addr, "<") - 1)); |
|
629 | 629 | } else { |
630 | 630 | $address = trim($addr); |
631 | 631 | } |
@@ -646,11 +646,11 @@ discard block |
||
646 | 646 | $r = $this->db->query($q); |
647 | 647 | $a = $this->db->fetchByAssoc($r); |
648 | 648 | |
649 | - if(!empty($a) && !empty($a['id'])) { |
|
649 | + if (!empty($a) && !empty($a['id'])) { |
|
650 | 650 | return $a['id']; |
651 | 651 | } else { |
652 | 652 | $guid = ''; |
653 | - if(!empty($address)){ |
|
653 | + if (!empty($address)) { |
|
654 | 654 | $guid = create_guid(); |
655 | 655 | $now = TimeDate::getInstance()->nowDb(); |
656 | 656 | $qa = "INSERT INTO email_addresses (id, email_address, email_address_caps, date_created, date_modified, deleted) |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | * to propagate to the new SugarEmailAddress - see bug 39188 |
673 | 673 | * @return String GUID of Email Address or '' if cleaned address was empty. |
674 | 674 | */ |
675 | - public function AddUpdateEmailAddress($addr,$invalid=0,$opt_out=0,$id=null) |
|
675 | + public function AddUpdateEmailAddress($addr, $invalid = 0, $opt_out = 0, $id = null) |
|
676 | 676 | { |
677 | 677 | // sanity checks to avoid SQL injection. |
678 | 678 | $invalid = intval($invalid); |
@@ -722,12 +722,12 @@ discard block |
||
722 | 722 | if ($duplicate_email['invalid_email'] != $new_invalid || |
723 | 723 | $duplicate_email['opt_out'] != $new_opt_out || |
724 | 724 | (trim($duplicate_email['email_address']) != $address)) { |
725 | - $upd_q = 'UPDATE ' . $this->table_name . ' ' . |
|
726 | - 'SET email_address=\'' . $address . '\', ' . |
|
727 | - 'invalid_email=' . $new_invalid . ', ' . |
|
728 | - 'opt_out=' . $new_opt_out . ', ' . |
|
729 | - 'date_modified=' . $this->db->now() . ' ' . |
|
730 | - 'WHERE id=\'' . $this->db->quote($duplicate_email['id']) . '\''; |
|
725 | + $upd_q = 'UPDATE '.$this->table_name.' '. |
|
726 | + 'SET email_address=\''.$address.'\', '. |
|
727 | + 'invalid_email='.$new_invalid.', '. |
|
728 | + 'opt_out='.$new_opt_out.', '. |
|
729 | + 'date_modified='.$this->db->now().' '. |
|
730 | + 'WHERE id=\''.$this->db->quote($duplicate_email['id']).'\''; |
|
731 | 731 | $upd_r = $this->db->query($upd_q); |
732 | 732 | } |
733 | 733 | return $duplicate_email['id']; |
@@ -735,7 +735,7 @@ discard block |
||
735 | 735 | else { |
736 | 736 | // no case-insensitive address match - it's new, or undeleted. |
737 | 737 | $guid = ''; |
738 | - if(!empty($address)){ |
|
738 | + if (!empty($address)) { |
|
739 | 739 | $guid = create_guid(); |
740 | 740 | $now = TimeDate::getInstance()->nowDb(); |
741 | 741 | $qa = "INSERT INTO email_addresses (id, email_address, email_address_caps, date_created, date_modified, deleted, invalid_email, opt_out) |
@@ -751,12 +751,12 @@ discard block |
||
751 | 751 | * @param object $focus Object in focus |
752 | 752 | * @return string email |
753 | 753 | */ |
754 | - function getPrimaryAddress($focus,$parent_id=null,$parent_type=null) { |
|
754 | + function getPrimaryAddress($focus, $parent_id = null, $parent_type = null) { |
|
755 | 755 | |
756 | - $parent_type=empty($parent_type) ? $focus->module_dir : $parent_type; |
|
756 | + $parent_type = empty($parent_type) ? $focus->module_dir : $parent_type; |
|
757 | 757 | // Bug63174: Email address is not shown in the list view for employees |
758 | 758 | $parent_type = $this->getCorrectedModule($parent_type); |
759 | - $parent_id=empty($parent_id) ? $focus->id : $parent_id; |
|
759 | + $parent_id = empty($parent_id) ? $focus->id : $parent_id; |
|
760 | 760 | |
761 | 761 | $q = "SELECT ea.email_address FROM email_addresses ea |
762 | 762 | LEFT JOIN email_addr_bean_rel ear ON ea.id = ear.email_address_id |
@@ -768,7 +768,7 @@ discard block |
||
768 | 768 | $r = $this->db->limitQuery($q, 0, 1); |
769 | 769 | $a = $this->db->fetchByAssoc($r); |
770 | 770 | |
771 | - if(isset($a['email_address'])) { |
|
771 | + if (isset($a['email_address'])) { |
|
772 | 772 | return $a['email_address']; |
773 | 773 | } |
774 | 774 | return ''; |
@@ -809,7 +809,7 @@ discard block |
||
809 | 809 | $r = $this->db->query($q); |
810 | 810 | $a = $this->db->fetchByAssoc($r); |
811 | 811 | |
812 | - if(isset($a['email_address'])) { |
|
812 | + if (isset($a['email_address'])) { |
|
813 | 813 | return $a['email_address']; |
814 | 814 | } |
815 | 815 | return ''; |
@@ -834,7 +834,7 @@ discard block |
||
834 | 834 | ORDER BY ear.reply_to_address, ear.primary_address DESC"; |
835 | 835 | $r = $this->db->query($q); |
836 | 836 | |
837 | - while($a = $this->db->fetchByAssoc($r, FALSE)) { |
|
837 | + while ($a = $this->db->fetchByAssoc($r, FALSE)) { |
|
838 | 838 | $return[] = $a; |
839 | 839 | } |
840 | 840 | |
@@ -848,9 +848,9 @@ discard block |
||
848 | 848 | * @param bool asMetadata Default false |
849 | 849 | * @return string HTML/JS for widget |
850 | 850 | */ |
851 | - function getEmailAddressWidgetEditView($id, $module, $asMetadata=false, $tpl='',$tabindex='0') |
|
851 | + function getEmailAddressWidgetEditView($id, $module, $asMetadata = false, $tpl = '', $tabindex = '0') |
|
852 | 852 | { |
853 | - if ( !($this->smarty instanceOf Sugar_Smarty ) ) |
|
853 | + if (!($this->smarty instanceOf Sugar_Smarty)) |
|
854 | 854 | $this->smarty = new Sugar_Smarty(); |
855 | 855 | |
856 | 856 | global $app_strings, $dictionary, $beanList; |
@@ -861,33 +861,33 @@ discard block |
||
861 | 861 | $passedModule = $module; |
862 | 862 | $module = $this->getCorrectedModule($module); |
863 | 863 | $saveModule = $module; |
864 | - if(isset($_POST['is_converted']) && $_POST['is_converted']==true){ |
|
865 | - $id=$_POST['return_id']; |
|
866 | - $module=$_POST['return_module']; |
|
864 | + if (isset($_POST['is_converted']) && $_POST['is_converted'] == true) { |
|
865 | + $id = $_POST['return_id']; |
|
866 | + $module = $_POST['return_module']; |
|
867 | 867 | } |
868 | 868 | $prefillDataArr = array(); |
869 | - if(!empty($id)) { |
|
869 | + if (!empty($id)) { |
|
870 | 870 | $prefillDataArr = $this->getAddressesByGUID($id, $module); |
871 | 871 | //When coming from convert leads, sometimes module is Contacts while the id is for a lead. |
872 | 872 | if (empty($prefillDataArr) && $module == "Contacts") |
873 | 873 | $prefillDataArr = $this->getAddressesByGUID($id, "Leads"); |
874 | - } else if(isset($_REQUEST['full_form']) && !empty($_REQUEST['emailAddressWidget'])){ |
|
875 | - $widget_id = isset($_REQUEST[$module . '_email_widget_id']) ? $_REQUEST[$module . '_email_widget_id'] : '0'; |
|
874 | + } else if (isset($_REQUEST['full_form']) && !empty($_REQUEST['emailAddressWidget'])) { |
|
875 | + $widget_id = isset($_REQUEST[$module.'_email_widget_id']) ? $_REQUEST[$module.'_email_widget_id'] : '0'; |
|
876 | 876 | $count = 0; |
877 | - $key = $module . $widget_id . 'emailAddress'.$count; |
|
878 | - while(isset($_REQUEST[$key])) { |
|
877 | + $key = $module.$widget_id.'emailAddress'.$count; |
|
878 | + while (isset($_REQUEST[$key])) { |
|
879 | 879 | $email = $_REQUEST[$key]; |
880 | - $prefillDataArr[] = array('email_address'=>$email, |
|
880 | + $prefillDataArr[] = array('email_address'=>$email, |
|
881 | 881 | 'primary_address'=>isset($_REQUEST['emailAddressPrimaryFlag']) && $_REQUEST['emailAddressPrimaryFlag'] == $key, |
882 | 882 | 'invalid_email'=>isset($_REQUEST['emailAddressInvalidFlag']) && in_array($key, $_REQUEST['emailAddressInvalidFlag']), |
883 | 883 | 'opt_out'=>isset($_REQUEST['emailAddressOptOutFlag']) && in_array($key, $_REQUEST['emailAddressOptOutFlag']), |
884 | 884 | 'reply_to_address'=>false |
885 | 885 | ); |
886 | - $key = $module . $widget_id . 'emailAddress' . ++$count; |
|
886 | + $key = $module.$widget_id.'emailAddress'.++$count; |
|
887 | 887 | } //while |
888 | 888 | } |
889 | 889 | |
890 | - if(!empty($prefillDataArr)) { |
|
890 | + if (!empty($prefillDataArr)) { |
|
891 | 891 | $json = new JSON(JSON_LOOSE_TYPE); |
892 | 892 | $prefillData = $json->encode($prefillDataArr); |
893 | 893 | $prefill = !empty($prefillDataArr) ? 'true' : 'false'; |
@@ -910,23 +910,23 @@ discard block |
||
910 | 910 | $form = $this->view; |
911 | 911 | |
912 | 912 | //determine if this should be a quickcreate form, or a quick create form under subpanels |
913 | - if ($this->view == "QuickCreate"){ |
|
913 | + if ($this->view == "QuickCreate") { |
|
914 | 914 | // Fixed #1120 - fixed email validation for: Accounts -> Contacts subpanel -> Select -> Create Contact -> Save. |
915 | 915 | // If email is required it should highlight this field and show an error message. |
916 | 916 | // It didnt because the the form was named form_DCSubpanelQuickCreate_Contacts instead of expected form_SubpanelQuickCreate_Contacts |
917 | - if($this->object_name = 'EmailAddress' && $saveModule == 'Contacts') { |
|
918 | - $form = 'form_'.$this->view .'_'.$module; |
|
917 | + if ($this->object_name = 'EmailAddress' && $saveModule == 'Contacts') { |
|
918 | + $form = 'form_'.$this->view.'_'.$module; |
|
919 | 919 | } else { |
920 | - $form = 'form_DC'.$this->view .'_'.$module; |
|
920 | + $form = 'form_DC'.$this->view.'_'.$module; |
|
921 | 921 | } |
922 | - if(isset($_REQUEST['action']) && $_REQUEST['action']=='SubpanelCreates' || $_REQUEST['action']=='SubpanelEdits'){ |
|
923 | - $form = 'form_Subpanel'.$this->view .'_'.$module; |
|
922 | + if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'SubpanelCreates' || $_REQUEST['action'] == 'SubpanelEdits') { |
|
923 | + $form = 'form_Subpanel'.$this->view.'_'.$module; |
|
924 | 924 | } |
925 | 925 | } |
926 | 926 | |
927 | 927 | $this->smarty->assign('emailView', $form); |
928 | 928 | |
929 | - if($module == 'Users') { |
|
929 | + if ($module == 'Users') { |
|
930 | 930 | $this->smarty->assign('useReplyTo', true); |
931 | 931 | } else { |
932 | 932 | $this->smarty->assign('useOptOut', true); |
@@ -937,7 +937,7 @@ discard block |
||
937 | 937 | $newEmail = $this->smarty->fetch($template); |
938 | 938 | |
939 | 939 | |
940 | - if($asMetadata) { |
|
940 | + if ($asMetadata) { |
|
941 | 941 | // used by Email 2.0 |
942 | 942 | $ret = array(); |
943 | 943 | $ret['prefillData'] = $prefillDataArr; |
@@ -955,18 +955,18 @@ discard block |
||
955 | 955 | * @param object $focus Bean in focus |
956 | 956 | * @return string HTML/JS for widget |
957 | 957 | */ |
958 | - function getEmailAddressWidgetDetailView($focus, $tpl='') |
|
958 | + function getEmailAddressWidgetDetailView($focus, $tpl = '') |
|
959 | 959 | { |
960 | - if ( !($this->smarty instanceOf Sugar_Smarty ) ) |
|
960 | + if (!($this->smarty instanceOf Sugar_Smarty)) |
|
961 | 961 | $this->smarty = new Sugar_Smarty(); |
962 | 962 | |
963 | 963 | global $app_strings; |
964 | 964 | global $current_user; |
965 | 965 | $assign = array(); |
966 | - if(empty($focus->id))return ''; |
|
966 | + if (empty($focus->id))return ''; |
|
967 | 967 | $prefillData = $this->getAddressesByGUID($focus->id, $focus->module_dir); |
968 | 968 | |
969 | - foreach($prefillData as $addressItem) { |
|
969 | + foreach ($prefillData as $addressItem) { |
|
970 | 970 | $key = ($addressItem['primary_address'] == 1) ? 'primary' : ""; |
971 | 971 | $key = ($addressItem['reply_to_address'] == 1) ? 'reply_to' : $key; |
972 | 972 | $key = ($addressItem['opt_out'] == 1) ? 'opt_out' : $key; |
@@ -992,7 +992,7 @@ discard block |
||
992 | 992 | */ |
993 | 993 | function getEmailAddressWidgetDuplicatesView($focus) |
994 | 994 | { |
995 | - if ( !($this->smarty instanceOf Sugar_Smarty ) ) |
|
995 | + if (!($this->smarty instanceOf Sugar_Smarty)) |
|
996 | 996 | $this->smarty = new Sugar_Smarty(); |
997 | 997 | |
998 | 998 | $count = 0; |
@@ -1002,49 +1002,49 @@ discard block |
||
1002 | 1002 | $invalid = array(); |
1003 | 1003 | $mod = isset($focus) ? $focus->module_dir : ""; |
1004 | 1004 | |
1005 | - $widget_id = $_POST[$mod .'_email_widget_id']; |
|
1006 | - $this->smarty->assign('email_widget_id',$widget_id); |
|
1007 | - $this->smarty->assign('emailAddressWidget',$_POST['emailAddressWidget']); |
|
1005 | + $widget_id = $_POST[$mod.'_email_widget_id']; |
|
1006 | + $this->smarty->assign('email_widget_id', $widget_id); |
|
1007 | + $this->smarty->assign('emailAddressWidget', $_POST['emailAddressWidget']); |
|
1008 | 1008 | |
1009 | - if(isset($_POST[$mod . $widget_id . 'emailAddressPrimaryFlag'])) { |
|
1010 | - $primary = $_POST[$mod . $widget_id . 'emailAddressPrimaryFlag']; |
|
1009 | + if (isset($_POST[$mod.$widget_id.'emailAddressPrimaryFlag'])) { |
|
1010 | + $primary = $_POST[$mod.$widget_id.'emailAddressPrimaryFlag']; |
|
1011 | 1011 | } |
1012 | 1012 | |
1013 | - while(isset($_POST[$mod . $widget_id . "emailAddress" . $count])) { |
|
1014 | - $emails[] = $_POST[$mod . $widget_id . 'emailAddress' . $count]; |
|
1013 | + while (isset($_POST[$mod.$widget_id."emailAddress".$count])) { |
|
1014 | + $emails[] = $_POST[$mod.$widget_id.'emailAddress'.$count]; |
|
1015 | 1015 | $count++; |
1016 | 1016 | } |
1017 | 1017 | |
1018 | - if($count == 0) { |
|
1018 | + if ($count == 0) { |
|
1019 | 1019 | return ""; |
1020 | 1020 | } |
1021 | 1021 | |
1022 | - if(isset($_POST[$mod . $widget_id . 'emailAddressOptOutFlag'])) { |
|
1023 | - foreach($_POST[$mod . $widget_id . 'emailAddressOptOutFlag'] as $v) { |
|
1022 | + if (isset($_POST[$mod.$widget_id.'emailAddressOptOutFlag'])) { |
|
1023 | + foreach ($_POST[$mod.$widget_id.'emailAddressOptOutFlag'] as $v) { |
|
1024 | 1024 | $optOut[] = $v; |
1025 | 1025 | } |
1026 | 1026 | } |
1027 | 1027 | |
1028 | - if(isset($_POST[$mod . $widget_id . 'emailAddressInvalidFlag'])) { |
|
1029 | - foreach($_POST[$mod . $widget_id . 'emailAddressInvalidFlag'] as $v) { |
|
1028 | + if (isset($_POST[$mod.$widget_id.'emailAddressInvalidFlag'])) { |
|
1029 | + foreach ($_POST[$mod.$widget_id.'emailAddressInvalidFlag'] as $v) { |
|
1030 | 1030 | $invalid[] = $v; |
1031 | 1031 | } |
1032 | 1032 | } |
1033 | 1033 | |
1034 | - if(isset($_POST[$mod . $widget_id . 'emailAddressReplyToFlag'])) { |
|
1035 | - foreach($_POST[$mod . $widget_id . 'emailAddressReplyToFlag'] as $v) { |
|
1034 | + if (isset($_POST[$mod.$widget_id.'emailAddressReplyToFlag'])) { |
|
1035 | + foreach ($_POST[$mod.$widget_id.'emailAddressReplyToFlag'] as $v) { |
|
1036 | 1036 | $replyTo[] = $v; |
1037 | 1037 | } |
1038 | 1038 | } |
1039 | 1039 | |
1040 | - if(isset($_POST[$mod . $widget_id . 'emailAddressDeleteFlag'])) { |
|
1041 | - foreach($_POST[$mod . $widget_id . 'emailAddressDeleteFlag'] as $v) { |
|
1040 | + if (isset($_POST[$mod.$widget_id.'emailAddressDeleteFlag'])) { |
|
1041 | + foreach ($_POST[$mod.$widget_id.'emailAddressDeleteFlag'] as $v) { |
|
1042 | 1042 | $delete[] = $v; |
1043 | 1043 | } |
1044 | 1044 | } |
1045 | 1045 | |
1046 | - while(isset($_POST[$mod . $widget_id . "emailAddressVerifiedValue" . $count])) { |
|
1047 | - $verified[] = $_POST[$mod . $widget_id . 'emailAddressVerifiedValue' . $count]; |
|
1046 | + while (isset($_POST[$mod.$widget_id."emailAddressVerifiedValue".$count])) { |
|
1047 | + $verified[] = $_POST[$mod.$widget_id.'emailAddressVerifiedValue'.$count]; |
|
1048 | 1048 | $count++; |
1049 | 1049 | } |
1050 | 1050 | |
@@ -1069,33 +1069,33 @@ discard block |
||
1069 | 1069 | $count = 0; |
1070 | 1070 | $mod = isset($focus) ? $focus->module_dir : ""; |
1071 | 1071 | |
1072 | - $widget_id = $_POST[$mod .'_email_widget_id']; |
|
1073 | - $get .= '&' . $mod . '_email_widget_id='. $widget_id; |
|
1072 | + $widget_id = $_POST[$mod.'_email_widget_id']; |
|
1073 | + $get .= '&'.$mod.'_email_widget_id='.$widget_id; |
|
1074 | 1074 | $get .= '&emailAddressWidget='.$_POST['emailAddressWidget']; |
1075 | 1075 | |
1076 | - while(isset($_REQUEST[$mod . $widget_id . 'emailAddress' . $count])) { |
|
1077 | - $get .= "&" . $mod . $widget_id . "emailAddress" . $count . "=" . urlencode($_REQUEST[$mod . $widget_id . 'emailAddress' . $count]); |
|
1076 | + while (isset($_REQUEST[$mod.$widget_id.'emailAddress'.$count])) { |
|
1077 | + $get .= "&".$mod.$widget_id."emailAddress".$count."=".urlencode($_REQUEST[$mod.$widget_id.'emailAddress'.$count]); |
|
1078 | 1078 | $count++; |
1079 | 1079 | } //while |
1080 | 1080 | |
1081 | - while(isset($_REQUEST[$mod . $widget_id . 'emailAddressVerifiedValue' . $count])) { |
|
1082 | - $get .= "&" . $mod . $widget_id . "emailAddressVerifiedValue" . $count . "=" . urlencode($_REQUEST[$mod . $widget_id . 'emailAddressVerifiedValue' . $count]); |
|
1081 | + while (isset($_REQUEST[$mod.$widget_id.'emailAddressVerifiedValue'.$count])) { |
|
1082 | + $get .= "&".$mod.$widget_id."emailAddressVerifiedValue".$count."=".urlencode($_REQUEST[$mod.$widget_id.'emailAddressVerifiedValue'.$count]); |
|
1083 | 1083 | $count++; |
1084 | 1084 | } //while |
1085 | 1085 | |
1086 | 1086 | $options = array('emailAddressPrimaryFlag', 'emailAddressOptOutFlag', 'emailAddressInvalidFlag', 'emailAddressDeleteFlag', 'emailAddressReplyToFlag'); |
1087 | 1087 | |
1088 | - foreach($options as $option) { |
|
1088 | + foreach ($options as $option) { |
|
1089 | 1089 | $count = 0; |
1090 | 1090 | $optionIdentifier = $mod.$widget_id.$option; |
1091 | - if(isset($_REQUEST[$optionIdentifier])) { |
|
1092 | - if(is_array($_REQUEST[$optionIdentifier])) { |
|
1093 | - foreach($_REQUEST[$optionIdentifier] as $optOut) { |
|
1094 | - $get .= "&" . $optionIdentifier . "[" . $count . "]=" . $optOut; |
|
1091 | + if (isset($_REQUEST[$optionIdentifier])) { |
|
1092 | + if (is_array($_REQUEST[$optionIdentifier])) { |
|
1093 | + foreach ($_REQUEST[$optionIdentifier] as $optOut) { |
|
1094 | + $get .= "&".$optionIdentifier."[".$count."]=".$optOut; |
|
1095 | 1095 | $count++; |
1096 | 1096 | } //foreach |
1097 | 1097 | } else { |
1098 | - $get .= "&" . $optionIdentifier . "=" . $_REQUEST[$optionIdentifier]; |
|
1098 | + $get .= "&".$optionIdentifier."=".$_REQUEST[$optionIdentifier]; |
|
1099 | 1099 | } |
1100 | 1100 | } //if |
1101 | 1101 | } //foreach |
@@ -1113,7 +1113,7 @@ discard block |
||
1113 | 1113 | * @return string The value for the bean_module column in the email_addr_bean_rel table |
1114 | 1114 | */ |
1115 | 1115 | function getCorrectedModule(&$module) { |
1116 | - return ($module == "Employees")? "Users" : $module; |
|
1116 | + return ($module == "Employees") ? "Users" : $module; |
|
1117 | 1117 | } |
1118 | 1118 | |
1119 | 1119 | public function stash($parentBeanId, $moduleName) |
@@ -1123,7 +1123,7 @@ discard block |
||
1123 | 1123 | $ids = array(); |
1124 | 1124 | while ($row = $this->db->fetchByAssoc($result, false)) |
1125 | 1125 | { |
1126 | - $ids[] =$this->db->quote($row['email_address_id']); // avoid 2nd order SQL Injection |
|
1126 | + $ids[] = $this->db->quote($row['email_address_id']); // avoid 2nd order SQL Injection |
|
1127 | 1127 | } |
1128 | 1128 | if (!empty($ids)) |
1129 | 1129 | { |
@@ -1147,15 +1147,15 @@ discard block |
||
1147 | 1147 | * @param string $view DetailView or EditView |
1148 | 1148 | * @return string |
1149 | 1149 | */ |
1150 | -function getEmailAddressWidget($focus, $field, $value, $view, $tabindex='0') { |
|
1150 | +function getEmailAddressWidget($focus, $field, $value, $view, $tabindex = '0') { |
|
1151 | 1151 | $sea = new SugarEmailAddress(); |
1152 | 1152 | $sea->setView($view); |
1153 | 1153 | |
1154 | - if($view == 'EditView' || $view == 'QuickCreate' || $view == 'ConvertLead') { |
|
1154 | + if ($view == 'EditView' || $view == 'QuickCreate' || $view == 'ConvertLead') { |
|
1155 | 1155 | $module = $focus->module_dir; |
1156 | 1156 | if ($view == 'ConvertLead' && $module == "Contacts") $module = "Leads"; |
1157 | 1157 | |
1158 | - return $sea->getEmailAddressWidgetEditView($focus->id, $module, false,'',$tabindex); |
|
1158 | + return $sea->getEmailAddressWidgetEditView($focus->id, $module, false, '', $tabindex); |
|
1159 | 1159 | } |
1160 | 1160 | |
1161 | 1161 | return $sea->getEmailAddressWidgetDetailView($focus); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $temp = tempnam($dir, 'temp'); |
187 | 187 | |
188 | 188 | if (!($f = @fopen($temp, $mode))) { |
189 | - $temp = $dir . DIRECTORY_SEPARATOR . uniqid('temp'); |
|
189 | + $temp = $dir.DIRECTORY_SEPARATOR.uniqid('temp'); |
|
190 | 190 | if (!($f = @fopen($temp, $mode))) { |
191 | 191 | trigger_error("sugar_file_put_contents_atomic() : error writing temporary file '$temp'", E_USER_WARNING); |
192 | 192 | |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | } |
394 | 394 | if (!is_windows()) { |
395 | 395 | $conf_inst = SugarConfig::getInstance(); |
396 | - $mode = $conf_inst->get('default_permissions.' . $key, $mode); |
|
396 | + $mode = $conf_inst->get('default_permissions.'.$key, $mode); |
|
397 | 397 | } |
398 | 398 | |
399 | 399 | return $mode; |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -48,11 +48,11 @@ discard block |
||
48 | 48 | $id = $layout_def['focus']->id; |
49 | 49 | $module = $layout_def['focus']->module_name; |
50 | 50 | |
51 | - $href = "index.php?module=$module&action=WizardMarketing&campaign_id=$id" . (!empty($layout_def['func']) ? '&func=' . $layout_def['func'] : ''); |
|
51 | + $href = "index.php?module=$module&action=WizardMarketing&campaign_id=$id".(!empty($layout_def['func']) ? '&func='.$layout_def['func'] : ''); |
|
52 | 52 | |
53 | 53 | $label = $app_strings['LBL_CREATE_BUTTON_LABEL']; |
54 | 54 | |
55 | - return '<a onclick="location.href=\'' . $href . '\';">' . $label . '</a>'; |
|
55 | + return '<a onclick="location.href=\''.$href.'\';">'.$label.'</a>'; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | } |
59 | 59 | \ No newline at end of file |
@@ -2,68 +2,68 @@ discard block |
||
2 | 2 | |
3 | 3 | class ContactTest extends PHPUnit_Framework_TestCase { |
4 | 4 | |
5 | - public function testContact() { |
|
5 | + public function testContact() { |
|
6 | 6 | |
7 | - //execute the contructor and check for the Object type and attributes |
|
8 | - $contact = new Contact(); |
|
9 | - $this->assertInstanceOf('Contact',$contact); |
|
10 | - $this->assertInstanceOf('Person',$contact); |
|
11 | - $this->assertInstanceOf('SugarBean',$contact); |
|
7 | + //execute the contructor and check for the Object type and attributes |
|
8 | + $contact = new Contact(); |
|
9 | + $this->assertInstanceOf('Contact',$contact); |
|
10 | + $this->assertInstanceOf('Person',$contact); |
|
11 | + $this->assertInstanceOf('SugarBean',$contact); |
|
12 | 12 | |
13 | - $this->assertAttributeEquals('Contacts', 'module_dir', $contact); |
|
14 | - $this->assertAttributeEquals('Contact', 'object_name', $contact); |
|
15 | - $this->assertAttributeEquals('contacts', 'table_name', $contact); |
|
16 | - $this->assertAttributeEquals('accounts_contacts', 'rel_account_table', $contact); |
|
17 | - $this->assertAttributeEquals('opportunities_contacts', 'rel_opportunity_table', $contact); |
|
18 | - $this->assertAttributeEquals(true, 'importable', $contact); |
|
19 | - $this->assertAttributeEquals(true, 'new_schema', $contact); |
|
13 | + $this->assertAttributeEquals('Contacts', 'module_dir', $contact); |
|
14 | + $this->assertAttributeEquals('Contact', 'object_name', $contact); |
|
15 | + $this->assertAttributeEquals('contacts', 'table_name', $contact); |
|
16 | + $this->assertAttributeEquals('accounts_contacts', 'rel_account_table', $contact); |
|
17 | + $this->assertAttributeEquals('opportunities_contacts', 'rel_opportunity_table', $contact); |
|
18 | + $this->assertAttributeEquals(true, 'importable', $contact); |
|
19 | + $this->assertAttributeEquals(true, 'new_schema', $contact); |
|
20 | 20 | |
21 | - } |
|
21 | + } |
|
22 | 22 | |
23 | - public function testadd_list_count_joins() |
|
24 | - { |
|
25 | - error_reporting(E_ERROR | E_PARSE); |
|
23 | + public function testadd_list_count_joins() |
|
24 | + { |
|
25 | + error_reporting(E_ERROR | E_PARSE); |
|
26 | 26 | |
27 | - $contact = new Contact(); |
|
27 | + $contact = new Contact(); |
|
28 | 28 | |
29 | - //test with empty strings |
|
30 | - $query = ""; |
|
31 | - $contact->add_list_count_joins($query, ''); |
|
32 | - $this->assertEquals(" LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c ",$query); |
|
29 | + //test with empty strings |
|
30 | + $query = ""; |
|
31 | + $contact->add_list_count_joins($query, ''); |
|
32 | + $this->assertEquals(" LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c ",$query); |
|
33 | 33 | |
34 | 34 | |
35 | - //test with valid string |
|
36 | - $query = ""; |
|
37 | - $expected = "\n LEFT JOIN accounts_contacts\n ON contacts.id=accounts_contacts.contact_id\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id\n LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c "; |
|
38 | - $contact->add_list_count_joins($query, 'accounts.name'); |
|
39 | - $query = preg_replace('/\s+/', '', $query); |
|
40 | - $expected =preg_replace('/\s+/', '', $expected); |
|
41 | - $this->assertSame($expected,$query); |
|
35 | + //test with valid string |
|
36 | + $query = ""; |
|
37 | + $expected = "\n LEFT JOIN accounts_contacts\n ON contacts.id=accounts_contacts.contact_id\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id\n LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c "; |
|
38 | + $contact->add_list_count_joins($query, 'accounts.name'); |
|
39 | + $query = preg_replace('/\s+/', '', $query); |
|
40 | + $expected =preg_replace('/\s+/', '', $expected); |
|
41 | + $this->assertSame($expected,$query); |
|
42 | 42 | |
43 | - //test with valid string |
|
44 | - $query = ""; |
|
45 | - $expected = "\n LEFT JOIN accounts_contacts\n ON contacts.id=accounts_contacts.contact_id\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id\n LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c "; |
|
46 | - $contact->add_list_count_joins($query, 'contacts.name'); |
|
47 | - $this->assertSame(" LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c ",$query); |
|
43 | + //test with valid string |
|
44 | + $query = ""; |
|
45 | + $expected = "\n LEFT JOIN accounts_contacts\n ON contacts.id=accounts_contacts.contact_id\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id\n LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c "; |
|
46 | + $contact->add_list_count_joins($query, 'contacts.name'); |
|
47 | + $this->assertSame(" LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c ",$query); |
|
48 | 48 | |
49 | 49 | |
50 | - } |
|
50 | + } |
|
51 | 51 | |
52 | - public function testlistviewACLHelper() |
|
53 | - { |
|
54 | - $contact = new Contact(); |
|
52 | + public function testlistviewACLHelper() |
|
53 | + { |
|
54 | + $contact = new Contact(); |
|
55 | 55 | |
56 | - $expected = array( "MAIN"=>"a", "ACCOUNT"=>"a"); |
|
57 | - $actual = $contact->listviewACLHelper(); |
|
58 | - $this->assertSame($expected,$actual); |
|
56 | + $expected = array( "MAIN"=>"a", "ACCOUNT"=>"a"); |
|
57 | + $actual = $contact->listviewACLHelper(); |
|
58 | + $this->assertSame($expected,$actual); |
|
59 | 59 | |
60 | - } |
|
60 | + } |
|
61 | 61 | |
62 | 62 | /** |
63 | 63 | * @todo: NEEDS FIXING! |
64 | 64 | */ |
65 | - public function testcreate_new_list_query() |
|
66 | - { |
|
65 | + public function testcreate_new_list_query() |
|
66 | + { |
|
67 | 67 | /* |
68 | 68 | $contact = new Contact(); |
69 | 69 | |
@@ -79,239 +79,239 @@ discard block |
||
79 | 79 | $this->assertSame($expected,$actual); |
80 | 80 | */ |
81 | 81 | $this->assertTrue(true, "NEEDS FIXING!"); |
82 | - } |
|
82 | + } |
|
83 | 83 | |
84 | 84 | |
85 | - public function testaddress_popup_create_new_list_query() |
|
86 | - { |
|
85 | + public function testaddress_popup_create_new_list_query() |
|
86 | + { |
|
87 | 87 | |
88 | - $contact = new Contact(); |
|
88 | + $contact = new Contact(); |
|
89 | 89 | |
90 | - //test with empty string params |
|
91 | - $expected = "SELECT LTRIM(RTRIM(CONCAT(IFNULL(contacts.first_name,''),'',IFNULL(contacts.last_name,'')))) name, \n contacts.*,\n accounts.name as account_name,\n accounts.id as account_id,\n accounts.assigned_user_id account_id_owner,\n users.user_name as assigned_user_name ,contacts_cstm.*\n FROM contacts LEFT JOIN users\n ON contacts.assigned_user_id=users.id\n LEFT JOIN accounts_contacts\n ON contacts.id=accounts_contacts.contact_id and accounts_contacts.deleted = 0\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id AND accounts.deleted=0 LEFT JOIN email_addr_bean_rel eabl ON eabl.bean_id = contacts.id AND eabl.bean_module = 'Contacts' and eabl.primary_address = 1 and eabl.deleted=0 LEFT JOIN email_addresses ea ON (ea.id = eabl.email_address_id) LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c where contacts.deleted=0 "; |
|
92 | - $actual = $contact->address_popup_create_new_list_query('',''); |
|
93 | - $this->assertSame($expected,$actual); |
|
90 | + //test with empty string params |
|
91 | + $expected = "SELECT LTRIM(RTRIM(CONCAT(IFNULL(contacts.first_name,''),'',IFNULL(contacts.last_name,'')))) name, \n contacts.*,\n accounts.name as account_name,\n accounts.id as account_id,\n accounts.assigned_user_id account_id_owner,\n users.user_name as assigned_user_name ,contacts_cstm.*\n FROM contacts LEFT JOIN users\n ON contacts.assigned_user_id=users.id\n LEFT JOIN accounts_contacts\n ON contacts.id=accounts_contacts.contact_id and accounts_contacts.deleted = 0\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id AND accounts.deleted=0 LEFT JOIN email_addr_bean_rel eabl ON eabl.bean_id = contacts.id AND eabl.bean_module = 'Contacts' and eabl.primary_address = 1 and eabl.deleted=0 LEFT JOIN email_addresses ea ON (ea.id = eabl.email_address_id) LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c where contacts.deleted=0 "; |
|
92 | + $actual = $contact->address_popup_create_new_list_query('',''); |
|
93 | + $this->assertSame($expected,$actual); |
|
94 | 94 | |
95 | 95 | |
96 | - //test with valid string params |
|
97 | - $expected = "SELECT LTRIM(RTRIM(CONCAT(IFNULL(contacts.first_name,''),'',IFNULL(contacts.last_name,'')))) name, \n contacts.*,\n accounts.name as account_name,\n accounts.id as account_id,\n accounts.assigned_user_id account_id_owner,\n users.user_name as assigned_user_name ,contacts_cstm.*\n FROM contacts LEFT JOIN users\n ON contacts.assigned_user_id=users.id\n LEFT JOIN accounts_contacts\n ON contacts.id=accounts_contacts.contact_id and accounts_contacts.deleted = 0\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id AND accounts.deleted=0 LEFT JOIN email_addr_bean_rel eabl ON eabl.bean_id = contacts.id AND eabl.bean_module = 'Contacts' and eabl.primary_address = 1 and eabl.deleted=0 LEFT JOIN email_addresses ea ON (ea.id = eabl.email_address_id) LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c where (contacts.name=\"\") AND contacts.deleted=0 "; |
|
98 | - $actual = $contact->address_popup_create_new_list_query('contacts.id','contacts.name=""'); |
|
99 | - $this->assertSame($expected,$actual); |
|
96 | + //test with valid string params |
|
97 | + $expected = "SELECT LTRIM(RTRIM(CONCAT(IFNULL(contacts.first_name,''),'',IFNULL(contacts.last_name,'')))) name, \n contacts.*,\n accounts.name as account_name,\n accounts.id as account_id,\n accounts.assigned_user_id account_id_owner,\n users.user_name as assigned_user_name ,contacts_cstm.*\n FROM contacts LEFT JOIN users\n ON contacts.assigned_user_id=users.id\n LEFT JOIN accounts_contacts\n ON contacts.id=accounts_contacts.contact_id and accounts_contacts.deleted = 0\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id AND accounts.deleted=0 LEFT JOIN email_addr_bean_rel eabl ON eabl.bean_id = contacts.id AND eabl.bean_module = 'Contacts' and eabl.primary_address = 1 and eabl.deleted=0 LEFT JOIN email_addresses ea ON (ea.id = eabl.email_address_id) LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c where (contacts.name=\"\") AND contacts.deleted=0 "; |
|
98 | + $actual = $contact->address_popup_create_new_list_query('contacts.id','contacts.name=""'); |
|
99 | + $this->assertSame($expected,$actual); |
|
100 | 100 | |
101 | - } |
|
101 | + } |
|
102 | 102 | |
103 | - public function testcreate_export_query() |
|
104 | - { |
|
105 | - $contact = new Contact(); |
|
103 | + public function testcreate_export_query() |
|
104 | + { |
|
105 | + $contact = new Contact(); |
|
106 | 106 | |
107 | - //test with empty string params |
|
108 | - $expected = "SELECT\n contacts.*,\n email_addresses.email_address email_address,\n '' email_addresses_non_primary, accounts.name as account_name,\n users.user_name as assigned_user_name ,contacts_cstm.jjwg_maps_lng_c,contacts_cstm.jjwg_maps_lat_c,contacts_cstm.jjwg_maps_geocode_status_c,contacts_cstm.jjwg_maps_address_c FROM contacts LEFT JOIN users\n ON contacts.assigned_user_id=users.id LEFT JOIN accounts_contacts\n ON ( contacts.id=accounts_contacts.contact_id and (accounts_contacts.deleted is null or accounts_contacts.deleted = 0))\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id LEFT JOIN email_addr_bean_rel on contacts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module='Contacts' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c where ( accounts.deleted IS NULL OR accounts.deleted=0 )\n AND contacts.deleted=0 "; |
|
109 | - $actual = $contact->create_export_query('',''); |
|
110 | - $this->assertSame($expected,$actual); |
|
107 | + //test with empty string params |
|
108 | + $expected = "SELECT\n contacts.*,\n email_addresses.email_address email_address,\n '' email_addresses_non_primary, accounts.name as account_name,\n users.user_name as assigned_user_name ,contacts_cstm.jjwg_maps_lng_c,contacts_cstm.jjwg_maps_lat_c,contacts_cstm.jjwg_maps_geocode_status_c,contacts_cstm.jjwg_maps_address_c FROM contacts LEFT JOIN users\n ON contacts.assigned_user_id=users.id LEFT JOIN accounts_contacts\n ON ( contacts.id=accounts_contacts.contact_id and (accounts_contacts.deleted is null or accounts_contacts.deleted = 0))\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id LEFT JOIN email_addr_bean_rel on contacts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module='Contacts' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c where ( accounts.deleted IS NULL OR accounts.deleted=0 )\n AND contacts.deleted=0 "; |
|
109 | + $actual = $contact->create_export_query('',''); |
|
110 | + $this->assertSame($expected,$actual); |
|
111 | 111 | |
112 | 112 | |
113 | - //test with valid string params |
|
114 | - $expected = "SELECT\n contacts.*,\n email_addresses.email_address email_address,\n '' email_addresses_non_primary, accounts.name as account_name,\n users.user_name as assigned_user_name ,contacts_cstm.jjwg_maps_lng_c,contacts_cstm.jjwg_maps_lat_c,contacts_cstm.jjwg_maps_geocode_status_c,contacts_cstm.jjwg_maps_address_c FROM contacts LEFT JOIN users\n ON contacts.assigned_user_id=users.id LEFT JOIN accounts_contacts\n ON ( contacts.id=accounts_contacts.contact_id and (accounts_contacts.deleted is null or accounts_contacts.deleted = 0))\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id LEFT JOIN email_addr_bean_rel on contacts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module='Contacts' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c where (contacts.name=\"\") AND ( accounts.deleted IS NULL OR accounts.deleted=0 )\n AND contacts.deleted=0 "; |
|
115 | - $actual = $contact->create_export_query('contacts.id','contacts.name=""'); |
|
116 | - $this->assertSame($expected,$actual); |
|
113 | + //test with valid string params |
|
114 | + $expected = "SELECT\n contacts.*,\n email_addresses.email_address email_address,\n '' email_addresses_non_primary, accounts.name as account_name,\n users.user_name as assigned_user_name ,contacts_cstm.jjwg_maps_lng_c,contacts_cstm.jjwg_maps_lat_c,contacts_cstm.jjwg_maps_geocode_status_c,contacts_cstm.jjwg_maps_address_c FROM contacts LEFT JOIN users\n ON contacts.assigned_user_id=users.id LEFT JOIN accounts_contacts\n ON ( contacts.id=accounts_contacts.contact_id and (accounts_contacts.deleted is null or accounts_contacts.deleted = 0))\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id LEFT JOIN email_addr_bean_rel on contacts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module='Contacts' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c where (contacts.name=\"\") AND ( accounts.deleted IS NULL OR accounts.deleted=0 )\n AND contacts.deleted=0 "; |
|
115 | + $actual = $contact->create_export_query('contacts.id','contacts.name=""'); |
|
116 | + $this->assertSame($expected,$actual); |
|
117 | 117 | |
118 | - } |
|
118 | + } |
|
119 | 119 | |
120 | - public function testfill_in_additional_list_fields() { |
|
120 | + public function testfill_in_additional_list_fields() { |
|
121 | 121 | |
122 | - $contact = new Contact(); |
|
122 | + $contact = new Contact(); |
|
123 | 123 | |
124 | - //test with attributes preset and verify attributes are set accordingly |
|
125 | - $contact->first_name = "firstn"; |
|
126 | - $contact->last_name = "lastn"; |
|
127 | - $contact->email1 = "[email protected]"; |
|
128 | - $contact->email2 = "[email protected]"; |
|
124 | + //test with attributes preset and verify attributes are set accordingly |
|
125 | + $contact->first_name = "firstn"; |
|
126 | + $contact->last_name = "lastn"; |
|
127 | + $contact->email1 = "[email protected]"; |
|
128 | + $contact->email2 = "[email protected]"; |
|
129 | 129 | |
130 | 130 | |
131 | - $contact->fill_in_additional_list_fields(); |
|
131 | + $contact->fill_in_additional_list_fields(); |
|
132 | 132 | |
133 | - $this->assertEquals("firstn lastn",$contact->full_name); |
|
134 | - $this->assertEquals("firstn lastn <[email protected]>",$contact->email_and_name1); |
|
135 | - $this->assertEquals("firstn lastn <[email protected]>",$contact->email_and_name2); |
|
133 | + $this->assertEquals("firstn lastn",$contact->full_name); |
|
134 | + $this->assertEquals("firstn lastn <[email protected]>",$contact->email_and_name1); |
|
135 | + $this->assertEquals("firstn lastn <[email protected]>",$contact->email_and_name2); |
|
136 | 136 | |
137 | - } |
|
137 | + } |
|
138 | 138 | |
139 | - public function testfill_in_additional_detail_fields() { |
|
139 | + public function testfill_in_additional_detail_fields() { |
|
140 | 140 | |
141 | - $contact = new Contact(); |
|
141 | + $contact = new Contact(); |
|
142 | 142 | |
143 | - //test with attributes preset and verify attributes are set accordingly |
|
144 | - $contact->id = "1"; |
|
143 | + //test with attributes preset and verify attributes are set accordingly |
|
144 | + $contact->id = "1"; |
|
145 | 145 | |
146 | - $contact->fill_in_additional_detail_fields(); |
|
146 | + $contact->fill_in_additional_detail_fields(); |
|
147 | 147 | |
148 | - $this->assertEquals("",$contact->account_name); |
|
149 | - $this->assertEquals("",$contact->account_id); |
|
150 | - $this->assertEquals("",$contact->report_to_name); |
|
148 | + $this->assertEquals("",$contact->account_name); |
|
149 | + $this->assertEquals("",$contact->account_id); |
|
150 | + $this->assertEquals("",$contact->report_to_name); |
|
151 | 151 | |
152 | - } |
|
152 | + } |
|
153 | 153 | |
154 | 154 | |
155 | - public function testload_contacts_users_relationship(){ |
|
155 | + public function testload_contacts_users_relationship(){ |
|
156 | 156 | |
157 | - $contact = new Contact(); |
|
157 | + $contact = new Contact(); |
|
158 | 158 | |
159 | - //execute the method and test if it works and does not throws an exception. |
|
160 | - try { |
|
161 | - $contact->load_contacts_users_relationship(); |
|
162 | - $this->assertTrue(true); |
|
163 | - } |
|
164 | - catch (Exception $e) { |
|
165 | - $this->fail(); |
|
166 | - } |
|
159 | + //execute the method and test if it works and does not throws an exception. |
|
160 | + try { |
|
161 | + $contact->load_contacts_users_relationship(); |
|
162 | + $this->assertTrue(true); |
|
163 | + } |
|
164 | + catch (Exception $e) { |
|
165 | + $this->fail(); |
|
166 | + } |
|
167 | 167 | |
168 | - } |
|
168 | + } |
|
169 | 169 | |
170 | - public function testget_list_view_data() { |
|
170 | + public function testget_list_view_data() { |
|
171 | 171 | |
172 | - $contact = new Contact(); |
|
172 | + $contact = new Contact(); |
|
173 | 173 | |
174 | - //test with attributes preset and verify attributes are set accordingly |
|
175 | - $contact->first_name = "first"; |
|
176 | - $contact->last_name = "last"; |
|
177 | - |
|
178 | - $expected = array ( |
|
179 | - 'NAME' => 'first last', |
|
180 | - 'DELETED' => 0, |
|
181 | - 'FIRST_NAME' => 'first', |
|
182 | - 'LAST_NAME' => 'last', |
|
183 | - 'FULL_NAME' => 'first last', |
|
184 | - 'DO_NOT_CALL' => '0', |
|
185 | - 'PORTAL_USER_TYPE' => 'Single user', |
|
186 | - 'ENCODED_NAME' => 'first last', |
|
187 | - 'EMAIL1' => '', |
|
188 | - 'EMAIL1_LINK' => '<a href=\'javascript:void(0);\' onclick=\'SUGAR.quickCompose.init({"fullComposeUrl":"contact_id=\\u0026parent_type=Contacts\\u0026parent_id=\\u0026parent_name=first+last\\u0026to_addrs_ids=\\u0026to_addrs_names=first+last\\u0026to_addrs_emails=\\u0026to_email_addrs=first+last%26nbsp%3B%26lt%3B%26gt%3B\\u0026return_module=Contacts\\u0026return_action=ListView\\u0026return_id=","composePackage":{"contact_id":"","parent_type":"Contacts","parent_id":"","parent_name":"first last","to_addrs_ids":"","to_addrs_names":"first last","to_addrs_emails":"","to_email_addrs":"first last \\u003C\\u003E","return_module":"Contacts","return_action":"ListView","return_id":""}});\' class=\'\'>', |
|
189 | - 'EMAIL_AND_NAME1' => 'first last <>', |
|
190 | - ); |
|
191 | - |
|
192 | - $actual = $contact->get_list_view_data(); |
|
193 | - //$this->assertSame($expected, $actual); |
|
194 | - $this->assertEquals($expected['NAME'], $actual['NAME']); |
|
195 | - $this->assertEquals($expected['FIRST_NAME'], $actual['FIRST_NAME']); |
|
196 | - $this->assertEquals($expected['LAST_NAME'], $actual['LAST_NAME']); |
|
197 | - $this->assertEquals($expected['FULL_NAME'], $actual['FULL_NAME']); |
|
198 | - $this->assertEquals($expected['ENCODED_NAME'], $actual['ENCODED_NAME']); |
|
199 | - $this->assertEquals($expected['EMAIL_AND_NAME1'], $actual['EMAIL_AND_NAME1']); |
|
200 | - |
|
201 | - } |
|
202 | - |
|
203 | - |
|
204 | - public function testbuild_generic_where_clause () |
|
205 | - { |
|
174 | + //test with attributes preset and verify attributes are set accordingly |
|
175 | + $contact->first_name = "first"; |
|
176 | + $contact->last_name = "last"; |
|
206 | 177 | |
207 | - $contact = new Contact(); |
|
178 | + $expected = array ( |
|
179 | + 'NAME' => 'first last', |
|
180 | + 'DELETED' => 0, |
|
181 | + 'FIRST_NAME' => 'first', |
|
182 | + 'LAST_NAME' => 'last', |
|
183 | + 'FULL_NAME' => 'first last', |
|
184 | + 'DO_NOT_CALL' => '0', |
|
185 | + 'PORTAL_USER_TYPE' => 'Single user', |
|
186 | + 'ENCODED_NAME' => 'first last', |
|
187 | + 'EMAIL1' => '', |
|
188 | + 'EMAIL1_LINK' => '<a href=\'javascript:void(0);\' onclick=\'SUGAR.quickCompose.init({"fullComposeUrl":"contact_id=\\u0026parent_type=Contacts\\u0026parent_id=\\u0026parent_name=first+last\\u0026to_addrs_ids=\\u0026to_addrs_names=first+last\\u0026to_addrs_emails=\\u0026to_email_addrs=first+last%26nbsp%3B%26lt%3B%26gt%3B\\u0026return_module=Contacts\\u0026return_action=ListView\\u0026return_id=","composePackage":{"contact_id":"","parent_type":"Contacts","parent_id":"","parent_name":"first last","to_addrs_ids":"","to_addrs_names":"first last","to_addrs_emails":"","to_email_addrs":"first last \\u003C\\u003E","return_module":"Contacts","return_action":"ListView","return_id":""}});\' class=\'\'>', |
|
189 | + 'EMAIL_AND_NAME1' => 'first last <>', |
|
190 | + ); |
|
208 | 191 | |
209 | - //test with string |
|
210 | - $expected = "contacts.last_name like 'test%' or contacts.first_name like 'test%' or accounts.name like 'test%' or contacts.assistant like 'test%' or ea.email_address like 'test%'"; |
|
211 | - $actual = $contact->build_generic_where_clause('test'); |
|
212 | - $this->assertSame($expected,$actual); |
|
192 | + $actual = $contact->get_list_view_data(); |
|
193 | + //$this->assertSame($expected, $actual); |
|
194 | + $this->assertEquals($expected['NAME'], $actual['NAME']); |
|
195 | + $this->assertEquals($expected['FIRST_NAME'], $actual['FIRST_NAME']); |
|
196 | + $this->assertEquals($expected['LAST_NAME'], $actual['LAST_NAME']); |
|
197 | + $this->assertEquals($expected['FULL_NAME'], $actual['FULL_NAME']); |
|
198 | + $this->assertEquals($expected['ENCODED_NAME'], $actual['ENCODED_NAME']); |
|
199 | + $this->assertEquals($expected['EMAIL_AND_NAME1'], $actual['EMAIL_AND_NAME1']); |
|
213 | 200 | |
201 | + } |
|
214 | 202 | |
215 | - //test with number |
|
216 | - $expected = "contacts.last_name like '1%' or contacts.first_name like '1%' or accounts.name like '1%' or contacts.assistant like '1%' or ea.email_address like '1%' or contacts.phone_home like '%1%' or contacts.phone_mobile like '%1%' or contacts.phone_work like '%1%' or contacts.phone_other like '%1%' or contacts.phone_fax like '%1%' or contacts.assistant_phone like '%1%'"; |
|
217 | - $actual = $contact->build_generic_where_clause(1); |
|
218 | - $this->assertSame($expected,$actual); |
|
219 | 203 | |
220 | - } |
|
204 | + public function testbuild_generic_where_clause () |
|
205 | + { |
|
221 | 206 | |
222 | - public function testset_notification_body() |
|
223 | - { |
|
224 | - $contact = new Contact(); |
|
207 | + $contact = new Contact(); |
|
225 | 208 | |
226 | - //test with attributes preset and verify attributes are set accordingly |
|
227 | - $contact->first_name = "first"; |
|
228 | - $contact->last_name = "last"; |
|
229 | - $contact->description = "some text"; |
|
230 | - $contact->fill_in_additional_list_fields(); |
|
209 | + //test with string |
|
210 | + $expected = "contacts.last_name like 'test%' or contacts.first_name like 'test%' or accounts.name like 'test%' or contacts.assistant like 'test%' or ea.email_address like 'test%'"; |
|
211 | + $actual = $contact->build_generic_where_clause('test'); |
|
212 | + $this->assertSame($expected,$actual); |
|
231 | 213 | |
232 | - $result = $contact->set_notification_body(new Sugar_Smarty(), $contact); |
|
233 | 214 | |
234 | - $this->assertEquals($contact->full_name ,$result->_tpl_vars['CONTACT_NAME']); |
|
235 | - $this->assertEquals($contact->description ,$result->_tpl_vars['CONTACT_DESCRIPTION']); |
|
215 | + //test with number |
|
216 | + $expected = "contacts.last_name like '1%' or contacts.first_name like '1%' or accounts.name like '1%' or contacts.assistant like '1%' or ea.email_address like '1%' or contacts.phone_home like '%1%' or contacts.phone_mobile like '%1%' or contacts.phone_work like '%1%' or contacts.phone_other like '%1%' or contacts.phone_fax like '%1%' or contacts.assistant_phone like '%1%'"; |
|
217 | + $actual = $contact->build_generic_where_clause(1); |
|
218 | + $this->assertSame($expected,$actual); |
|
236 | 219 | |
237 | - } |
|
220 | + } |
|
238 | 221 | |
239 | - public function testget_contact_id_by_email() |
|
240 | - { |
|
241 | - $contact = new Contact(); |
|
222 | + public function testset_notification_body() |
|
223 | + { |
|
224 | + $contact = new Contact(); |
|
242 | 225 | |
243 | - $result = $contact->get_contact_id_by_email(""); |
|
244 | - $this->assertEquals(null,$result); |
|
226 | + //test with attributes preset and verify attributes are set accordingly |
|
227 | + $contact->first_name = "first"; |
|
228 | + $contact->last_name = "last"; |
|
229 | + $contact->description = "some text"; |
|
230 | + $contact->fill_in_additional_list_fields(); |
|
245 | 231 | |
232 | + $result = $contact->set_notification_body(new Sugar_Smarty(), $contact); |
|
246 | 233 | |
247 | - //$result = $contact->get_contact_id_by_email("[email protected]"); |
|
248 | - //$this->assertEquals(null,$result); |
|
234 | + $this->assertEquals($contact->full_name ,$result->_tpl_vars['CONTACT_NAME']); |
|
235 | + $this->assertEquals($contact->description ,$result->_tpl_vars['CONTACT_DESCRIPTION']); |
|
249 | 236 | |
250 | - $this->markTestSkipped('Invalid Columns(email1,email2) in Query '); |
|
237 | + } |
|
251 | 238 | |
252 | - } |
|
239 | + public function testget_contact_id_by_email() |
|
240 | + { |
|
241 | + $contact = new Contact(); |
|
253 | 242 | |
254 | - public function testsave_relationship_changes() { |
|
243 | + $result = $contact->get_contact_id_by_email(""); |
|
244 | + $this->assertEquals(null,$result); |
|
255 | 245 | |
256 | - $contact = new Contact(); |
|
257 | 246 | |
258 | - //execute the method and test if it works and does not throws an exception. |
|
259 | - try { |
|
260 | - $contact->save_relationship_changes(true); |
|
261 | - $contact->save_relationship_changes(false); |
|
262 | - $this->assertTrue(true); |
|
263 | - } |
|
264 | - catch (Exception $e) { |
|
265 | - $this->fail(); |
|
266 | - } |
|
247 | + //$result = $contact->get_contact_id_by_email("[email protected]"); |
|
248 | + //$this->assertEquals(null,$result); |
|
267 | 249 | |
268 | - } |
|
250 | + $this->markTestSkipped('Invalid Columns(email1,email2) in Query '); |
|
269 | 251 | |
270 | - public function testbean_implements() |
|
271 | - { |
|
272 | - $contact = new Contact(); |
|
273 | - $this->assertEquals(false, $contact->bean_implements('')); //test with blank value |
|
274 | - $this->assertEquals(false, $contact->bean_implements('test')); //test with invalid value |
|
275 | - $this->assertEquals(true, $contact->bean_implements('ACL')); //test with valid value |
|
276 | - } |
|
252 | + } |
|
277 | 253 | |
278 | - public function testget_unlinked_email_query() |
|
279 | - { |
|
280 | - $contact = new Contact(); |
|
254 | + public function testsave_relationship_changes() { |
|
281 | 255 | |
282 | - //execute the method and verify that it retunrs expected results |
|
283 | - $expected = "SELECT emails.id FROM emails JOIN (select DISTINCT email_id from emails_email_addr_rel eear\n\n join email_addr_bean_rel eabr on eabr.bean_id ='' and eabr.bean_module = 'Contacts' and\n eabr.email_address_id = eear.email_address_id and eabr.deleted=0\n where eear.deleted=0 and eear.email_id not in\n (select eb.email_id from emails_beans eb where eb.bean_module ='Contacts' and eb.bean_id = '')\n ) derivedemails on derivedemails.email_id = emails.id"; |
|
284 | - $actual = $contact->get_unlinked_email_query(); |
|
285 | - $this->assertSame($expected,$actual); |
|
256 | + $contact = new Contact(); |
|
257 | + |
|
258 | + //execute the method and test if it works and does not throws an exception. |
|
259 | + try { |
|
260 | + $contact->save_relationship_changes(true); |
|
261 | + $contact->save_relationship_changes(false); |
|
262 | + $this->assertTrue(true); |
|
263 | + } |
|
264 | + catch (Exception $e) { |
|
265 | + $this->fail(); |
|
266 | + } |
|
267 | + |
|
268 | + } |
|
269 | + |
|
270 | + public function testbean_implements() |
|
271 | + { |
|
272 | + $contact = new Contact(); |
|
273 | + $this->assertEquals(false, $contact->bean_implements('')); //test with blank value |
|
274 | + $this->assertEquals(false, $contact->bean_implements('test')); //test with invalid value |
|
275 | + $this->assertEquals(true, $contact->bean_implements('ACL')); //test with valid value |
|
276 | + } |
|
277 | + |
|
278 | + public function testget_unlinked_email_query() |
|
279 | + { |
|
280 | + $contact = new Contact(); |
|
281 | + |
|
282 | + //execute the method and verify that it retunrs expected results |
|
283 | + $expected = "SELECT emails.id FROM emails JOIN (select DISTINCT email_id from emails_email_addr_rel eear\n\n join email_addr_bean_rel eabr on eabr.bean_id ='' and eabr.bean_module = 'Contacts' and\n eabr.email_address_id = eear.email_address_id and eabr.deleted=0\n where eear.deleted=0 and eear.email_id not in\n (select eb.email_id from emails_beans eb where eb.bean_module ='Contacts' and eb.bean_id = '')\n ) derivedemails on derivedemails.email_id = emails.id"; |
|
284 | + $actual = $contact->get_unlinked_email_query(); |
|
285 | + $this->assertSame($expected,$actual); |
|
286 | 286 | |
287 | - } |
|
287 | + } |
|
288 | 288 | |
289 | 289 | |
290 | 290 | public function testprocess_sync_to_outlook() |
291 | 291 | { |
292 | - $contact = new Contact(); |
|
292 | + $contact = new Contact(); |
|
293 | 293 | |
294 | - //execute the method and test if it works and does not throws an exception. |
|
295 | - try { |
|
296 | - $contact->process_sync_to_outlook("all"); |
|
297 | - $this->assertTrue(true); |
|
298 | - } |
|
299 | - catch (Exception $e) { |
|
300 | - $this->fail(); |
|
301 | - } |
|
294 | + //execute the method and test if it works and does not throws an exception. |
|
295 | + try { |
|
296 | + $contact->process_sync_to_outlook("all"); |
|
297 | + $this->assertTrue(true); |
|
298 | + } |
|
299 | + catch (Exception $e) { |
|
300 | + $this->fail(); |
|
301 | + } |
|
302 | 302 | |
303 | 303 | |
304 | - //execute the method and test if it works and does not throws an exception. |
|
305 | - try { |
|
306 | - $contact->process_sync_to_outlook("1"); |
|
307 | - $this->assertTrue(true); |
|
308 | - } |
|
309 | - catch (Exception $e) { |
|
310 | - $this->fail(); |
|
311 | - } |
|
304 | + //execute the method and test if it works and does not throws an exception. |
|
305 | + try { |
|
306 | + $contact->process_sync_to_outlook("1"); |
|
307 | + $this->assertTrue(true); |
|
308 | + } |
|
309 | + catch (Exception $e) { |
|
310 | + $this->fail(); |
|
311 | + } |
|
312 | 312 | |
313 | 313 | |
314 | 314 | |
315 | - } |
|
315 | + } |
|
316 | 316 | |
317 | 317 | } |
@@ -6,9 +6,9 @@ discard block |
||
6 | 6 | |
7 | 7 | //execute the contructor and check for the Object type and attributes |
8 | 8 | $contact = new Contact(); |
9 | - $this->assertInstanceOf('Contact',$contact); |
|
10 | - $this->assertInstanceOf('Person',$contact); |
|
11 | - $this->assertInstanceOf('SugarBean',$contact); |
|
9 | + $this->assertInstanceOf('Contact', $contact); |
|
10 | + $this->assertInstanceOf('Person', $contact); |
|
11 | + $this->assertInstanceOf('SugarBean', $contact); |
|
12 | 12 | |
13 | 13 | $this->assertAttributeEquals('Contacts', 'module_dir', $contact); |
14 | 14 | $this->assertAttributeEquals('Contact', 'object_name', $contact); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | //test with empty strings |
30 | 30 | $query = ""; |
31 | 31 | $contact->add_list_count_joins($query, ''); |
32 | - $this->assertEquals(" LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c ",$query); |
|
32 | + $this->assertEquals(" LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c ", $query); |
|
33 | 33 | |
34 | 34 | |
35 | 35 | //test with valid string |
@@ -37,14 +37,14 @@ discard block |
||
37 | 37 | $expected = "\n LEFT JOIN accounts_contacts\n ON contacts.id=accounts_contacts.contact_id\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id\n LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c "; |
38 | 38 | $contact->add_list_count_joins($query, 'accounts.name'); |
39 | 39 | $query = preg_replace('/\s+/', '', $query); |
40 | - $expected =preg_replace('/\s+/', '', $expected); |
|
41 | - $this->assertSame($expected,$query); |
|
40 | + $expected = preg_replace('/\s+/', '', $expected); |
|
41 | + $this->assertSame($expected, $query); |
|
42 | 42 | |
43 | 43 | //test with valid string |
44 | 44 | $query = ""; |
45 | 45 | $expected = "\n LEFT JOIN accounts_contacts\n ON contacts.id=accounts_contacts.contact_id\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id\n LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c "; |
46 | 46 | $contact->add_list_count_joins($query, 'contacts.name'); |
47 | - $this->assertSame(" LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c ",$query); |
|
47 | + $this->assertSame(" LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c ", $query); |
|
48 | 48 | |
49 | 49 | |
50 | 50 | } |
@@ -53,9 +53,9 @@ discard block |
||
53 | 53 | { |
54 | 54 | $contact = new Contact(); |
55 | 55 | |
56 | - $expected = array( "MAIN"=>"a", "ACCOUNT"=>"a"); |
|
56 | + $expected = array("MAIN"=>"a", "ACCOUNT"=>"a"); |
|
57 | 57 | $actual = $contact->listviewACLHelper(); |
58 | - $this->assertSame($expected,$actual); |
|
58 | + $this->assertSame($expected, $actual); |
|
59 | 59 | |
60 | 60 | } |
61 | 61 | |
@@ -89,14 +89,14 @@ discard block |
||
89 | 89 | |
90 | 90 | //test with empty string params |
91 | 91 | $expected = "SELECT LTRIM(RTRIM(CONCAT(IFNULL(contacts.first_name,''),'',IFNULL(contacts.last_name,'')))) name, \n contacts.*,\n accounts.name as account_name,\n accounts.id as account_id,\n accounts.assigned_user_id account_id_owner,\n users.user_name as assigned_user_name ,contacts_cstm.*\n FROM contacts LEFT JOIN users\n ON contacts.assigned_user_id=users.id\n LEFT JOIN accounts_contacts\n ON contacts.id=accounts_contacts.contact_id and accounts_contacts.deleted = 0\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id AND accounts.deleted=0 LEFT JOIN email_addr_bean_rel eabl ON eabl.bean_id = contacts.id AND eabl.bean_module = 'Contacts' and eabl.primary_address = 1 and eabl.deleted=0 LEFT JOIN email_addresses ea ON (ea.id = eabl.email_address_id) LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c where contacts.deleted=0 "; |
92 | - $actual = $contact->address_popup_create_new_list_query('',''); |
|
93 | - $this->assertSame($expected,$actual); |
|
92 | + $actual = $contact->address_popup_create_new_list_query('', ''); |
|
93 | + $this->assertSame($expected, $actual); |
|
94 | 94 | |
95 | 95 | |
96 | 96 | //test with valid string params |
97 | 97 | $expected = "SELECT LTRIM(RTRIM(CONCAT(IFNULL(contacts.first_name,''),'',IFNULL(contacts.last_name,'')))) name, \n contacts.*,\n accounts.name as account_name,\n accounts.id as account_id,\n accounts.assigned_user_id account_id_owner,\n users.user_name as assigned_user_name ,contacts_cstm.*\n FROM contacts LEFT JOIN users\n ON contacts.assigned_user_id=users.id\n LEFT JOIN accounts_contacts\n ON contacts.id=accounts_contacts.contact_id and accounts_contacts.deleted = 0\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id AND accounts.deleted=0 LEFT JOIN email_addr_bean_rel eabl ON eabl.bean_id = contacts.id AND eabl.bean_module = 'Contacts' and eabl.primary_address = 1 and eabl.deleted=0 LEFT JOIN email_addresses ea ON (ea.id = eabl.email_address_id) LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c where (contacts.name=\"\") AND contacts.deleted=0 "; |
98 | - $actual = $contact->address_popup_create_new_list_query('contacts.id','contacts.name=""'); |
|
99 | - $this->assertSame($expected,$actual); |
|
98 | + $actual = $contact->address_popup_create_new_list_query('contacts.id', 'contacts.name=""'); |
|
99 | + $this->assertSame($expected, $actual); |
|
100 | 100 | |
101 | 101 | } |
102 | 102 | |
@@ -106,14 +106,14 @@ discard block |
||
106 | 106 | |
107 | 107 | //test with empty string params |
108 | 108 | $expected = "SELECT\n contacts.*,\n email_addresses.email_address email_address,\n '' email_addresses_non_primary, accounts.name as account_name,\n users.user_name as assigned_user_name ,contacts_cstm.jjwg_maps_lng_c,contacts_cstm.jjwg_maps_lat_c,contacts_cstm.jjwg_maps_geocode_status_c,contacts_cstm.jjwg_maps_address_c FROM contacts LEFT JOIN users\n ON contacts.assigned_user_id=users.id LEFT JOIN accounts_contacts\n ON ( contacts.id=accounts_contacts.contact_id and (accounts_contacts.deleted is null or accounts_contacts.deleted = 0))\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id LEFT JOIN email_addr_bean_rel on contacts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module='Contacts' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c where ( accounts.deleted IS NULL OR accounts.deleted=0 )\n AND contacts.deleted=0 "; |
109 | - $actual = $contact->create_export_query('',''); |
|
110 | - $this->assertSame($expected,$actual); |
|
109 | + $actual = $contact->create_export_query('', ''); |
|
110 | + $this->assertSame($expected, $actual); |
|
111 | 111 | |
112 | 112 | |
113 | 113 | //test with valid string params |
114 | 114 | $expected = "SELECT\n contacts.*,\n email_addresses.email_address email_address,\n '' email_addresses_non_primary, accounts.name as account_name,\n users.user_name as assigned_user_name ,contacts_cstm.jjwg_maps_lng_c,contacts_cstm.jjwg_maps_lat_c,contacts_cstm.jjwg_maps_geocode_status_c,contacts_cstm.jjwg_maps_address_c FROM contacts LEFT JOIN users\n ON contacts.assigned_user_id=users.id LEFT JOIN accounts_contacts\n ON ( contacts.id=accounts_contacts.contact_id and (accounts_contacts.deleted is null or accounts_contacts.deleted = 0))\n LEFT JOIN accounts\n ON accounts_contacts.account_id=accounts.id LEFT JOIN email_addr_bean_rel on contacts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module='Contacts' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c where (contacts.name=\"\") AND ( accounts.deleted IS NULL OR accounts.deleted=0 )\n AND contacts.deleted=0 "; |
115 | - $actual = $contact->create_export_query('contacts.id','contacts.name=""'); |
|
116 | - $this->assertSame($expected,$actual); |
|
115 | + $actual = $contact->create_export_query('contacts.id', 'contacts.name=""'); |
|
116 | + $this->assertSame($expected, $actual); |
|
117 | 117 | |
118 | 118 | } |
119 | 119 | |
@@ -130,9 +130,9 @@ discard block |
||
130 | 130 | |
131 | 131 | $contact->fill_in_additional_list_fields(); |
132 | 132 | |
133 | - $this->assertEquals("firstn lastn",$contact->full_name); |
|
134 | - $this->assertEquals("firstn lastn <[email protected]>",$contact->email_and_name1); |
|
135 | - $this->assertEquals("firstn lastn <[email protected]>",$contact->email_and_name2); |
|
133 | + $this->assertEquals("firstn lastn", $contact->full_name); |
|
134 | + $this->assertEquals("firstn lastn <[email protected]>", $contact->email_and_name1); |
|
135 | + $this->assertEquals("firstn lastn <[email protected]>", $contact->email_and_name2); |
|
136 | 136 | |
137 | 137 | } |
138 | 138 | |
@@ -145,14 +145,14 @@ discard block |
||
145 | 145 | |
146 | 146 | $contact->fill_in_additional_detail_fields(); |
147 | 147 | |
148 | - $this->assertEquals("",$contact->account_name); |
|
149 | - $this->assertEquals("",$contact->account_id); |
|
150 | - $this->assertEquals("",$contact->report_to_name); |
|
148 | + $this->assertEquals("", $contact->account_name); |
|
149 | + $this->assertEquals("", $contact->account_id); |
|
150 | + $this->assertEquals("", $contact->report_to_name); |
|
151 | 151 | |
152 | 152 | } |
153 | 153 | |
154 | 154 | |
155 | - public function testload_contacts_users_relationship(){ |
|
155 | + public function testload_contacts_users_relationship() { |
|
156 | 156 | |
157 | 157 | $contact = new Contact(); |
158 | 158 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $contact->first_name = "first"; |
176 | 176 | $contact->last_name = "last"; |
177 | 177 | |
178 | - $expected = array ( |
|
178 | + $expected = array( |
|
179 | 179 | 'NAME' => 'first last', |
180 | 180 | 'DELETED' => 0, |
181 | 181 | 'FIRST_NAME' => 'first', |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | } |
202 | 202 | |
203 | 203 | |
204 | - public function testbuild_generic_where_clause () |
|
204 | + public function testbuild_generic_where_clause() |
|
205 | 205 | { |
206 | 206 | |
207 | 207 | $contact = new Contact(); |
@@ -209,13 +209,13 @@ discard block |
||
209 | 209 | //test with string |
210 | 210 | $expected = "contacts.last_name like 'test%' or contacts.first_name like 'test%' or accounts.name like 'test%' or contacts.assistant like 'test%' or ea.email_address like 'test%'"; |
211 | 211 | $actual = $contact->build_generic_where_clause('test'); |
212 | - $this->assertSame($expected,$actual); |
|
212 | + $this->assertSame($expected, $actual); |
|
213 | 213 | |
214 | 214 | |
215 | 215 | //test with number |
216 | 216 | $expected = "contacts.last_name like '1%' or contacts.first_name like '1%' or accounts.name like '1%' or contacts.assistant like '1%' or ea.email_address like '1%' or contacts.phone_home like '%1%' or contacts.phone_mobile like '%1%' or contacts.phone_work like '%1%' or contacts.phone_other like '%1%' or contacts.phone_fax like '%1%' or contacts.assistant_phone like '%1%'"; |
217 | 217 | $actual = $contact->build_generic_where_clause(1); |
218 | - $this->assertSame($expected,$actual); |
|
218 | + $this->assertSame($expected, $actual); |
|
219 | 219 | |
220 | 220 | } |
221 | 221 | |
@@ -231,8 +231,8 @@ discard block |
||
231 | 231 | |
232 | 232 | $result = $contact->set_notification_body(new Sugar_Smarty(), $contact); |
233 | 233 | |
234 | - $this->assertEquals($contact->full_name ,$result->_tpl_vars['CONTACT_NAME']); |
|
235 | - $this->assertEquals($contact->description ,$result->_tpl_vars['CONTACT_DESCRIPTION']); |
|
234 | + $this->assertEquals($contact->full_name, $result->_tpl_vars['CONTACT_NAME']); |
|
235 | + $this->assertEquals($contact->description, $result->_tpl_vars['CONTACT_DESCRIPTION']); |
|
236 | 236 | |
237 | 237 | } |
238 | 238 | |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | $contact = new Contact(); |
242 | 242 | |
243 | 243 | $result = $contact->get_contact_id_by_email(""); |
244 | - $this->assertEquals(null,$result); |
|
244 | + $this->assertEquals(null, $result); |
|
245 | 245 | |
246 | 246 | |
247 | 247 | //$result = $contact->get_contact_id_by_email("[email protected]"); |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | //execute the method and verify that it retunrs expected results |
283 | 283 | $expected = "SELECT emails.id FROM emails JOIN (select DISTINCT email_id from emails_email_addr_rel eear\n\n join email_addr_bean_rel eabr on eabr.bean_id ='' and eabr.bean_module = 'Contacts' and\n eabr.email_address_id = eear.email_address_id and eabr.deleted=0\n where eear.deleted=0 and eear.email_id not in\n (select eb.email_id from emails_beans eb where eb.bean_module ='Contacts' and eb.bean_id = '')\n ) derivedemails on derivedemails.email_id = emails.id"; |
284 | 284 | $actual = $contact->get_unlinked_email_query(); |
285 | - $this->assertSame($expected,$actual); |
|
285 | + $this->assertSame($expected, $actual); |
|
286 | 286 | |
287 | 287 | } |
288 | 288 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $output = $me->jsParser(); |
36 | 36 | |
37 | 37 | return $output; |
38 | - } catch (Exception $e) { |
|
38 | + }catch (Exception $e) { |
|
39 | 39 | // Exception handling is left up to the implementer. |
40 | 40 | throw $e; |
41 | 41 | } |
@@ -3,102 +3,102 @@ discard block |
||
3 | 3 | class LeadTest extends PHPUnit_Framework_TestCase { |
4 | 4 | |
5 | 5 | |
6 | - public function testLead() |
|
7 | - { |
|
6 | + public function testLead() |
|
7 | + { |
|
8 | 8 | |
9 | - //execute the contructor and check for the Object type and attributes |
|
10 | - $lead = new Lead(); |
|
9 | + //execute the contructor and check for the Object type and attributes |
|
10 | + $lead = new Lead(); |
|
11 | 11 | |
12 | - $this->assertInstanceOf('Lead',$lead); |
|
13 | - $this->assertInstanceOf('Person',$lead); |
|
14 | - $this->assertInstanceOf('SugarBean',$lead); |
|
12 | + $this->assertInstanceOf('Lead',$lead); |
|
13 | + $this->assertInstanceOf('Person',$lead); |
|
14 | + $this->assertInstanceOf('SugarBean',$lead); |
|
15 | 15 | |
16 | - $this->assertAttributeEquals('Leads', 'module_dir', $lead); |
|
17 | - $this->assertAttributeEquals('Lead', 'object_name', $lead); |
|
18 | - $this->assertAttributeEquals('Leads', 'object_names', $lead); |
|
19 | - $this->assertAttributeEquals('leads', 'table_name', $lead); |
|
16 | + $this->assertAttributeEquals('Leads', 'module_dir', $lead); |
|
17 | + $this->assertAttributeEquals('Lead', 'object_name', $lead); |
|
18 | + $this->assertAttributeEquals('Leads', 'object_names', $lead); |
|
19 | + $this->assertAttributeEquals('leads', 'table_name', $lead); |
|
20 | 20 | |
21 | - $this->assertAttributeEquals(true, 'new_schema', $lead); |
|
22 | - $this->assertAttributeEquals(true, 'importable', $lead); |
|
21 | + $this->assertAttributeEquals(true, 'new_schema', $lead); |
|
22 | + $this->assertAttributeEquals(true, 'importable', $lead); |
|
23 | 23 | |
24 | - } |
|
24 | + } |
|
25 | 25 | |
26 | - public function testget_account() |
|
27 | - { |
|
28 | - error_reporting(E_ERROR | E_PARSE); |
|
26 | + public function testget_account() |
|
27 | + { |
|
28 | + error_reporting(E_ERROR | E_PARSE); |
|
29 | 29 | |
30 | - $lead = new Lead(); |
|
30 | + $lead = new Lead(); |
|
31 | 31 | |
32 | - //test without pre settting attributes |
|
33 | - $result = $lead->get_account(); |
|
34 | - $this->assertEquals(null,$result); |
|
32 | + //test without pre settting attributes |
|
33 | + $result = $lead->get_account(); |
|
34 | + $this->assertEquals(null,$result); |
|
35 | 35 | |
36 | 36 | |
37 | - //test with required attributes preset |
|
38 | - $lead->account_id =1; |
|
39 | - $result = $lead->get_account(); |
|
40 | - $this->assertEquals(null,$result); |
|
37 | + //test with required attributes preset |
|
38 | + $lead->account_id =1; |
|
39 | + $result = $lead->get_account(); |
|
40 | + $this->assertEquals(null,$result); |
|
41 | 41 | |
42 | 42 | |
43 | - } |
|
43 | + } |
|
44 | 44 | |
45 | - public function testget_opportunity() |
|
46 | - { |
|
45 | + public function testget_opportunity() |
|
46 | + { |
|
47 | 47 | |
48 | - $lead = new Lead(); |
|
48 | + $lead = new Lead(); |
|
49 | 49 | |
50 | - //test without pre settting attributes |
|
51 | - $result = $lead->get_opportunity(); |
|
52 | - $this->assertEquals(null,$result); |
|
50 | + //test without pre settting attributes |
|
51 | + $result = $lead->get_opportunity(); |
|
52 | + $this->assertEquals(null,$result); |
|
53 | 53 | |
54 | 54 | |
55 | - //test with required attributes preset |
|
56 | - $lead->opportunity_id =1; |
|
57 | - $result = $lead->get_opportunity(); |
|
58 | - $this->assertEquals(null,$result); |
|
55 | + //test with required attributes preset |
|
56 | + $lead->opportunity_id =1; |
|
57 | + $result = $lead->get_opportunity(); |
|
58 | + $this->assertEquals(null,$result); |
|
59 | 59 | |
60 | - } |
|
60 | + } |
|
61 | 61 | |
62 | - public function testget_contact() |
|
63 | - { |
|
62 | + public function testget_contact() |
|
63 | + { |
|
64 | 64 | |
65 | - $lead = new Lead(); |
|
65 | + $lead = new Lead(); |
|
66 | 66 | |
67 | - //test without pre settting attributes |
|
68 | - $result = $lead->get_contact(); |
|
69 | - $this->assertEquals(null,$result); |
|
67 | + //test without pre settting attributes |
|
68 | + $result = $lead->get_contact(); |
|
69 | + $this->assertEquals(null,$result); |
|
70 | 70 | |
71 | 71 | |
72 | - //test with required attributes preset |
|
73 | - $lead->contact_id =1; |
|
74 | - $result = $lead->get_contact(); |
|
75 | - $this->assertEquals(null,$result); |
|
72 | + //test with required attributes preset |
|
73 | + $lead->contact_id =1; |
|
74 | + $result = $lead->get_contact(); |
|
75 | + $this->assertEquals(null,$result); |
|
76 | 76 | |
77 | 77 | |
78 | - } |
|
78 | + } |
|
79 | 79 | |
80 | - public function testcreate_list_query() |
|
81 | - { |
|
82 | - $lead = new Lead(); |
|
80 | + public function testcreate_list_query() |
|
81 | + { |
|
82 | + $lead = new Lead(); |
|
83 | 83 | |
84 | - //test with empty string params |
|
85 | - $expected = "SELECT leads.*, users.user_name assigned_user_name,leads_cstm.* FROM leads LEFT JOIN users\n ON leads.assigned_user_id=users.id LEFT JOIN email_addr_bean_rel eabl ON eabl.bean_id = leads.id AND eabl.bean_module = 'Leads' and eabl.primary_address = 1 and eabl.deleted=0 LEFT JOIN email_addresses ea ON (ea.id = eabl.email_address_id) LEFT JOIN leads_cstm ON leads.id = leads_cstm.id_c where leads.deleted=0 "; |
|
86 | - $actual = $lead->create_list_query('',''); |
|
87 | - $this->assertSame($expected,$actual); |
|
84 | + //test with empty string params |
|
85 | + $expected = "SELECT leads.*, users.user_name assigned_user_name,leads_cstm.* FROM leads LEFT JOIN users\n ON leads.assigned_user_id=users.id LEFT JOIN email_addr_bean_rel eabl ON eabl.bean_id = leads.id AND eabl.bean_module = 'Leads' and eabl.primary_address = 1 and eabl.deleted=0 LEFT JOIN email_addresses ea ON (ea.id = eabl.email_address_id) LEFT JOIN leads_cstm ON leads.id = leads_cstm.id_c where leads.deleted=0 "; |
|
86 | + $actual = $lead->create_list_query('',''); |
|
87 | + $this->assertSame($expected,$actual); |
|
88 | 88 | |
89 | 89 | |
90 | - //test with valid string params |
|
91 | - $expected = "SELECT leads.*, users.user_name assigned_user_name,leads_cstm.* FROM leads LEFT JOIN users\n ON leads.assigned_user_id=users.id LEFT JOIN email_addr_bean_rel eabl ON eabl.bean_id = leads.id AND eabl.bean_module = 'Leads' and eabl.primary_address = 1 and eabl.deleted=0 LEFT JOIN email_addresses ea ON (ea.id = eabl.email_address_id) LEFT JOIN leads_cstm ON leads.id = leads_cstm.id_c where (users.user_name=\"\") AND leads.deleted=0 ORDER BY leads.id"; |
|
92 | - $actual = $lead->create_list_query('leads.id','users.user_name=""'); |
|
93 | - $this->assertSame($expected,$actual); |
|
90 | + //test with valid string params |
|
91 | + $expected = "SELECT leads.*, users.user_name assigned_user_name,leads_cstm.* FROM leads LEFT JOIN users\n ON leads.assigned_user_id=users.id LEFT JOIN email_addr_bean_rel eabl ON eabl.bean_id = leads.id AND eabl.bean_module = 'Leads' and eabl.primary_address = 1 and eabl.deleted=0 LEFT JOIN email_addresses ea ON (ea.id = eabl.email_address_id) LEFT JOIN leads_cstm ON leads.id = leads_cstm.id_c where (users.user_name=\"\") AND leads.deleted=0 ORDER BY leads.id"; |
|
92 | + $actual = $lead->create_list_query('leads.id','users.user_name=""'); |
|
93 | + $this->assertSame($expected,$actual); |
|
94 | 94 | |
95 | - } |
|
95 | + } |
|
96 | 96 | |
97 | 97 | /** |
98 | 98 | * @todo: NEEDS FIXING! |
99 | 99 | */ |
100 | - public function testcreate_new_list_query() |
|
101 | - { |
|
100 | + public function testcreate_new_list_query() |
|
101 | + { |
|
102 | 102 | /* |
103 | 103 | $lead = new Lead(); |
104 | 104 | |
@@ -114,26 +114,26 @@ discard block |
||
114 | 114 | $this->assertSame($expected,$actual); |
115 | 115 | */ |
116 | 116 | $this->assertTrue(true, "NEEDS FIXING!"); |
117 | - } |
|
117 | + } |
|
118 | 118 | |
119 | 119 | public function testSaveAndConverted_lead() |
120 | 120 | { |
121 | - $lead = new Lead(); |
|
121 | + $lead = new Lead(); |
|
122 | 122 | |
123 | - $lead->first_name = "firstn"; |
|
124 | - $lead->last_name ="lastnn"; |
|
125 | - $lead->lead_source = "test"; |
|
123 | + $lead->first_name = "firstn"; |
|
124 | + $lead->last_name ="lastnn"; |
|
125 | + $lead->lead_source = "test"; |
|
126 | 126 | |
127 | - $result = $lead->save(); |
|
127 | + $result = $lead->save(); |
|
128 | 128 | |
129 | - //test for record ID to verify that record is saved |
|
130 | - $this->assertTrue(isset($lead->id)); |
|
131 | - $this->assertEquals(36, strlen($lead->id)); |
|
132 | - $this->assertEquals("New", $lead->status); |
|
129 | + //test for record ID to verify that record is saved |
|
130 | + $this->assertTrue(isset($lead->id)); |
|
131 | + $this->assertEquals(36, strlen($lead->id)); |
|
132 | + $this->assertEquals("New", $lead->status); |
|
133 | 133 | |
134 | 134 | |
135 | - //test converted_lead method after saving |
|
136 | - /*$lead->converted_lead("'" . $lead->id . "'" , "'1'", "'1'", "'1'"); |
|
135 | + //test converted_lead method after saving |
|
136 | + /*$lead->converted_lead("'" . $lead->id . "'" , "'1'", "'1'", "'1'"); |
|
137 | 137 | |
138 | 138 | //retrieve back to test if attributes are updated in db |
139 | 139 | $lead = $lead->retrieve($lead->id); |
@@ -144,206 +144,206 @@ discard block |
||
144 | 144 | $this->assertEquals("1", $lead->opportunity_id); |
145 | 145 | */ |
146 | 146 | |
147 | - $this->markTestSkipped("converted_lead: Error in query, id's not properly escaped "); |
|
147 | + $this->markTestSkipped("converted_lead: Error in query, id's not properly escaped "); |
|
148 | 148 | |
149 | 149 | |
150 | - //mark the record as deleted and verify that this record cannot be retrieved anymore. |
|
151 | - $lead->mark_deleted($lead->id); |
|
152 | - $result = $lead->retrieve($lead->id); |
|
153 | - $this->assertEquals(null,$result); |
|
150 | + //mark the record as deleted and verify that this record cannot be retrieved anymore. |
|
151 | + $lead->mark_deleted($lead->id); |
|
152 | + $result = $lead->retrieve($lead->id); |
|
153 | + $this->assertEquals(null,$result); |
|
154 | 154 | |
155 | 155 | } |
156 | 156 | |
157 | 157 | |
158 | 158 | |
159 | - public function testfill_in_additional_list_fields() |
|
160 | - { |
|
161 | - $lead = new Lead(); |
|
159 | + public function testfill_in_additional_list_fields() |
|
160 | + { |
|
161 | + $lead = new Lead(); |
|
162 | 162 | |
163 | - $lead->first_name = "firstn"; |
|
164 | - $lead->last_name ="lastn"; |
|
163 | + $lead->first_name = "firstn"; |
|
164 | + $lead->last_name ="lastn"; |
|
165 | 165 | |
166 | - $lead->fill_in_additional_list_fields(); |
|
166 | + $lead->fill_in_additional_list_fields(); |
|
167 | 167 | |
168 | - $this->assertEquals("firstn lastn", $lead->name ); |
|
168 | + $this->assertEquals("firstn lastn", $lead->name ); |
|
169 | 169 | |
170 | - } |
|
170 | + } |
|
171 | 171 | |
172 | 172 | |
173 | - public function testfill_in_additional_detail_fields() |
|
174 | - { |
|
173 | + public function testfill_in_additional_detail_fields() |
|
174 | + { |
|
175 | 175 | |
176 | - $lead = new Lead(); |
|
176 | + $lead = new Lead(); |
|
177 | 177 | |
178 | - $lead->first_name = "firstn"; |
|
179 | - $lead->last_name ="lastn"; |
|
178 | + $lead->first_name = "firstn"; |
|
179 | + $lead->last_name ="lastn"; |
|
180 | 180 | |
181 | - $lead->fill_in_additional_detail_fields(); |
|
181 | + $lead->fill_in_additional_detail_fields(); |
|
182 | 182 | |
183 | - $this->assertEquals("firstn lastn", $lead->name ); |
|
183 | + $this->assertEquals("firstn lastn", $lead->name ); |
|
184 | 184 | |
185 | 185 | |
186 | 186 | |
187 | - } |
|
187 | + } |
|
188 | 188 | |
189 | - public function testget_list_view_data(){ |
|
189 | + public function testget_list_view_data(){ |
|
190 | 190 | |
191 | - $lead = new Lead(); |
|
191 | + $lead = new Lead(); |
|
192 | 192 | |
193 | - $expected = array ( |
|
194 | - 'NAME' => ' ', |
|
195 | - 'DELETED' => 0, |
|
196 | - 'FULL_NAME' => ' ', |
|
197 | - 'DO_NOT_CALL' => '0', |
|
198 | - 'CONVERTED' => '0', |
|
199 | - 'ENCODED_NAME' => ' ', |
|
200 | - 'EMAIL1' => '', |
|
201 | - 'EMAIL1_LINK' => '<a href=\'javascript:void(0);\' onclick=\'SUGAR.quickCompose.init({"fullComposeUrl":"contact_id=\\u0026parent_type=Leads\\u0026parent_id=\\u0026parent_name=+\\u0026to_addrs_ids=\\u0026to_addrs_names=\\u0026to_addrs_emails=\\u0026to_email_addrs=+%26nbsp%3B%26lt%3B%26gt%3B\\u0026return_module=Leads\\u0026return_action=ListView\\u0026return_id=","composePackage":{"contact_id":"","parent_type":"Leads","parent_id":"","parent_name":" ","to_addrs_ids":"","to_addrs_names":"","to_addrs_emails":"","to_email_addrs":" \\u003C\\u003E","return_module":"Leads","return_action":"ListView","return_id":""}});\' class=\'\'>', |
|
202 | - 'ACC_NAME_FROM_ACCOUNTS' => NULL, |
|
203 | - ); |
|
193 | + $expected = array ( |
|
194 | + 'NAME' => ' ', |
|
195 | + 'DELETED' => 0, |
|
196 | + 'FULL_NAME' => ' ', |
|
197 | + 'DO_NOT_CALL' => '0', |
|
198 | + 'CONVERTED' => '0', |
|
199 | + 'ENCODED_NAME' => ' ', |
|
200 | + 'EMAIL1' => '', |
|
201 | + 'EMAIL1_LINK' => '<a href=\'javascript:void(0);\' onclick=\'SUGAR.quickCompose.init({"fullComposeUrl":"contact_id=\\u0026parent_type=Leads\\u0026parent_id=\\u0026parent_name=+\\u0026to_addrs_ids=\\u0026to_addrs_names=\\u0026to_addrs_emails=\\u0026to_email_addrs=+%26nbsp%3B%26lt%3B%26gt%3B\\u0026return_module=Leads\\u0026return_action=ListView\\u0026return_id=","composePackage":{"contact_id":"","parent_type":"Leads","parent_id":"","parent_name":" ","to_addrs_ids":"","to_addrs_names":"","to_addrs_emails":"","to_email_addrs":" \\u003C\\u003E","return_module":"Leads","return_action":"ListView","return_id":""}});\' class=\'\'>', |
|
202 | + 'ACC_NAME_FROM_ACCOUNTS' => NULL, |
|
203 | + ); |
|
204 | 204 | |
205 | - $actual = $lead->get_list_view_data(); |
|
205 | + $actual = $lead->get_list_view_data(); |
|
206 | 206 | |
207 | - //$this->assertSame($expected, $actual); |
|
208 | - $this->assertEquals($expected['NAME'], $actual['NAME']); |
|
209 | - $this->assertEquals($expected['DELETED'], $actual['DELETED']); |
|
210 | - $this->assertEquals($expected['FULL_NAME'], $actual['FULL_NAME']); |
|
211 | - $this->assertEquals($expected['DO_NOT_CALL'], $actual['DO_NOT_CALL']); |
|
212 | - $this->assertEquals($expected['EMAIL1_LINK'], $actual['EMAIL1_LINK']); |
|
207 | + //$this->assertSame($expected, $actual); |
|
208 | + $this->assertEquals($expected['NAME'], $actual['NAME']); |
|
209 | + $this->assertEquals($expected['DELETED'], $actual['DELETED']); |
|
210 | + $this->assertEquals($expected['FULL_NAME'], $actual['FULL_NAME']); |
|
211 | + $this->assertEquals($expected['DO_NOT_CALL'], $actual['DO_NOT_CALL']); |
|
212 | + $this->assertEquals($expected['EMAIL1_LINK'], $actual['EMAIL1_LINK']); |
|
213 | 213 | |
214 | - } |
|
214 | + } |
|
215 | 215 | |
216 | 216 | |
217 | 217 | public function testget_linked_fields() |
218 | 218 | { |
219 | - $lead = new Lead(); |
|
220 | - |
|
221 | - $expected = array ( |
|
222 | - 'created_by_link', |
|
223 | - 'modified_user_link', |
|
224 | - 'assigned_user_link', |
|
225 | - 'email_addresses_primary', |
|
226 | - 'email_addresses', |
|
227 | - 'reports_to_link', |
|
228 | - 'reportees', |
|
229 | - 'contacts', |
|
230 | - 'accounts', |
|
231 | - 'contact', |
|
232 | - 'opportunity', |
|
233 | - 'campaign_leads', |
|
234 | - 'tasks', |
|
235 | - 'notes', |
|
236 | - 'meetings', |
|
237 | - 'calls', |
|
238 | - 'emails', |
|
239 | - 'campaigns', |
|
240 | - 'prospect_lists', |
|
241 | - 'fp_events_leads_1', |
|
242 | - 'SecurityGroups', |
|
243 | - ); |
|
244 | - $actual = $lead->get_linked_fields(); |
|
245 | - $this->assertTrue(is_array($actual)); |
|
219 | + $lead = new Lead(); |
|
220 | + |
|
221 | + $expected = array ( |
|
222 | + 'created_by_link', |
|
223 | + 'modified_user_link', |
|
224 | + 'assigned_user_link', |
|
225 | + 'email_addresses_primary', |
|
226 | + 'email_addresses', |
|
227 | + 'reports_to_link', |
|
228 | + 'reportees', |
|
229 | + 'contacts', |
|
230 | + 'accounts', |
|
231 | + 'contact', |
|
232 | + 'opportunity', |
|
233 | + 'campaign_leads', |
|
234 | + 'tasks', |
|
235 | + 'notes', |
|
236 | + 'meetings', |
|
237 | + 'calls', |
|
238 | + 'emails', |
|
239 | + 'campaigns', |
|
240 | + 'prospect_lists', |
|
241 | + 'fp_events_leads_1', |
|
242 | + 'SecurityGroups', |
|
243 | + ); |
|
244 | + $actual = $lead->get_linked_fields(); |
|
245 | + $this->assertTrue(is_array($actual)); |
|
246 | 246 | sort($expected); |
247 | 247 | $actualKeys = array_keys($actual); |
248 | 248 | sort($actualKeys); |
249 | - $this->assertSame($expected ,$actualKeys); |
|
249 | + $this->assertSame($expected ,$actualKeys); |
|
250 | 250 | |
251 | 251 | } |
252 | 252 | |
253 | - public function testbuild_generic_where_clause () |
|
254 | - { |
|
253 | + public function testbuild_generic_where_clause () |
|
254 | + { |
|
255 | 255 | |
256 | - $lead = new Lead(); |
|
256 | + $lead = new Lead(); |
|
257 | 257 | |
258 | - //test with empty string params |
|
259 | - $expected = "leads.last_name like '%' or leads.account_name like '%' or leads.first_name like '%' or ea.email_address like '%'"; |
|
260 | - $actual = $lead->build_generic_where_clause(""); |
|
261 | - $this->assertSame($expected,$actual); |
|
258 | + //test with empty string params |
|
259 | + $expected = "leads.last_name like '%' or leads.account_name like '%' or leads.first_name like '%' or ea.email_address like '%'"; |
|
260 | + $actual = $lead->build_generic_where_clause(""); |
|
261 | + $this->assertSame($expected,$actual); |
|
262 | 262 | |
263 | 263 | |
264 | - //test with valid string params |
|
265 | - $expected = "leads.last_name like '%' or leads.account_name like '%' or leads.first_name like '%' or ea.email_address like '%'"; |
|
266 | - $actual = $lead->build_generic_where_clause("123"); |
|
267 | - $this->assertSame($expected,$actual); |
|
264 | + //test with valid string params |
|
265 | + $expected = "leads.last_name like '%' or leads.account_name like '%' or leads.first_name like '%' or ea.email_address like '%'"; |
|
266 | + $actual = $lead->build_generic_where_clause("123"); |
|
267 | + $this->assertSame($expected,$actual); |
|
268 | 268 | |
269 | - } |
|
269 | + } |
|
270 | 270 | |
271 | - public function testset_notification_body() |
|
272 | - { |
|
271 | + public function testset_notification_body() |
|
272 | + { |
|
273 | 273 | |
274 | - $lead = new Lead(); |
|
274 | + $lead = new Lead(); |
|
275 | 275 | |
276 | - //test with attributes preset and verify template variables are set accordingly |
|
276 | + //test with attributes preset and verify template variables are set accordingly |
|
277 | 277 | |
278 | - $lead->first_name = "firstn"; |
|
279 | - $lead->last_name ="lastn"; |
|
280 | - $lead->salutation = "Mr"; |
|
281 | - $lead->lead_source = "Email"; |
|
282 | - $lead->status = "New"; |
|
283 | - $lead->description = "tes description"; |
|
278 | + $lead->first_name = "firstn"; |
|
279 | + $lead->last_name ="lastn"; |
|
280 | + $lead->salutation = "Mr"; |
|
281 | + $lead->lead_source = "Email"; |
|
282 | + $lead->status = "New"; |
|
283 | + $lead->description = "tes description"; |
|
284 | 284 | |
285 | - $result = $lead->set_notification_body(new Sugar_Smarty(), $lead); |
|
285 | + $result = $lead->set_notification_body(new Sugar_Smarty(), $lead); |
|
286 | 286 | |
287 | - $this->assertEquals("Mr firstn lastn" ,$result->_tpl_vars['LEAD_NAME']); |
|
288 | - $this->assertEquals($lead->lead_source ,$result->_tpl_vars['LEAD_SOURCE']); |
|
289 | - $this->assertEquals($lead->status ,$result->_tpl_vars['LEAD_STATUS']); |
|
290 | - $this->assertEquals($lead->description ,$result->_tpl_vars['LEAD_DESCRIPTION']); |
|
287 | + $this->assertEquals("Mr firstn lastn" ,$result->_tpl_vars['LEAD_NAME']); |
|
288 | + $this->assertEquals($lead->lead_source ,$result->_tpl_vars['LEAD_SOURCE']); |
|
289 | + $this->assertEquals($lead->status ,$result->_tpl_vars['LEAD_STATUS']); |
|
290 | + $this->assertEquals($lead->description ,$result->_tpl_vars['LEAD_DESCRIPTION']); |
|
291 | 291 | |
292 | - } |
|
292 | + } |
|
293 | 293 | |
294 | - public function testbean_implements() |
|
295 | - { |
|
296 | - $lead = new Lead(); |
|
294 | + public function testbean_implements() |
|
295 | + { |
|
296 | + $lead = new Lead(); |
|
297 | 297 | |
298 | - $this->assertEquals(false, $lead->bean_implements('')); //test with blank value |
|
299 | - $this->assertEquals(false, $lead->bean_implements('test')); //test with invalid value |
|
300 | - $this->assertEquals(true, $lead->bean_implements('ACL')); //test with valid value |
|
298 | + $this->assertEquals(false, $lead->bean_implements('')); //test with blank value |
|
299 | + $this->assertEquals(false, $lead->bean_implements('test')); //test with invalid value |
|
300 | + $this->assertEquals(true, $lead->bean_implements('ACL')); //test with valid value |
|
301 | 301 | |
302 | - } |
|
302 | + } |
|
303 | 303 | |
304 | - public function testlistviewACLHelper() |
|
305 | - { |
|
306 | - $lead = new Lead(); |
|
304 | + public function testlistviewACLHelper() |
|
305 | + { |
|
306 | + $lead = new Lead(); |
|
307 | 307 | |
308 | - $expected = array("MAIN"=>"a", "ACCOUNT"=>"a", "OPPORTUNITY"=>"a", "CONTACT"=>"a" ); |
|
309 | - $actual = $lead->listviewACLHelper(); |
|
310 | - $this->assertSame($expected,$actual); |
|
308 | + $expected = array("MAIN"=>"a", "ACCOUNT"=>"a", "OPPORTUNITY"=>"a", "CONTACT"=>"a" ); |
|
309 | + $actual = $lead->listviewACLHelper(); |
|
310 | + $this->assertSame($expected,$actual); |
|
311 | 311 | |
312 | - } |
|
312 | + } |
|
313 | 313 | |
314 | 314 | |
315 | - public function testconvertCustomFieldsForm() |
|
316 | - { |
|
317 | - $lead = new Lead(); |
|
315 | + public function testconvertCustomFieldsForm() |
|
316 | + { |
|
317 | + $lead = new Lead(); |
|
318 | 318 | |
319 | - $form = ""; |
|
320 | - $prefix = ""; |
|
321 | - $tempBean = new Contact(); |
|
319 | + $form = ""; |
|
320 | + $prefix = ""; |
|
321 | + $tempBean = new Contact(); |
|
322 | 322 | |
323 | - $result = $lead->convertCustomFieldsForm($form, $tempBean, $prefix); |
|
323 | + $result = $lead->convertCustomFieldsForm($form, $tempBean, $prefix); |
|
324 | 324 | |
325 | - $this->assertEquals(true,$result); |
|
326 | - $this->assertgreaterThanOrEqual("", $form); //no filed with source = custom_fields |
|
325 | + $this->assertEquals(true,$result); |
|
326 | + $this->assertgreaterThanOrEqual("", $form); //no filed with source = custom_fields |
|
327 | 327 | |
328 | - } |
|
328 | + } |
|
329 | 329 | |
330 | 330 | |
331 | - public function testget_unlinked_email_query() |
|
332 | - { |
|
333 | - $lead = new Lead(); |
|
331 | + public function testget_unlinked_email_query() |
|
332 | + { |
|
333 | + $lead = new Lead(); |
|
334 | 334 | |
335 | - $expected = "SELECT emails.id FROM emails JOIN (select DISTINCT email_id from emails_email_addr_rel eear\n\n join email_addr_bean_rel eabr on eabr.bean_id ='' and eabr.bean_module = 'Leads' and\n eabr.email_address_id = eear.email_address_id and eabr.deleted=0\n where eear.deleted=0 and eear.email_id not in\n (select eb.email_id from emails_beans eb where eb.bean_module ='Leads' and eb.bean_id = '')\n ) derivedemails on derivedemails.email_id = emails.id"; |
|
336 | - $actual = $lead->get_unlinked_email_query(); |
|
337 | - $this->assertSame($expected,$actual); |
|
335 | + $expected = "SELECT emails.id FROM emails JOIN (select DISTINCT email_id from emails_email_addr_rel eear\n\n join email_addr_bean_rel eabr on eabr.bean_id ='' and eabr.bean_module = 'Leads' and\n eabr.email_address_id = eear.email_address_id and eabr.deleted=0\n where eear.deleted=0 and eear.email_id not in\n (select eb.email_id from emails_beans eb where eb.bean_module ='Leads' and eb.bean_id = '')\n ) derivedemails on derivedemails.email_id = emails.id"; |
|
336 | + $actual = $lead->get_unlinked_email_query(); |
|
337 | + $this->assertSame($expected,$actual); |
|
338 | 338 | |
339 | - } |
|
339 | + } |
|
340 | 340 | |
341 | 341 | |
342 | 342 | public function testget_old_related_calls() |
343 | 343 | { |
344 | - $lead = new Lead(); |
|
344 | + $lead = new Lead(); |
|
345 | 345 | |
346 | - $expected = array(); |
|
346 | + $expected = array(); |
|
347 | 347 | $expected['select']='SELECT calls.id '; |
348 | 348 | $expected['from']='FROM calls '; |
349 | 349 | $expected['where']=" WHERE calls.parent_id = '$this->id' |
@@ -351,28 +351,28 @@ discard block |
||
351 | 351 | $expected['join'] = ""; |
352 | 352 | $expected['join_tables'][0] = ''; |
353 | 353 | |
354 | - $actual = $lead->get_old_related_calls(); |
|
355 | - $this->assertSame($expected,$actual); |
|
354 | + $actual = $lead->get_old_related_calls(); |
|
355 | + $this->assertSame($expected,$actual); |
|
356 | 356 | |
357 | 357 | } |
358 | 358 | |
359 | 359 | |
360 | 360 | public function testgetActivitiesOptions() |
361 | - { |
|
362 | - $lead = new Lead(); |
|
361 | + { |
|
362 | + $lead = new Lead(); |
|
363 | 363 | |
364 | - $expected = array( "copy"=>"Copy", "move"=>"Move", "donothing"=>"Do Nothing"); |
|
365 | - $actual = $lead->getActivitiesOptions(); |
|
366 | - $this->assertSame($expected,$actual); |
|
364 | + $expected = array( "copy"=>"Copy", "move"=>"Move", "donothing"=>"Do Nothing"); |
|
365 | + $actual = $lead->getActivitiesOptions(); |
|
366 | + $this->assertSame($expected,$actual); |
|
367 | 367 | |
368 | 368 | } |
369 | 369 | |
370 | 370 | |
371 | 371 | public function testget_old_related_meetings() |
372 | 372 | { |
373 | - $lead = new Lead(); |
|
373 | + $lead = new Lead(); |
|
374 | 374 | |
375 | - $expected = array(); |
|
375 | + $expected = array(); |
|
376 | 376 | $expected['select']='SELECT meetings.id '; |
377 | 377 | $expected['from']='FROM meetings '; |
378 | 378 | $expected['where']=" WHERE meetings.parent_id = '' |
@@ -380,8 +380,8 @@ discard block |
||
380 | 380 | $expected['join'] = ""; |
381 | 381 | $expected['join_tables'][0] = ''; |
382 | 382 | |
383 | - $actual = $lead->get_old_related_meetings(); |
|
384 | - $this->assertSame($expected,$actual); |
|
383 | + $actual = $lead->get_old_related_meetings(); |
|
384 | + $this->assertSame($expected,$actual); |
|
385 | 385 | |
386 | 386 | } |
387 | 387 |
@@ -3,132 +3,132 @@ discard block |
||
3 | 3 | class ProjectTest extends PHPUnit_Framework_TestCase { |
4 | 4 | |
5 | 5 | |
6 | - public function testProject() |
|
7 | - { |
|
8 | - //execute the contructor and check for the Object type and attributes |
|
9 | - $project = new Project(); |
|
6 | + public function testProject() |
|
7 | + { |
|
8 | + //execute the contructor and check for the Object type and attributes |
|
9 | + $project = new Project(); |
|
10 | 10 | |
11 | - $this->assertInstanceOf('Project',$project); |
|
12 | - $this->assertInstanceOf('SugarBean',$project); |
|
11 | + $this->assertInstanceOf('Project',$project); |
|
12 | + $this->assertInstanceOf('SugarBean',$project); |
|
13 | 13 | |
14 | 14 | |
15 | - $this->assertAttributeEquals('project', 'table_name', $project); |
|
16 | - $this->assertAttributeEquals('Project', 'module_dir', $project); |
|
17 | - $this->assertAttributeEquals('Project', 'object_name', $project); |
|
15 | + $this->assertAttributeEquals('project', 'table_name', $project); |
|
16 | + $this->assertAttributeEquals('Project', 'module_dir', $project); |
|
17 | + $this->assertAttributeEquals('Project', 'object_name', $project); |
|
18 | 18 | |
19 | - $this->assertAttributeEquals(true, 'new_schema', $project); |
|
19 | + $this->assertAttributeEquals(true, 'new_schema', $project); |
|
20 | 20 | |
21 | - } |
|
21 | + } |
|
22 | 22 | |
23 | - public function testfill_in_additional_detail_fields() |
|
24 | - { |
|
25 | - error_reporting(E_ERROR | E_PARSE); |
|
23 | + public function testfill_in_additional_detail_fields() |
|
24 | + { |
|
25 | + error_reporting(E_ERROR | E_PARSE); |
|
26 | 26 | |
27 | - $project = new Project(); |
|
27 | + $project = new Project(); |
|
28 | 28 | |
29 | - //test without setting assigned_user_id |
|
30 | - $project->fill_in_additional_detail_fields(); |
|
31 | - $this->assertEquals("", $project->assigned_user_name); |
|
29 | + //test without setting assigned_user_id |
|
30 | + $project->fill_in_additional_detail_fields(); |
|
31 | + $this->assertEquals("", $project->assigned_user_name); |
|
32 | 32 | |
33 | 33 | |
34 | - //test with assigned_user_id set |
|
35 | - $project->assigned_user_id = 1; |
|
36 | - $project->fill_in_additional_detail_fields(); |
|
37 | - $this->assertEquals("Administrator", $project->assigned_user_name); |
|
34 | + //test with assigned_user_id set |
|
35 | + $project->assigned_user_id = 1; |
|
36 | + $project->fill_in_additional_detail_fields(); |
|
37 | + $this->assertEquals("Administrator", $project->assigned_user_name); |
|
38 | 38 | |
39 | - } |
|
39 | + } |
|
40 | 40 | |
41 | 41 | |
42 | - public function testfill_in_additional_list_fields() |
|
43 | - { |
|
44 | - $project = new Project(); |
|
42 | + public function testfill_in_additional_list_fields() |
|
43 | + { |
|
44 | + $project = new Project(); |
|
45 | 45 | |
46 | - //test without setting assigned_user_id |
|
47 | - $project->fill_in_additional_list_fields(); |
|
48 | - $this->assertEquals("", $project->assigned_user_name); |
|
46 | + //test without setting assigned_user_id |
|
47 | + $project->fill_in_additional_list_fields(); |
|
48 | + $this->assertEquals("", $project->assigned_user_name); |
|
49 | 49 | |
50 | 50 | |
51 | - //test with assigned_user_id set |
|
52 | - $project->assigned_user_id = 1; |
|
53 | - $project->fill_in_additional_list_fields(); |
|
54 | - $this->assertEquals("Administrator", $project->assigned_user_name); |
|
51 | + //test with assigned_user_id set |
|
52 | + $project->assigned_user_id = 1; |
|
53 | + $project->fill_in_additional_list_fields(); |
|
54 | + $this->assertEquals("Administrator", $project->assigned_user_name); |
|
55 | 55 | |
56 | - } |
|
56 | + } |
|
57 | 57 | |
58 | 58 | |
59 | 59 | public function testsave_relationship_changes() |
60 | 60 | { |
61 | 61 | |
62 | - $project = new Project(); |
|
62 | + $project = new Project(); |
|
63 | 63 | |
64 | - $project->id =1; |
|
65 | - $_REQUEST['relate_id'] = 2; |
|
66 | - $_REQUEST['relate_to'] = "contacts"; |
|
64 | + $project->id =1; |
|
65 | + $_REQUEST['relate_id'] = 2; |
|
66 | + $_REQUEST['relate_to'] = "contacts"; |
|
67 | 67 | |
68 | - //execute the method and test if it works and does not throws an exception. |
|
69 | - try { |
|
70 | - $project->save_relationship_changes(true); |
|
71 | - $this->assertTrue(true); |
|
72 | - } |
|
73 | - catch (Exception $e) { |
|
74 | - $this->fail(); |
|
75 | - } |
|
68 | + //execute the method and test if it works and does not throws an exception. |
|
69 | + try { |
|
70 | + $project->save_relationship_changes(true); |
|
71 | + $this->assertTrue(true); |
|
72 | + } |
|
73 | + catch (Exception $e) { |
|
74 | + $this->fail(); |
|
75 | + } |
|
76 | 76 | |
77 | 77 | } |
78 | 78 | |
79 | 79 | |
80 | - public function test_get_total_estimated_effort() |
|
81 | - { |
|
82 | - //$project = new Project(); |
|
83 | - //$result = $project->_get_total_estimated_effort("1"); |
|
84 | - $this->markTestIncomplete('Can Not be implemented: Unknown column parent_id in where clause \n Argument 3 passed to MysqlManager::convert() must be of the type array, integer given'); |
|
80 | + public function test_get_total_estimated_effort() |
|
81 | + { |
|
82 | + //$project = new Project(); |
|
83 | + //$result = $project->_get_total_estimated_effort("1"); |
|
84 | + $this->markTestIncomplete('Can Not be implemented: Unknown column parent_id in where clause \n Argument 3 passed to MysqlManager::convert() must be of the type array, integer given'); |
|
85 | 85 | |
86 | - } |
|
86 | + } |
|
87 | 87 | |
88 | 88 | |
89 | - public function test_get_total_actual_effort() |
|
90 | - { |
|
91 | - $this->markTestIncomplete('Can Not be implemented: Unknown column parent_id in where clause \n Argument 3 passed to MysqlManager::convert() must be of the type array, integer given'); |
|
92 | - } |
|
89 | + public function test_get_total_actual_effort() |
|
90 | + { |
|
91 | + $this->markTestIncomplete('Can Not be implemented: Unknown column parent_id in where clause \n Argument 3 passed to MysqlManager::convert() must be of the type array, integer given'); |
|
92 | + } |
|
93 | 93 | |
94 | 94 | |
95 | - public function testget_summary_text() |
|
96 | - { |
|
97 | - $project = new Project(); |
|
95 | + public function testget_summary_text() |
|
96 | + { |
|
97 | + $project = new Project(); |
|
98 | 98 | |
99 | - //test without setting name |
|
100 | - $this->assertEquals(Null,$project->get_summary_text()); |
|
99 | + //test without setting name |
|
100 | + $this->assertEquals(Null,$project->get_summary_text()); |
|
101 | 101 | |
102 | - //test with name set |
|
103 | - $project->name = "test"; |
|
104 | - $this->assertEquals('test',$project->get_summary_text()); |
|
102 | + //test with name set |
|
103 | + $project->name = "test"; |
|
104 | + $this->assertEquals('test',$project->get_summary_text()); |
|
105 | 105 | |
106 | - } |
|
106 | + } |
|
107 | 107 | |
108 | 108 | |
109 | - public function testbuild_generic_where_clause () |
|
110 | - { |
|
109 | + public function testbuild_generic_where_clause () |
|
110 | + { |
|
111 | 111 | |
112 | - $project = new Project(); |
|
112 | + $project = new Project(); |
|
113 | 113 | |
114 | - //test with empty string params |
|
115 | - $expected = "project.name LIKE '%%'"; |
|
116 | - $actual = $project->build_generic_where_clause(''); |
|
117 | - $this->assertSame($expected,$actual); |
|
114 | + //test with empty string params |
|
115 | + $expected = "project.name LIKE '%%'"; |
|
116 | + $actual = $project->build_generic_where_clause(''); |
|
117 | + $this->assertSame($expected,$actual); |
|
118 | 118 | |
119 | 119 | |
120 | - //test with valid string params |
|
121 | - $expected = "project.name LIKE '%%'"; |
|
122 | - $actual = $project->build_generic_where_clause('test'); |
|
123 | - $this->assertSame($expected,$actual); |
|
120 | + //test with valid string params |
|
121 | + $expected = "project.name LIKE '%%'"; |
|
122 | + $actual = $project->build_generic_where_clause('test'); |
|
123 | + $this->assertSame($expected,$actual); |
|
124 | 124 | |
125 | - } |
|
125 | + } |
|
126 | 126 | |
127 | 127 | /** |
128 | 128 | * @todo: NEEDS FIXING! |
129 | 129 | */ |
130 | - public function testget_list_view_data() |
|
131 | - { |
|
130 | + public function testget_list_view_data() |
|
131 | + { |
|
132 | 132 | /* |
133 | 133 | $project = new Project(); |
134 | 134 | |
@@ -146,44 +146,44 @@ discard block |
||
146 | 146 | $this->assertSame($expected, $actual); |
147 | 147 | */ |
148 | 148 | $this->assertTrue(true, "NEEDS FIXING!"); |
149 | - } |
|
149 | + } |
|
150 | 150 | |
151 | - public function testbean_implements(){ |
|
151 | + public function testbean_implements(){ |
|
152 | 152 | |
153 | - $project = new Project(); |
|
153 | + $project = new Project(); |
|
154 | 154 | |
155 | - $this->assertEquals(false, $project->bean_implements('')); //test with blank value |
|
156 | - $this->assertEquals(false, $project->bean_implements('test')); //test with invalid value |
|
157 | - $this->assertEquals(true, $project->bean_implements('ACL')); //test with valid value |
|
155 | + $this->assertEquals(false, $project->bean_implements('')); //test with blank value |
|
156 | + $this->assertEquals(false, $project->bean_implements('test')); //test with invalid value |
|
157 | + $this->assertEquals(true, $project->bean_implements('ACL')); //test with valid value |
|
158 | 158 | |
159 | - } |
|
159 | + } |
|
160 | 160 | |
161 | 161 | public function testcreate_export_query() |
162 | 162 | { |
163 | - $project = new Project(); |
|
163 | + $project = new Project(); |
|
164 | 164 | |
165 | - //test with empty string params |
|
166 | - $expected = "SELECT\n project.*,\n users.user_name as assigned_user_name ,project_cstm.jjwg_maps_lng_c,project_cstm.jjwg_maps_lat_c,project_cstm.jjwg_maps_geocode_status_c,project_cstm.jjwg_maps_address_c FROM project LEFT JOIN project_cstm ON project.id = project_cstm.id_c LEFT JOIN users\n ON project.assigned_user_id=users.id where project.deleted=0 "; |
|
167 | - $actual = $project->create_export_query('',''); |
|
168 | - $this->assertSame($expected,$actual); |
|
165 | + //test with empty string params |
|
166 | + $expected = "SELECT\n project.*,\n users.user_name as assigned_user_name ,project_cstm.jjwg_maps_lng_c,project_cstm.jjwg_maps_lat_c,project_cstm.jjwg_maps_geocode_status_c,project_cstm.jjwg_maps_address_c FROM project LEFT JOIN project_cstm ON project.id = project_cstm.id_c LEFT JOIN users\n ON project.assigned_user_id=users.id where project.deleted=0 "; |
|
167 | + $actual = $project->create_export_query('',''); |
|
168 | + $this->assertSame($expected,$actual); |
|
169 | 169 | |
170 | 170 | |
171 | - //test with valid string params |
|
172 | - $expected = "SELECT\n project.*,\n users.user_name as assigned_user_name ,project_cstm.jjwg_maps_lng_c,project_cstm.jjwg_maps_lat_c,project_cstm.jjwg_maps_geocode_status_c,project_cstm.jjwg_maps_address_c FROM project LEFT JOIN project_cstm ON project.id = project_cstm.id_c LEFT JOIN users\n ON project.assigned_user_id=users.id where (users.user_name) AND project.deleted=0 ORDER BY project.id"; |
|
173 | - $actual = $project->create_export_query('project.id','users.user_name'); |
|
174 | - $this->assertSame($expected,$actual); |
|
171 | + //test with valid string params |
|
172 | + $expected = "SELECT\n project.*,\n users.user_name as assigned_user_name ,project_cstm.jjwg_maps_lng_c,project_cstm.jjwg_maps_lat_c,project_cstm.jjwg_maps_geocode_status_c,project_cstm.jjwg_maps_address_c FROM project LEFT JOIN project_cstm ON project.id = project_cstm.id_c LEFT JOIN users\n ON project.assigned_user_id=users.id where (users.user_name) AND project.deleted=0 ORDER BY project.id"; |
|
173 | + $actual = $project->create_export_query('project.id','users.user_name'); |
|
174 | + $this->assertSame($expected,$actual); |
|
175 | 175 | |
176 | 176 | } |
177 | 177 | |
178 | - public function testgetAllProjectTasks(){ |
|
178 | + public function testgetAllProjectTasks(){ |
|
179 | 179 | |
180 | - $project = new Project(); |
|
180 | + $project = new Project(); |
|
181 | 181 | |
182 | - $project->id = 1; |
|
183 | - $result = $project->getAllProjectTasks(); |
|
184 | - $this->assertTrue(is_array($result)); |
|
182 | + $project->id = 1; |
|
183 | + $result = $project->getAllProjectTasks(); |
|
184 | + $this->assertTrue(is_array($result)); |
|
185 | 185 | |
186 | - } |
|
186 | + } |
|
187 | 187 | |
188 | 188 | } |
189 | 189 | ?> |