- 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.
73 lines
2.3 KiB
PHP
73 lines
2.3 KiB
PHP
<?php
|
|
require_once(realpath(dirname(__FILE__).'/../autoload_wf.php'));
|
|
|
|
class WfTaskOwnCloud_createshare extends \Workflow\Task
|
|
{
|
|
/**
|
|
* @var \Workflow\Preset\SimpleConfig
|
|
*/
|
|
private $_SC = null;
|
|
protected $_envSettings = array("share_id", 'share_url');
|
|
|
|
public function init()
|
|
{
|
|
$this->_SC = $this->addPreset("SimpleConfig", "details", array(
|
|
'templatename' => 'mainconfig',
|
|
));
|
|
|
|
if($this->isConfiguration()) {
|
|
$this->_SC->setColumnCount(1);
|
|
|
|
$this->_SC->addFields('providerid', 'OwnCloud Provider', 'provider', array(
|
|
'provider' => 'owncloud'
|
|
));
|
|
|
|
$this->_SC->addFields('path', 'Path', 'template');
|
|
$this->_SC->addFields('publicUpload', 'Public Upload', 'select', array(
|
|
'options' => array(
|
|
'false' => 'Do not allow public uploads',
|
|
'true' => 'Allow public upload',
|
|
)
|
|
));
|
|
$this->_SC->addFields('passwords', 'Passwords', 'password');
|
|
$this->_SC->addFields('expireDate', 'Expire date', 'template');
|
|
$this->_SC->addFields('note', 'Note', 'textarea');
|
|
|
|
}
|
|
|
|
}
|
|
public function handleTask(&$context) {
|
|
|
|
if($this->_SC->has('providerid')) {
|
|
/**
|
|
* @var $provider \Workflow\Plugins\ConnectionProvider\OwnCloud
|
|
*/
|
|
$provider = \Workflow\ConnectionProvider::getConnection($this->_SC->get('providerid'));
|
|
|
|
$response = $provider->CreateShare(
|
|
$this->_SC->get('path'),
|
|
$this->_SC->get('publicUpload'),
|
|
$this->_SC->get('passwords'),
|
|
$this->_SC->get('expireDate'),
|
|
$this->_SC->get('note')
|
|
);
|
|
|
|
$share_id = $response['ocs']['data']['id'];
|
|
$share_url = $response['ocs']['data']['url'];
|
|
|
|
$context->setEnvironment("share_id", $share_id, $this);
|
|
$context->setEnvironment("share_url", $share_url, $this);
|
|
|
|
}
|
|
|
|
return "yes";
|
|
}
|
|
|
|
public function beforeGetTaskform($viewer) {
|
|
/* Insert here source code to create custom configurations pages */
|
|
}
|
|
public function beforeSave(&$values) {
|
|
/* Insert here source code to modify the values the user submit on configuration */
|
|
}
|
|
}
|