Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../var/softacul.../zurmo
File: debug.php
<?php
[0] Fix | Delete
/*********************************************************************************
[1] Fix | Delete
* Zurmo is a customer relationship management program developed by
[2] Fix | Delete
* Zurmo, Inc. Copyright (C) 2017 Zurmo Inc.
[3] Fix | Delete
*
[4] Fix | Delete
* Zurmo is free software; you can redistribute it and/or modify it under
[5] Fix | Delete
* the terms of the GNU Affero General Public License version 3 as published by the
[6] Fix | Delete
* Free Software Foundation with the addition of the following permission added
[7] Fix | Delete
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
[8] Fix | Delete
* IN WHICH THE COPYRIGHT IS OWNED BY ZURMO, ZURMO DISCLAIMS THE WARRANTY
[9] Fix | Delete
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
[10] Fix | Delete
*
[11] Fix | Delete
* Zurmo is distributed in the hope that it will be useful, but WITHOUT
[12] Fix | Delete
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
[13] Fix | Delete
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
[14] Fix | Delete
* details.
[15] Fix | Delete
*
[16] Fix | Delete
* You should have received a copy of the GNU Affero General Public License along with
[17] Fix | Delete
* this program; if not, see http://www.gnu.org/licenses or write to the Free
[18] Fix | Delete
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
[19] Fix | Delete
* 02110-1301 USA.
[20] Fix | Delete
*
[21] Fix | Delete
* You can contact Zurmo, Inc. with a mailing address at 27 North Wacker Drive
[22] Fix | Delete
* Suite 370 Chicago, IL 60606. or at email address contact@zurmo.com.
[23] Fix | Delete
*
[24] Fix | Delete
* The interactive user interfaces in original and modified versions
[25] Fix | Delete
* of this program must display Appropriate Legal Notices, as required under
[26] Fix | Delete
* Section 5 of the GNU Affero General Public License version 3.
[27] Fix | Delete
*
[28] Fix | Delete
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
[29] Fix | Delete
* these Appropriate Legal Notices must retain the display of the Zurmo
[30] Fix | Delete
* logo and Zurmo copyright notice. If the display of the logo is not reasonably
[31] Fix | Delete
* feasible for technical reasons, the Appropriate Legal Notices must display the words
[32] Fix | Delete
* "Copyright Zurmo Inc. 2017. All rights reserved".
[33] Fix | Delete
********************************************************************************/
[34] Fix | Delete
[35] Fix | Delete
// Keep this on ALL THE TIME WHEN DEVELOPING. Turn it off in production.
[36] Fix | Delete
// Check it in as false!
[37] Fix | Delete
$debugOn = false;
[38] Fix | Delete
[39] Fix | Delete
// Turn this on to see additional performance information. Turn it off in production.
[40] Fix | Delete
// Check it in as true!
[41] Fix | Delete
$performanceOn = false;
[42] Fix | Delete
[43] Fix | Delete
// Turn this on to see RedBean queries. Turn it off in production.
[44] Fix | Delete
// Check it in as false!
[45] Fix | Delete
$redBeanDebugOn = false;
[46] Fix | Delete
[47] Fix | Delete
// Turn this on to save RedBean queries into file. Turn it off in production.
[48] Fix | Delete
// Check it in as false!
[49] Fix | Delete
$redBeanDebugLogToFileOn = false;
[50] Fix | Delete
[51] Fix | Delete
// Turn this on to see extra query data such as total count, duplicate count, and duplicate queries
[52] Fix | Delete
// Check it in as false!
[53] Fix | Delete
$queryDataOn = false;
[54] Fix | Delete
[55] Fix | Delete
// Turn this off to use php to do permissions, rights, and polices.
[56] Fix | Delete
// Use this to comparatively test the mysql stored functions and procedures.
[57] Fix | Delete
// Check it in as true!
[58] Fix | Delete
$securityOptimized = false;
[59] Fix | Delete
[60] Fix | Delete
// Turn this off to use AuditEvent to do write audit entries when
[61] Fix | Delete
// the database is frozen. When it is not frozen it will always be used.
[62] Fix | Delete
// Use this to comparatively test.
[63] Fix | Delete
// Check it in as true!
[64] Fix | Delete
$auditingOptimized = true;
[65] Fix | Delete
[66] Fix | Delete
// Turn this off to test without php level caching.
[67] Fix | Delete
// Php level caching is required so that only one instance of
[68] Fix | Delete
// any model is in memory at once. Turning it off is only useful
[69] Fix | Delete
// in limited debugging scenarios.
[70] Fix | Delete
// Check it in as true!
[71] Fix | Delete
$phpLevelCaching = true;
[72] Fix | Delete
[73] Fix | Delete
// Turn this off to test without memcache level caching.
[74] Fix | Delete
// Memcache level caching works in conjunction with php level
[75] Fix | Delete
// caching. When a model is pulled from memcache its related
[76] Fix | Delete
// models will subsequently be pull from the php level cache
[77] Fix | Delete
// if they already exist in memory, or will be pulled from
[78] Fix | Delete
// memcache. A model's related models are not serialized
[79] Fix | Delete
// along with it.
[80] Fix | Delete
// Check it in as true!
[81] Fix | Delete
$memcacheLevelCaching = false;
[82] Fix | Delete
[83] Fix | Delete
// Turn this off to test without db level caching of permissions.
[84] Fix | Delete
// Check it in as true!
[85] Fix | Delete
$dbLevelCaching = true;
[86] Fix | Delete
[87] Fix | Delete
// Turn this off when you debug css/javascript code.
[88] Fix | Delete
// Turn it on for production websites, because it optimize and combine javascript/css
[89] Fix | Delete
// files, so page can loads much faster
[90] Fix | Delete
// Check it in as true!
[91] Fix | Delete
$minifyScripts = true;
[92] Fix | Delete
[93] Fix | Delete
// Turn this off if you are not fixing validation error.
[94] Fix | Delete
// W3C online validator is used, so pages render slow when validator is turned on.
[95] Fix | Delete
// Works only in debug mode (when $debugOn = true).
[96] Fix | Delete
$xhtmlValidation = false;
[97] Fix | Delete
[98] Fix | Delete
// Should Crash reports be automatically submitted to Sentry
[99] Fix | Delete
$submitCrashToSentry = false;
[100] Fix | Delete
[101] Fix | Delete
// Set information related to function tests
[102] Fix | Delete
// 1. $seleniumServerPath is path to selenium server(selenium jar file)
[103] Fix | Delete
// 2. $testBaseUrl is url of website to be tested via selenium server. It can be local or remote
[104] Fix | Delete
// 3. $seleniumTestResultUrl is url where results of functional tests can be seen
[105] Fix | Delete
// 4. $seleniumTestResultsPath path where functional tests will be stored, relatibe to basePath
[106] Fix | Delete
// 5. $seleniumServerPort - selenium server port
[107] Fix | Delete
// 6. $seleniumBrowsersToRun - list of browsers to run functional tests in
[108] Fix | Delete
// 7. $seleniumDbControlUrl - url via which we can backup/restore db, so tests will be independent
[109] Fix | Delete
// For more details, please check protected/tests/functional/TestSuite.php
[110] Fix | Delete
$seleniumServerPath = '';
[111] Fix | Delete
$seleniumTestBaseUrl = '';
[112] Fix | Delete
$seleniumTestResultUrl = '';
[113] Fix | Delete
$seleniumTestResultsPath = '';
[114] Fix | Delete
$seleniumServerPort = '4048';
[115] Fix | Delete
$seleniumBrowsersToRun = 'All';
[116] Fix | Delete
$seleniumControlUrl = '';
[117] Fix | Delete
[118] Fix | Delete
if ($debugOn)
[119] Fix | Delete
{
[120] Fix | Delete
error_reporting(E_ALL | E_STRICT);
[121] Fix | Delete
}
[122] Fix | Delete
[123] Fix | Delete
define('YII_DEBUG', $debugOn);
[124] Fix | Delete
define('YII_TRACE_LEVEL', $debugOn ? 3 : 0);
[125] Fix | Delete
define('SHOW_PERFORMANCE', $performanceOn);
[126] Fix | Delete
define('SHOW_QUERY_DATA', $queryDataOn);
[127] Fix | Delete
define('REDBEAN_DEBUG', $redBeanDebugOn);
[128] Fix | Delete
define('REDBEAN_DEBUG_TO_FILE', $redBeanDebugLogToFileOn);
[129] Fix | Delete
define('SECURITY_OPTIMIZED', $securityOptimized);
[130] Fix | Delete
define('AUDITING_OPTIMIZED', $auditingOptimized);
[131] Fix | Delete
define('PHP_CACHING_ON', $phpLevelCaching);
[132] Fix | Delete
define('MEMCACHE_ON', $memcacheLevelCaching);
[133] Fix | Delete
define('DB_CACHING_ON', $dbLevelCaching);
[134] Fix | Delete
define('MINIFY_SCRIPTS', $minifyScripts);
[135] Fix | Delete
define('XHTML_VALIDATION', $xhtmlValidation);
[136] Fix | Delete
define('SUBMIT_CRASH_TO_SENTRY', $submitCrashToSentry);
[137] Fix | Delete
[138] Fix | Delete
assert_options(ASSERT_ACTIVE, $debugOn); // Don't even think about disabling asserts!
[139] Fix | Delete
assert_options(ASSERT_WARNING, $debugOn);
[140] Fix | Delete
assert_options(ASSERT_BAIL, false);
[141] Fix | Delete
if (php_sapi_name() != 'cli')
[142] Fix | Delete
{
[143] Fix | Delete
assert_options(ASSERT_CALLBACK, 'assertFailureInBrowser');
[144] Fix | Delete
}
[145] Fix | Delete
else
[146] Fix | Delete
{
[147] Fix | Delete
assert_options(ASSERT_CALLBACK, 'assertFailureInCli');
[148] Fix | Delete
}
[149] Fix | Delete
$phpVersion = explode('.', phpversion());
[150] Fix | Delete
if ($phpVersion[0] >= 7 && $debugOn)
[151] Fix | Delete
{
[152] Fix | Delete
if (ini_get('zend.assertions') == 0)
[153] Fix | Delete
{
[154] Fix | Delete
ini_set('zend.assertions', '1');
[155] Fix | Delete
}
[156] Fix | Delete
ini_set('assert.exception', '0');
[157] Fix | Delete
}
[158] Fix | Delete
[159] Fix | Delete
function assertFailureInBrowser($file, $line, $message)
[160] Fix | Delete
{
[161] Fix | Delete
echo '<span style="background-color: red; color: yellow; font-weight:bold;">';
[162] Fix | Delete
echo "ASSERTION FAILED in $file on line $line";
[163] Fix | Delete
if (is_string($message) && !empty($message))
[164] Fix | Delete
{
[165] Fix | Delete
echo ": assert('$message'); "; // Not Coding Standard
[166] Fix | Delete
}
[167] Fix | Delete
echo '</span><br />';
[168] Fix | Delete
}
[169] Fix | Delete
[170] Fix | Delete
function assertFailureInCli($file, $line, $message)
[171] Fix | Delete
{
[172] Fix | Delete
throw new FailedAssertionException($file, $line, $message);
[173] Fix | Delete
}
[174] Fix | Delete
?>
[175] Fix | Delete
[176] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function