Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vtigercrm
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Welcome to Vtiger Community. To gain access for account, please contact [ community @ vtiger.com ]
Show more breadcrumbs
Maurice Courtois
vtigercrm
Commits
4870f1f5
Commit
4870f1f5
authored
8 years ago
by
Satish
Browse files
Options
Downloads
Patches
Plain Diff
Allow configuration of default Calendar View
parent
698e17c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/Migration/schema/660_to_700.php
+28
-0
28 additions, 0 deletions
modules/Migration/schema/660_to_700.php
modules/Vtiger/models/Relation.php
+1
-1
1 addition, 1 deletion
modules/Vtiger/models/Relation.php
with
29 additions
and
1 deletion
modules/Migration/schema/660_to_700.php
+
28
−
0
View file @
4870f1f5
...
...
@@ -75,6 +75,34 @@ if(defined('VTIGER_UPGRADE')) {
$db
->
pquery
(
'UPDATE vtiger_users SET defaulteventstatus=? WHERE defaulteventstatus=? OR defaulteventstatus IS NULL'
,
array
(
'Planned'
,
''
));
}
$moduleInstance
=
Vtiger_Module
::
getInstance
(
'Users'
);
$blockInstance
=
Vtiger_Block
::
getInstance
(
'LBL_CALENDAR_SETTINGS'
,
$moduleInstance
);
if
(
$blockInstance
)
{
$fieldInstance
=
Vtiger_Field
::
getInstance
(
'defaultcalendarview'
,
$moduleInstance
);
if
(
!
$fieldInstance
)
{
$fieldInstance
=
new
Vtiger_Field
();
$fieldInstance
->
name
=
'defaultcalendarview'
;
$fieldInstance
->
label
=
'Default Calendar View'
;
$fieldInstance
->
table
=
'vtiger_users'
;
$fieldInstance
->
column
=
'defaultcalendarview'
;
$fieldInstance
->
uitype
=
'16'
;
$fieldInstance
->
presence
=
'0'
;
$fieldInstance
->
typeofdata
=
'V~O'
;
$fieldInstance
->
columntype
=
'VARCHAR(100)'
;
$fieldInstance
->
defaultvalue
=
'MyCalendar'
;
$blockInstance
->
addField
(
$fieldInstance
);
$fieldInstance
->
setPicklistValues
(
array
(
'ListView'
,
'MyCalendar'
,
'SharedCalendar'
));
echo
'<br>Default Calendar view field added <br>'
;
}
}
$allUsers
=
Users_Record_Model
::
getAll
(
true
);
foreach
(
$allUsers
as
$userId
=>
$userModel
)
{
$db
->
pquery
(
'UPDATE vtiger_users SET defaultcalendarview=? WHERE id=?'
,
array
(
'MyCalendar'
,
$userId
));
}
echo
'Default calendar view updated for all active users <br>'
;
$fieldNamesList
=
array
();
$updateQuery
=
'UPDATE vtiger_field SET fieldlabel = CASE fieldname'
;
$result
=
$db
->
pquery
(
'SELECT taxname, taxlabel FROM vtiger_inventorytaxinfo'
,
array
());
...
...
This diff is collapsed.
Click to expand it.
modules/Vtiger/models/Relation.php
+
1
−
1
View file @
4870f1f5
...
...
@@ -120,7 +120,7 @@ class Vtiger_Relation_Model extends Vtiger_Base_Model{
$focus
=
CRMEntity
::
getInstance
(
$relatedModuleName
);
$query
=
$focus
->
$functionName
(
$parentRecord
->
getId
());
}
else
{
$query
=
$parentModuleModel
->
getRelationQuery
(
$parentRecord
->
getId
(),
$functionName
,
$relatedModuleModel
);
$query
=
$parentModuleModel
->
getRelationQuery
(
$parentRecord
->
getId
(),
$functionName
,
$relatedModuleModel
,
$this
->
getId
()
);
}
return
$query
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment