From bf7b4e446fb95739a060b8708cc58d3d7c11acb9 Mon Sep 17 00:00:00 2001
From: satish <satish.dvnk@vtiger.com>
Date: Tue, 21 Feb 2017 19:09:30 +0530
Subject: [PATCH] Fixes #410 - Create module using vtlib in all Profiles the
 "Create" option is disabled by default. Fixes #443 - Star Follow

---
 modules/Home/models/Module.php      | 4 +++-
 modules/Vtiger/actions/SaveStar.php | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/Home/models/Module.php b/modules/Home/models/Module.php
index de3b0ec53..2bea4aa11 100644
--- a/modules/Home/models/Module.php
+++ b/modules/Home/models/Module.php
@@ -84,7 +84,9 @@ class Home_Module_Model extends Vtiger_Module_Model {
 	 * @param <String> $type - comments, updates or all
 	 * @return <Array>
 	 */
-	public function getHistory($pagingModel, $type='all', $userId='all', $dateFilter='') {
+	public function getHistory($pagingModel, $type='', $userId='', $dateFilter='') {
+		if(!$userId)	$userId	= 'all';
+		if(!$type)		$type	= 'all';
 		//TODO: need to handle security
 		$comments = array();
 		if($type == 'all' || $type == 'comments') {
diff --git a/modules/Vtiger/actions/SaveStar.php b/modules/Vtiger/actions/SaveStar.php
index 3c4944cd0..953f2b209 100644
--- a/modules/Vtiger/actions/SaveStar.php
+++ b/modules/Vtiger/actions/SaveStar.php
@@ -30,6 +30,7 @@ class Vtiger_SaveStar_Action extends Vtiger_Mass_Action {
 			$focus = CRMEntity::getInstance($module);
 			$focus->mode = "edit";
 			$focus->id = $recordId;
+			$focus->column_fields->startTracking();
 			$focus->column_fields['starred'] = $request->get('value');
 			$focus->insertIntoEntityTable($moduleUserSpecificTableName, $module);
 		}
-- 
GitLab