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

Commit

Permalink
Merge branch 'developer' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuszkrzaczkowski committed Aug 9, 2017
2 parents d399024 + 59f17ec commit 70584cd
Show file tree
Hide file tree
Showing 523 changed files with 16,280 additions and 15,872 deletions.
62 changes: 31 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
.gitignore
.settings
.project
.buildpath
_private
README.md
user_privileges/cron.php
cache/templates_c
config/csrf_secret.php
config/config_override.php
cache/logs/*.log
cache/vtlib/
test/templates_c/basic/*.php
libraries/mPDF/
public_html/modules/OSSMail/roundcube/
public_html/libraries/gantt/
libraries/PHPExcel/
vendor/rmccue/
vendor/smarty/
vendor/phpmailer/
vendor/ezyang/
vendor/symfony/
vendor/doctrine/
vendor/simshaun/
vendor/sabre/
vendor/ircmaxell/
vendor/bin/
vendor/paragonie/
vendor/psr/
vendor/sensiolabs/
vendor/composer/ca-bundle/
/.gitignore
/.settings
/.project
/.buildpath
/_private
/README.md
/user_privileges/cron.php
/cache/templates_c
/config/csrf_secret.php
/config/config_override.php
/cache/logs/*.log
/cache/vtlib/
/test/templates_c/basic/*.php
/libraries/mPDF/
/public_html/modules/OSSMail/roundcube/
/public_html/libraries/gantt/
/libraries/PHPExcel/
/vendor/rmccue/
/vendor/smarty/
/vendor/phpmailer/
/vendor/ezyang/
/vendor/symfony/
/vendor/doctrine/
/vendor/simshaun/
/vendor/sabre/
/vendor/ircmaxell/
/vendor/bin/
/vendor/paragonie/
/vendor/psr/
/vendor/sensiolabs/
/vendor/composer/ca-bundle/
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ after_script:
- cat tests/LoginPage.txt
- cat tests/DetailView.txt
- cat tests/EditView.txt
- cat tests/ListView.txt
- cat tests/records.log
- cat cache/logs/errors.log
- cat cache/logs/request.log
- cat cache/logs/phpError.log
- cat cache/logs/system.log
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
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.

1. [GitStable] (https://gitstable.yetiforce.com)
2. [GitMaster] (https://gitmaster.yetiforce.com)
3. [GitDeveloper] (https://gitdeveloper.yetiforce.com)
4. [YetiPortal] (https://gitdeveloper.yetiforce.com/portal/)
2. [GitDeveloper] (https://gitdeveloper.yetiforce.com)
3. [YetiPortal2] (https://gitdeveloper.yetiforce.com/portal/)

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

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

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

1. The lists of changes for previous versions of YetiForce CRM are available at [our website] (https://yetiforce.com/en/developer-documentation/changes.html).
2. Check Milestone to verify release due date
Expand Down
11 changes: 0 additions & 11 deletions api.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,4 @@
} else {
echo "No Service Configured for $service";
}
} else {
/*
echo "<h1>YetiForceCRM API Services</h1>";
echo "<li>YetiForceCRM Yeti Portal EndPoint URL -- Click <a href='api.php?service=yetiportal'>here</a></li>";
echo "<li>YetiForceCRM Outlook Plugin EndPoint URL -- Click <a href='api.php?service=outlook'>here</a></li>";
echo "<li>YetiForceCRM Word Plugin EndPoint URL -- Click <a href='api.php?service=wordplugin'>here</a></li>";
echo "<li>YetiForceCRM ThunderBird Extenstion EndPoint URL -- Click <a href='api.php?service=thunderbird'>here</a></li>";
echo "<li>YetiForceCRM Customer Portal EndPoint URL -- Click <a href='api.php?service=customerportal'>here</a></li>";
echo "<li>YetiForceCRM WebForm EndPoint URL -- Click <a href='api.php?service=webforms'>here</a></li>";
echo "<li>YetiForceCRM FireFox Extension EndPoint URL -- Click <a href='api.php?service=firefox'>here</a></li>";
*/
}
1 change: 0 additions & 1 deletion api/webservice/Core/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public static function getPermittedModules()
if (isset(static::$permittedModules)) {
return static::$permittedModules;
}
//$permissionType = $action->getPermissionType();
$modules = [];
foreach (\vtlib\Functions::getAllModules(true, false, 0) as $value) {
if (\App\Privilege::isPermitted($value['name'])) {
Expand Down
2 changes: 1 addition & 1 deletion api/webservice/Core/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function encodeXml($responseData)
return $xml->asXML();
}

function toXml($data, &$xmlData)
public function toXml($data, &$xmlData)
{
foreach ($data as $key => $value) {
if (is_numeric($key)) {
Expand Down
3 changes: 0 additions & 3 deletions cache/addressBook/.htaccess

This file was deleted.

1 change: 1 addition & 0 deletions cache/addressBook/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><title></title>
3 changes: 0 additions & 3 deletions cache/logs/.htaccess

This file was deleted.

1 change: 0 additions & 1 deletion cache/mail/.htaccess

This file was deleted.

1 change: 1 addition & 0 deletions cache/mail/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><title></title>
3 changes: 0 additions & 3 deletions cache/pdf/.htaccess

This file was deleted.

1 change: 1 addition & 0 deletions cache/pdf/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><title></title>
3 changes: 0 additions & 3 deletions cache/rss_cache/.htaccess

This file was deleted.

1 change: 1 addition & 0 deletions cache/rss_cache/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><title></title>
1 change: 0 additions & 1 deletion cache/session/.htaccess

This file was deleted.

21 changes: 0 additions & 21 deletions cache/upload/.htaccess

This file was deleted.

2 changes: 2 additions & 0 deletions config/performance.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,6 @@
'BROWSING_HISTORY_VIEW_LIMIT' => 20,
//Days after browsing history has deleted
'BROWSING_HISTORY_DELETE_AFTER' => 7,
//Session handler name, handler dir: vendor/yetiforce/Session/
'SESSION_DRIVER' => 'File',
];
6 changes: 3 additions & 3 deletions config/version.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
return [
'appVersion' => '4.1.0',
'patchVersion' => '2017.07.31',
'appVersion' => '4.2.0',
'patchVersion' => '2017.08.09',
'lib_mPDF' => '0.0.2',
'lib_roundcube' => '0.0.31',
'lib_roundcube' => '0.0.32',
'lib_PHPExcel' => '0.0.0',
'lib_gantt' => '0.0.1',
];
2 changes: 1 addition & 1 deletion cron/SendReminder.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
$template = 'ActivityReminderNotificationTask';
} else {
$template = 'ActivityReminderNotificationEvents';
$eventsRecordModel->set('id', $activityId);
$eventsRecordModel->setId($activityId);
if (AppConfig::module('Calendar', 'SEND_REMINDER_INVITATION')) {
$invitees = $eventsRecordModel->getInvities();
}
Expand Down
2 changes: 1 addition & 1 deletion cron/modules/Reports/ScheduleReports.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
* All Rights Reserved.
*************************************************************************************/

vimport ('include.runtime.Globals');
Vtiger_Loader::includeOnce ('include.runtime.Globals');
require_once 'modules/Reports/models/ScheduleReports.php';
Reports_ScheduleReports_Model::runScheduledReports();
10 changes: 2 additions & 8 deletions cron/modules/com_vtiger_workflow/com_vtiger_workflow.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,9 @@
* *********************************************************************************** */

require_once 'include/Webservices/Utils.php';
require_once("include/Webservices/State.php");
require_once("include/Webservices/OperationManager.php");
require_once("include/Webservices/SessionManager.php");
require_once 'include/Webservices/WebserviceField.php';
require_once 'include/Webservices/EntityMeta.php';
require_once 'include/Webservices/VtigerWebserviceObject.php';
require_once("include/Webservices/VtigerCRMObject.php");
require_once("include/Webservices/VtigerCRMObjectMeta.php");
require_once("include/Webservices/DataTransform.php");
require_once("include/Webservices/WebServiceError.php");
require_once 'include/Webservices/ModuleTypes.php';
require_once 'include/utils/VtlibUtils.php';
Expand All @@ -31,8 +25,8 @@
$workflowScheduler = new WorkFlowScheduler($adb);
$workflowScheduler->queueScheduledWorkflowTasks();
$readyTasks = (new VTTaskQueue($adb))->getReadyTasks();
$tm = new VTTaskManager($adb);
foreach ($readyTasks as $taskDetails) {
$tm = new VTTaskManager();
foreach ($readyTasks as $tasdkDetails) {
list($taskId, $entityId, $taskContents) = $taskDetails;
$task = $tm->retrieveTask($taskId);
//If task is not there then continue
Expand Down
6 changes: 3 additions & 3 deletions cron/vtigercron.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
\App\Config::$requestMode = 'Cron';
file_put_contents('user_privileges/cron.php', '<?php $sapi=\'' . PHP_SAPI . '\';$ini=\'' . php_ini_loaded_file() . '\';$log=\'' . ini_get('error_log') . '\';$vphp=\'' . PHP_VERSION . '\';');

Vtiger_Session::init();
$authenticatedUserId = Vtiger_Session::get('authenticated_user_id');
$appUniqueKey = Vtiger_Session::get('app_unique_key');
App\Session::init();
$authenticatedUserId = App\Session::get('authenticated_user_id');
$appUniqueKey = App\Session::get('app_unique_key');
$user = (!empty($authenticatedUserId) && !empty($appUniqueKey) && $appUniqueKey === AppConfig::main('application_unique_key'));

if (PHP_SAPI === 'cli' || $user || AppConfig::main('application_unique_key') === \App\Request::_get('app_key')) {
Expand Down
1 change: 0 additions & 1 deletion file.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
$webUI->process(App\Request::init());
} catch (Exception $e) {
\App\Log::error($e->getMessage() . ' => ' . $e->getFile() . ':' . $e->getLine());
//var_dump($e->getMessage());
header('HTTP/1.1 400 Bad Request');
}

Expand Down
30 changes: 16 additions & 14 deletions include/CRMEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct()
$this->column_fields = getColumnFields(get_class($this));
}

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

/**
Expand Down Expand Up @@ -608,25 +605,30 @@ public function saveRelatedM2M($module, $crmid, $withModule, $withCrmid)
}
}

/**
* Function add info about relations
* @param string $module
* @param int $crmid
* @param string $withModule
* @param int $withCrmid
*/
public function saveRelatedToDB($module, $crmid, $withModule, $withCrmid)
{
$db = PearDatabase::getInstance();
foreach ($withCrmid as $relcrmid) {
if ($withModule == 'Documents') {
$checkpresence = $db->pquery('SELECT crmid FROM vtiger_senotesrel WHERE crmid = ? AND notesid = ?', [$crmid, $relcrmid]);
// Relation already exists? No need to add again
if ($checkpresence && $db->getRowCount($checkpresence))
if ($withModule === 'Documents') {
$checkpresence = (new \App\Db\Query())->select(['crmid'])->from('vtiger_senotesrel')->where(['crmid' => $crmid, 'notesid' => $relcrmid])->exists();
if ($checkpresence) {
continue;
}
\App\Db::getInstance()->createCommand()->insert('vtiger_senotesrel', [
'crmid' => $crmid,
'notesid' => $relcrmid
])->execute();
} else {
$checkpresence = $db->pquery('SELECT crmid FROM vtiger_crmentityrel WHERE crmid = ? AND module = ? AND relcrmid = ? AND relmodule = ?', [$crmid, $module, $relcrmid, $withModule]
);
// Relation already exists? No need to add again
if ($checkpresence && $db->getRowCount($checkpresence))
$checkpresence = (new \App\Db\Query())->select(['crmid'])->from('vtiger_crmentityrel')->where(['crmid' => $crmid, 'module' => $module, 'relcrmid' => $relcrmid, 'relmodule' => $withModule])->exists();
if ($checkpresence) {
continue;
}
\App\Db::getInstance()->createCommand()->insert('vtiger_crmentityrel', [
'crmid' => $crmid,
'module' => $module,
Expand Down
10 changes: 0 additions & 10 deletions include/CustomFieldUtil.php

This file was deleted.

10 changes: 3 additions & 7 deletions include/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Vtiger_Loader
* @param string $qualifiedName
* @return string Absolute File Name
*/
static function resolveNameToPath($qualifiedName, $fileExtension = 'php')
public static function resolveNameToPath($qualifiedName, $fileExtension = 'php')
{
$allowedExtensions = array('php', 'js', 'css', 'less');
$file = '';
Expand All @@ -51,7 +51,7 @@ static function resolveNameToPath($qualifiedName, $fileExtension = 'php')
* @param string $qualifiedName
* @return boolean
*/
static function includeOnce($qualifiedName)
public static function includeOnce($qualifiedName)
{

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

static function includePath($qualifiedName)
public static function includePath($qualifiedName)
{
// Already included?
if (isset(self::$includePathCache[$qualifiedName])) {
Expand Down Expand Up @@ -195,8 +195,4 @@ public static function autoLoad($className)
}
}

function vimport($qualifiedName)
{
return Vtiger_Loader::includeOnce($qualifiedName);
}
spl_autoload_register('Vtiger_Loader::autoLoad');
6 changes: 3 additions & 3 deletions include/Webservices/ConvertLead.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
require_once 'include/Webservices/DescribeObject.php';
require_once 'include/Loader.php';
require_once('include/ConfigUtils.php');
vimport('include.runtime.Globals');
Vtiger_Loader::includeOnce('include.runtime.Globals');

function vtws_convertlead($entityvalues, $user)
function vtws_convertlead($entityvalues, Users_Record_Model $user)
{
$adb = PearDatabase::getInstance();

Expand Down Expand Up @@ -238,7 +238,7 @@ function vtws_convertLeadTransferHandler($leadIdComponents, $entityIds, $entityv
return true;
}

function vtws_updateConvertLeadStatus($entityIds, $leadId, $user)
function vtws_updateConvertLeadStatus($entityIds, $leadId, Users_Record_Model $user)
{
$adb = PearDatabase::getInstance();

Expand Down
Loading

0 comments on commit 70584cd

Please sign in to comment.