1. hatbe7
  2. Support
  3. Tuesday, October 18 2016, 09:51 AM
Hi,

is there a way to disable the jsn update_trigger plugin (I used the skeleton plugin) during import to avoid being notified on any change that was caused by the mass import.

I build below function which i call before and after the import but stillreceive the notifications. I verified that the plugin status gets correctly updated in database but seems like the actual setting is not queried when saving the data to the tables.


private function change_component_status($component,$type,$folder, $enabled)
{
$db=JFactory::getDbo();
$query = $db->getQuery(true);
// Fields to update.
$fields = array(
$db->quoteName('enabled'). ' = ' . $enabled
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('type') . ' = '. $db->quote($type),
$db->quoteName('element') . ' = '. $db->quote($component),
$db->quoteName('folder') . ' = '. $db->quote($folder)
);

$query->update($db->quoteName('#__extensions'))->set($fields)->where($conditions);
$db->setQuery($query);
$db->execute();
return;
}


Appreciate any advise
Accepted Answer
admin Accepted Answer
Admin
Hi,
is there a way to disable the jsn update_trigger plugin (I used the skeleton plugin) during import
Nope, but you add a check URL parameter to understand if registration comes from Import plugin:


public function triggerProfileUpdate($user,&$data,$changed,$isNew){
$app = JFactory::getApplication();
$input = $app->input
if( $input->get('view','') != 'import' ) {
/* HERE YOUR CODE */
}
}

if url is like index.php?option=com_jsn&view=import then the code will be ignored.
  1. more than a month ago
  2. Support
  3. # Permalink


There are no replies made for this post yet.
However, you are not allowed to reply to this post.