Skip to content

Commit

Permalink
feat(ModComments) support for Import, Export and Deduplication
Browse files Browse the repository at this point in the history
  • Loading branch information
joebordes committed May 3, 2017
1 parent 5242d97 commit a1aa7f3
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
35 changes: 35 additions & 0 deletions build/changeSets/2017/ModCommentsImportExport.php
@@ -0,0 +1,35 @@
<?php
/*************************************************************************************************
* Copyright 2017 JPL TSolucio, S.L. -- This file is a part of TSOLUCIO coreBOS Customizations.
* Licensed under the vtiger CRM Public License Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You can redistribute it and/or modify it
* under the terms of the License. JPL TSolucio, S.L. reserves all rights not expressly
* granted by the License. coreBOS distributed by JPL TSolucio S.L. is distributed in
* the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Unless required by
* applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT ANY WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing
* permissions and limitations under the License. You may obtain a copy of the License
* at <http://corebos.org/documentation/doku.php?id=en:devel:vpl11>
*************************************************************************************************/

class ModCommentsImportExport extends cbupdaterWorker {

function applyChange() {
global $adb;
if ($this->hasError()) $this->sendError();
if ($this->isApplied()) {
$this->sendMsg('Changeset '.get_class($this).' already applied!');
} else {
global $adb;
$mcInstance = Vtiger_Module::getInstance('ModComments');
$mcInstance->enableTools(array('Import','Export','DuplicatesHandling'));

$this->sendMsg('Changeset '.get_class($this).' applied!');
$this->markApplied();
}
$this->finishExecution();
}

}
7 changes: 7 additions & 0 deletions modules/cbupdater/cbupdater.xml
Expand Up @@ -1172,4 +1172,11 @@
<classname>mysqlstrictAssets</classname>
<systemupdate>true</systemupdate>
</changeSet>
<changeSet>
<author>joebordes</author>
<description>Support for Import, Export and Deduplication on ModComments</description>
<filename>build/changeSets/2017/ModCommentsImportExport.php</filename>
<classname>ModCommentsImportExport</classname>
<systemupdate>true</systemupdate>
</changeSet>
</updatesChangeLog>

0 comments on commit a1aa7f3

Please sign in to comment.