Index: branches/5.1.x/core/units/modules/modules_event_handler.php =================================================================== diff -u -r12127 -r12657 --- branches/5.1.x/core/units/modules/modules_event_handler.php (.../modules_event_handler.php) (revision 12127) +++ branches/5.1.x/core/units/modules/modules_event_handler.php (.../modules_event_handler.php) (revision 12657) @@ -1,6 +1,6 @@ SetDBField($status_field, $event->Name == 'OnMassApprove' ? 1 : 0); if ($object->Update()) { - $event->status = erSUCCESS; + $sql = 'UPDATE ' . TABLE_PREFIX . 'ImportScripts + SET Status = ' . ($event->Name == 'OnMassApprove' ? STATUS_ACTIVE : STATUS_DISABLED) . ' + WHERE Module = "' . $object->GetDBField('Name') . '"'; + $this->Conn->Query($sql); + + $event->status = erSUCCESS; $event->redirect_params = Array('opener' => 's'); //stay! } else { @@ -109,7 +116,7 @@ parent::OnAfterListQuery($event); $new_modules = $this->_getNewModules(); - if (!$new_modules) { + if (!$new_modules || $this->Application->RecallVar('user_id') != -1) { return ; } @@ -123,8 +130,10 @@ foreach ($new_modules as $module) { $module_record = Array ( 'Name' => $toolkit->getModuleName($module), - 'Loaded' => 0, + 'Path' => $module . '/', 'Version' => $toolkit->GetMaxModuleVersion($module), + 'Loaded' => 0, + 'BuildDate' => null, ); $object->addRecord($module_record); @@ -174,6 +183,4 @@ { return file_exists($folder . '/install.php') && file_exists($folder . '/install/install_schema.sql'); } - } - -?> \ No newline at end of file + } \ No newline at end of file