- Added comprehensive AI Assistant system (aiassist/ directory): * Vector search and embedding capabilities * Typebot proxy integration * Elastic search functionality * Message classification and chat history * MCP proxy for external integrations - Implemented Court Status API (GetCourtStatus.php): * Real-time court document status checking * Integration with external court systems * Comprehensive error handling and logging - Enhanced S3 integration: * Improved file backup system with metadata * Batch processing capabilities * Enhanced error logging and recovery * Copy operations with URL fixing - Added Telegram contact creation API - Improved error logging across all modules - Enhanced callback system for AI responses - Extensive backup file storage with timestamps - Updated documentation and README files - File storage improvements: * Thousands of backup files with proper metadata * Fix operations for broken file references * Project-specific backup and recovery systems * Comprehensive file integrity checking Total: 26,461+ files added/modified including AWS SDK, vendor dependencies, and extensive backup system.
56 lines
2.7 KiB
PHP
56 lines
2.7 KiB
PHP
<?php
|
|
global $root_directory;
|
|
require_once($root_directory."/modules/Workflow2/autoload_wf.php");
|
|
|
|
class Settings_Workflow2_SidebarToggle_Action extends Settings_Vtiger_Basic_Action {
|
|
|
|
public function process(Vtiger_Request $request) {
|
|
$tabid = getTabId($request->get('workflowModule'));
|
|
$adb = \PearDatabase::getInstance();
|
|
|
|
if($request->get('hidden') == true) {
|
|
ob_start();
|
|
}
|
|
if(!empty($tabid)) {
|
|
$sql = "SELECT linkid FROM vtiger_links WHERE linktype = 'DETAILVIEWSIDEBARWIDGET' AND linklabel = 'Workflows' AND tabid = ".$tabid;
|
|
$result = $adb->query($sql);
|
|
$mode = $request->get('MODE');
|
|
|
|
if($mode == 'ADD' && $adb->num_rows($result) > 1) {
|
|
$adb->query("DELETE FROM vtiger_links WHERE (linktype = 'DETAILVIEWSIDEBARWIDGET' OR linktype = 'LISTVIEWSIDEBARWIDGET') AND linklabel = 'Workflows' AND tabid = ".$tabid, true);
|
|
|
|
$sql = "SELECT linkid FROM vtiger_links WHERE linktype = 'DETAILVIEWSIDEBARWIDGET' AND linklabel = 'Workflows' AND tabid = ".$tabid;
|
|
$result = $adb->query($sql);
|
|
}
|
|
|
|
if($mode == 'DEL' || (empty($mode) && $adb->num_rows($result) > 0)) {
|
|
$mode = 'DEL';
|
|
$adb->query("DELETE FROM vtiger_links WHERE (linktype = 'DETAILVIEWSIDEBARWIDGET' OR linktype = 'LISTVIEWSIDEBARWIDGET') AND linklabel = 'Workflows' AND tabid = ".$tabid, true);
|
|
|
|
echo getTranslatedString('LBL_ACTIVATE_SIDEBAR', 'Settings:Workflow2');
|
|
} elseif($adb->num_rows($result) == 0) {
|
|
$mode = 'ADD';
|
|
$linkid = $adb->getUniqueID("vtiger_links");
|
|
$adb->query("INSERT INTO vtiger_links SET linkid = '".$linkid."',linktype = 'DETAILVIEWSIDEBARWIDGET', linklabel = 'Workflows', tabid = ".$tabid.",linkurl='".'module=Workflow2&view=SidebarWidget'."'", true);
|
|
|
|
$linkid = $adb->getUniqueID("vtiger_links");
|
|
$adb->query("INSERT INTO vtiger_links SET linkid = '".$linkid."',linktype = 'LISTVIEWSIDEBARWIDGET', linklabel = 'Workflows', tabid = ".$tabid.",linkurl='".'module=Workflow2&src_module='.$request->get('workflowModule').'&view=SidebarListWidget'."'", true);
|
|
|
|
echo getTranslatedString('LBL_DEACTIVATE_SIDEBAR', 'Settings:Workflow2');
|
|
}
|
|
}
|
|
|
|
if($request->get('hidden') == true) {
|
|
ob_end_clean();
|
|
}
|
|
if($request->get('workflowModule') == 'Calendar') {
|
|
$request2 = $request;
|
|
|
|
$request->set('MODE', $mode);
|
|
$request->set('workflowModule', "Events");
|
|
$request->set('hidden', true);
|
|
$this->process($request);
|
|
}
|
|
|
|
}
|
|
} |