Skip to content
This repository was archived by the owner on Sep 13, 2024. It is now read-only.

Commit 70584cd

Browse files
Merge branch 'developer' into stable
2 parents d399024 + 59f17ec commit 70584cd

File tree

523 files changed

+16280
-15872
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

523 files changed

+16280
-15872
lines changed

.gitignore

+31-31
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
.gitignore
2-
.settings
3-
.project
4-
.buildpath
5-
_private
6-
README.md
7-
user_privileges/cron.php
8-
cache/templates_c
9-
config/csrf_secret.php
10-
config/config_override.php
11-
cache/logs/*.log
12-
cache/vtlib/
13-
test/templates_c/basic/*.php
14-
libraries/mPDF/
15-
public_html/modules/OSSMail/roundcube/
16-
public_html/libraries/gantt/
17-
libraries/PHPExcel/
18-
vendor/rmccue/
19-
vendor/smarty/
20-
vendor/phpmailer/
21-
vendor/ezyang/
22-
vendor/symfony/
23-
vendor/doctrine/
24-
vendor/simshaun/
25-
vendor/sabre/
26-
vendor/ircmaxell/
27-
vendor/bin/
28-
vendor/paragonie/
29-
vendor/psr/
30-
vendor/sensiolabs/
31-
vendor/composer/ca-bundle/
1+
/.gitignore
2+
/.settings
3+
/.project
4+
/.buildpath
5+
/_private
6+
/README.md
7+
/user_privileges/cron.php
8+
/cache/templates_c
9+
/config/csrf_secret.php
10+
/config/config_override.php
11+
/cache/logs/*.log
12+
/cache/vtlib/
13+
/test/templates_c/basic/*.php
14+
/libraries/mPDF/
15+
/public_html/modules/OSSMail/roundcube/
16+
/public_html/libraries/gantt/
17+
/libraries/PHPExcel/
18+
/vendor/rmccue/
19+
/vendor/smarty/
20+
/vendor/phpmailer/
21+
/vendor/ezyang/
22+
/vendor/symfony/
23+
/vendor/doctrine/
24+
/vendor/simshaun/
25+
/vendor/sabre/
26+
/vendor/ircmaxell/
27+
/vendor/bin/
28+
/vendor/paragonie/
29+
/vendor/psr/
30+
/vendor/sensiolabs/
31+
/vendor/composer/ca-bundle/

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ after_script:
6060
- cat tests/LoginPage.txt
6161
- cat tests/DetailView.txt
6262
- cat tests/EditView.txt
63+
- cat tests/ListView.txt
6364
- cat tests/records.log
65+
- cat cache/logs/errors.log
6466
- cat cache/logs/request.log
6567
- cat cache/logs/phpError.log
6668
- cat cache/logs/system.log

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
We design an innovative CRM system that is dedicated for large and medium sized companies. We dedicate it to everyone who values open source software, security and innovation. YetiForce was built on a rock-solid Vtiger foundation, but has hundreds of changes that help to accomplish even the most challenging tasks in the simplest way. Every function within the system was thought through and automated to ensure that all of them work together seamlessly and form a coherent integrity. We looked at the entire sales process and consequently refined the system, module by module. We have years of experience creating tailor made CRM software for a variety of different companies. Download it and have a first-hand experience.
88

99
1. [GitStable] (https://gitstable.yetiforce.com)
10-
2. [GitMaster] (https://gitmaster.yetiforce.com)
11-
3. [GitDeveloper] (https://gitdeveloper.yetiforce.com)
12-
4. [YetiPortal] (https://gitdeveloper.yetiforce.com/portal/)
10+
2. [GitDeveloper] (https://gitdeveloper.yetiforce.com)
11+
3. [YetiPortal2] (https://gitdeveloper.yetiforce.com/portal/)
1312

1413
Read the [documentation] (https://yetiforce.com/en/documentation.html) to learn more.
1514

@@ -21,7 +20,8 @@ Visit our [online store] (https://shop.yetiforce.com/en/) with commercial module
2120

2221
Where else can you find YetiForce?
2322
- [Sourceforge] (https://sourceforge.net/projects/yetiforce/)
24-
- [Softaculous] (http://www.softaculous.com/apps/erp/YetiForce)
23+
- [Softaculous] (http://www.softaculous.com/apps/erp/YetiForce)
24+
- [Packagist] (https://packagist.org/packages/yetiforce/yetiforce-crm)
2525

2626
1. The lists of changes for previous versions of YetiForce CRM are available at [our website] (https://yetiforce.com/en/developer-documentation/changes.html).
2727
2. Check Milestone to verify release due date

api.php

-11
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,4 @@
2626
} else {
2727
echo "No Service Configured for $service";
2828
}
29-
} else {
30-
/*
31-
echo "<h1>YetiForceCRM API Services</h1>";
32-
echo "<li>YetiForceCRM Yeti Portal EndPoint URL -- Click <a href='api.php?service=yetiportal'>here</a></li>";
33-
echo "<li>YetiForceCRM Outlook Plugin EndPoint URL -- Click <a href='api.php?service=outlook'>here</a></li>";
34-
echo "<li>YetiForceCRM Word Plugin EndPoint URL -- Click <a href='api.php?service=wordplugin'>here</a></li>";
35-
echo "<li>YetiForceCRM ThunderBird Extenstion EndPoint URL -- Click <a href='api.php?service=thunderbird'>here</a></li>";
36-
echo "<li>YetiForceCRM Customer Portal EndPoint URL -- Click <a href='api.php?service=customerportal'>here</a></li>";
37-
echo "<li>YetiForceCRM WebForm EndPoint URL -- Click <a href='api.php?service=webforms'>here</a></li>";
38-
echo "<li>YetiForceCRM FireFox Extension EndPoint URL -- Click <a href='api.php?service=firefox'>here</a></li>";
39-
*/
4029
}

api/webservice/Core/Module.php

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ public static function getPermittedModules()
2323
if (isset(static::$permittedModules)) {
2424
return static::$permittedModules;
2525
}
26-
//$permissionType = $action->getPermissionType();
2726
$modules = [];
2827
foreach (\vtlib\Functions::getAllModules(true, false, 0) as $value) {
2928
if (\App\Privilege::isPermitted($value['name'])) {

api/webservice/Core/Response.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function encodeXml($responseData)
129129
return $xml->asXML();
130130
}
131131

132-
function toXml($data, &$xmlData)
132+
public function toXml($data, &$xmlData)
133133
{
134134
foreach ($data as $key => $value) {
135135
if (is_numeric($key)) {

cache/addressBook/.htaccess

-3
This file was deleted.

cache/addressBook/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!DOCTYPE html><title></title>

cache/logs/.htaccess

-3
This file was deleted.

cache/mail/.htaccess

-1
This file was deleted.

cache/mail/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!DOCTYPE html><title></title>

cache/pdf/.htaccess

-3
This file was deleted.

cache/pdf/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!DOCTYPE html><title></title>

cache/rss_cache/.htaccess

-3
This file was deleted.

cache/rss_cache/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!DOCTYPE html><title></title>

cache/session/.htaccess

-1
This file was deleted.

cache/upload/.htaccess

-21
This file was deleted.

config/performance.php

+2
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,6 @@
8080
'BROWSING_HISTORY_VIEW_LIMIT' => 20,
8181
//Days after browsing history has deleted
8282
'BROWSING_HISTORY_DELETE_AFTER' => 7,
83+
//Session handler name, handler dir: vendor/yetiforce/Session/
84+
'SESSION_DRIVER' => 'File',
8385
];

config/version.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22
return [
3-
'appVersion' => '4.1.0',
4-
'patchVersion' => '2017.07.31',
3+
'appVersion' => '4.2.0',
4+
'patchVersion' => '2017.08.09',
55
'lib_mPDF' => '0.0.2',
6-
'lib_roundcube' => '0.0.31',
6+
'lib_roundcube' => '0.0.32',
77
'lib_PHPExcel' => '0.0.0',
88
'lib_gantt' => '0.0.1',
99
];

cron/SendReminder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
$template = 'ActivityReminderNotificationTask';
5454
} else {
5555
$template = 'ActivityReminderNotificationEvents';
56-
$eventsRecordModel->set('id', $activityId);
56+
$eventsRecordModel->setId($activityId);
5757
if (AppConfig::module('Calendar', 'SEND_REMINDER_INVITATION')) {
5858
$invitees = $eventsRecordModel->getInvities();
5959
}

cron/modules/Reports/ScheduleReports.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
* All Rights Reserved.
99
*************************************************************************************/
1010

11-
vimport ('include.runtime.Globals');
11+
Vtiger_Loader::includeOnce ('include.runtime.Globals');
1212
require_once 'modules/Reports/models/ScheduleReports.php';
1313
Reports_ScheduleReports_Model::runScheduledReports();

cron/modules/com_vtiger_workflow/com_vtiger_workflow.php

+2-8
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,9 @@
99
* *********************************************************************************** */
1010

1111
require_once 'include/Webservices/Utils.php';
12-
require_once("include/Webservices/State.php");
13-
require_once("include/Webservices/OperationManager.php");
14-
require_once("include/Webservices/SessionManager.php");
1512
require_once 'include/Webservices/WebserviceField.php';
1613
require_once 'include/Webservices/EntityMeta.php';
1714
require_once 'include/Webservices/VtigerWebserviceObject.php';
18-
require_once("include/Webservices/VtigerCRMObject.php");
19-
require_once("include/Webservices/VtigerCRMObjectMeta.php");
20-
require_once("include/Webservices/DataTransform.php");
2115
require_once("include/Webservices/WebServiceError.php");
2216
require_once 'include/Webservices/ModuleTypes.php';
2317
require_once 'include/utils/VtlibUtils.php';
@@ -31,8 +25,8 @@
3125
$workflowScheduler = new WorkFlowScheduler($adb);
3226
$workflowScheduler->queueScheduledWorkflowTasks();
3327
$readyTasks = (new VTTaskQueue($adb))->getReadyTasks();
34-
$tm = new VTTaskManager($adb);
35-
foreach ($readyTasks as $taskDetails) {
28+
$tm = new VTTaskManager();
29+
foreach ($readyTasks as $tasdkDetails) {
3630
list($taskId, $entityId, $taskContents) = $taskDetails;
3731
$task = $tm->retrieveTask($taskId);
3832
//If task is not there then continue

cron/vtigercron.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
\App\Config::$requestMode = 'Cron';
1616
file_put_contents('user_privileges/cron.php', '<?php $sapi=\'' . PHP_SAPI . '\';$ini=\'' . php_ini_loaded_file() . '\';$log=\'' . ini_get('error_log') . '\';$vphp=\'' . PHP_VERSION . '\';');
1717

18-
Vtiger_Session::init();
19-
$authenticatedUserId = Vtiger_Session::get('authenticated_user_id');
20-
$appUniqueKey = Vtiger_Session::get('app_unique_key');
18+
App\Session::init();
19+
$authenticatedUserId = App\Session::get('authenticated_user_id');
20+
$appUniqueKey = App\Session::get('app_unique_key');
2121
$user = (!empty($authenticatedUserId) && !empty($appUniqueKey) && $appUniqueKey === AppConfig::main('application_unique_key'));
2222

2323
if (PHP_SAPI === 'cli' || $user || AppConfig::main('application_unique_key') === \App\Request::_get('app_key')) {

file.php

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
$webUI->process(App\Request::init());
1717
} catch (Exception $e) {
1818
\App\Log::error($e->getMessage() . ' => ' . $e->getFile() . ':' . $e->getLine());
19-
//var_dump($e->getMessage());
2019
header('HTTP/1.1 400 Bad Request');
2120
}
2221

include/CRMEntity.php

+16-14
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct()
3636
$this->column_fields = getColumnFields(get_class($this));
3737
}
3838

39-
static function getInstance($module)
39+
public static function getInstance($module)
4040
{
4141
$modName = $module;
4242
if (is_numeric($module)) {
@@ -266,10 +266,7 @@ public function retrieve_entity_info($record, $module)
266266
*/
267267
public function mark_deleted($id)
268268
{
269-
$current_user = vglobal('current_user');
270-
$date_var = date("Y-m-d H:i:s");
271-
$query = "UPDATE vtiger_crmentity set deleted=1,modifiedtime=?,modifiedby=? where crmid=?";
272-
$this->db->pquery($query, array($this->db->formatDate($date_var, true), $current_user->id, $id), true, "Error marking record deleted: ");
269+
\App\Db::getInstance()->createCommand()->update('vtiger_crmentity', ['deleted' => 1, 'modifiedtime' => date('Y-m-d H:i:s'), 'modifiedby' => \App\User::getCurrentUserId()], ['crmid' => $id])->execute();
273270
}
274271

275272
/**
@@ -608,25 +605,30 @@ public function saveRelatedM2M($module, $crmid, $withModule, $withCrmid)
608605
}
609606
}
610607

608+
/**
609+
* Function add info about relations
610+
* @param string $module
611+
* @param int $crmid
612+
* @param string $withModule
613+
* @param int $withCrmid
614+
*/
611615
public function saveRelatedToDB($module, $crmid, $withModule, $withCrmid)
612616
{
613-
$db = PearDatabase::getInstance();
614617
foreach ($withCrmid as $relcrmid) {
615-
if ($withModule == 'Documents') {
616-
$checkpresence = $db->pquery('SELECT crmid FROM vtiger_senotesrel WHERE crmid = ? AND notesid = ?', [$crmid, $relcrmid]);
617-
// Relation already exists? No need to add again
618-
if ($checkpresence && $db->getRowCount($checkpresence))
618+
if ($withModule === 'Documents') {
619+
$checkpresence = (new \App\Db\Query())->select(['crmid'])->from('vtiger_senotesrel')->where(['crmid' => $crmid, 'notesid' => $relcrmid])->exists();
620+
if ($checkpresence) {
619621
continue;
622+
}
620623
\App\Db::getInstance()->createCommand()->insert('vtiger_senotesrel', [
621624
'crmid' => $crmid,
622625
'notesid' => $relcrmid
623626
])->execute();
624627
} else {
625-
$checkpresence = $db->pquery('SELECT crmid FROM vtiger_crmentityrel WHERE crmid = ? AND module = ? AND relcrmid = ? AND relmodule = ?', [$crmid, $module, $relcrmid, $withModule]
626-
);
627-
// Relation already exists? No need to add again
628-
if ($checkpresence && $db->getRowCount($checkpresence))
628+
$checkpresence = (new \App\Db\Query())->select(['crmid'])->from('vtiger_crmentityrel')->where(['crmid' => $crmid, 'module' => $module, 'relcrmid' => $relcrmid, 'relmodule' => $withModule])->exists();
629+
if ($checkpresence) {
629630
continue;
631+
}
630632
\App\Db::getInstance()->createCommand()->insert('vtiger_crmentityrel', [
631633
'crmid' => $crmid,
632634
'module' => $module,

include/CustomFieldUtil.php

-10
This file was deleted.

include/Loader.php

+3-7
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Vtiger_Loader
2424
* @param string $qualifiedName
2525
* @return string Absolute File Name
2626
*/
27-
static function resolveNameToPath($qualifiedName, $fileExtension = 'php')
27+
public static function resolveNameToPath($qualifiedName, $fileExtension = 'php')
2828
{
2929
$allowedExtensions = array('php', 'js', 'css', 'less');
3030
$file = '';
@@ -51,7 +51,7 @@ static function resolveNameToPath($qualifiedName, $fileExtension = 'php')
5151
* @param string $qualifiedName
5252
* @return boolean
5353
*/
54-
static function includeOnce($qualifiedName)
54+
public static function includeOnce($qualifiedName)
5555
{
5656

5757
if (isset(self::$includeCache[$qualifiedName])) {
@@ -78,7 +78,7 @@ static function includeOnce($qualifiedName)
7878
return $success;
7979
}
8080

81-
static function includePath($qualifiedName)
81+
public static function includePath($qualifiedName)
8282
{
8383
// Already included?
8484
if (isset(self::$includePathCache[$qualifiedName])) {
@@ -195,8 +195,4 @@ public static function autoLoad($className)
195195
}
196196
}
197197

198-
function vimport($qualifiedName)
199-
{
200-
return Vtiger_Loader::includeOnce($qualifiedName);
201-
}
202198
spl_autoload_register('Vtiger_Loader::autoLoad');

include/Webservices/ConvertLead.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
require_once 'include/Webservices/DescribeObject.php';
1616
require_once 'include/Loader.php';
1717
require_once('include/ConfigUtils.php');
18-
vimport('include.runtime.Globals');
18+
Vtiger_Loader::includeOnce('include.runtime.Globals');
1919

20-
function vtws_convertlead($entityvalues, $user)
20+
function vtws_convertlead($entityvalues, Users_Record_Model $user)
2121
{
2222
$adb = PearDatabase::getInstance();
2323

@@ -238,7 +238,7 @@ function vtws_convertLeadTransferHandler($leadIdComponents, $entityIds, $entityv
238238
return true;
239239
}
240240

241-
function vtws_updateConvertLeadStatus($entityIds, $leadId, $user)
241+
function vtws_updateConvertLeadStatus($entityIds, $leadId, Users_Record_Model $user)
242242
{
243243
$adb = PearDatabase::getInstance();
244244

0 commit comments

Comments
 (0)