Skip to content

Commit db52996

Browse files
committed
pREPARE RELEASE 4.0.0
1 parent 01da78a commit db52996

35 files changed

+84
-60
lines changed

admin/.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admin/.idea/com_logicaldoc.iml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admin/.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admin/.idea/php.xml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admin/controllers/configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php/** * Copyright (c) 2006-2024 LogicalDOC * WebSites: www.logicaldoc.com * * No bytes were intentionally harmed during the development of this application. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */defined('_JEXEC') or die;jimport('joomla.application.component.controller');class LogicalDOCControllerConfiguration extends JControllerLegacy { public function display($cachable = false,$urlparams = false) { parent::display(); } public function buscar() { require_once (JPATH_COMPONENT . DS . 'tables' . DS . 'configuration.php'); $row = JTable::getInstance('Configuration', 'Table'); // Load the data from the database $idConfiguration = JFactory::getApplication()->input->getInt('idConfiguration', 0); if ($idConfiguration) { $row->load($idConfiguration); $password = $row->password; $accessPassword = $row->accessPassword; } // Get the data from the request $postData = JFactory::getApplication()->input->post->getArray(); // Bind the data to the table object if (!$row->bind($postData)) { JError::raiseError(500, $row->getError()); } // If the password is not provided in the request, restore the original value if ($idConfiguration) { $passwordBind = $row->password; if ($passwordBind == '') { $row->password = $password; } $accessPasswordBind = $row->accessPassword; if ($accessPasswordBind == '') { $row->accessPassword = $accessPassword; } } // Store the data in the database if (!$row->store()) { JError::raiseError(500, $row->getError()); } $this->setRedirect('index.php?option=com_logicaldoc&view=configuration&layout=listconfiguration', JText::_('COM_LOGICALDOC_GUARDED')); } public function delete() { require_once (JPATH_COMPONENT . DS . 'tables' . DS . 'configuration.php'); $row = &JTable::getInstance('Configuration', 'Table'); $row->idConfiguration = JFactory::getApplication()->input->get('id'); if (!$row->delete()) { JError::raiseError(500, $row->getError()); } $this->setRedirect('index.php?option=com_logicaldoc&view=configuration&layout=listconfiguration', JText::_('COM_LOGICALDOC_DELETED')); } public function edit() { JFactory::getApplication()->input->set('view', 'configuration'); JFactory::getApplication()->input->set('layout', 'formconfiguration'); $this->display(); } public function test() { require_once (JPATH_COMPONENT . DS . 'tables' . DS . 'configuration.php'); $row = &JTable::getInstance('Configuration', 'Table'); $id = JFactory::getApplication()->input->get('id'); $row->load($id); $user = $row->username; $password = $row->password; $url = $row->url; $message = ""; try { $LDAuth = new SoapClient($url . '/services/Auth?wsdl'); // Login $loginResp = $LDAuth->login(array('username' => $user, 'password' => $password)); $token = $loginResp->return; $LDAuth->logout(array('sid' => $token)); $message = JText::_('COM_LOGICALDOC_CONNECTION_SUCCEEDED'); } catch (Exception $e) { $message = JText::_('COM_LOGICALDOC_CANNOT_ESTABLISH_A_CONNECTION'); } $this->setRedirect('index.php?option=com_logicaldoc&view=configuration&layout=listconfiguration', $message); } public function accessLevel() { require_once (JPATH_COMPONENT . DS . 'tables' . DS . 'configuration.php'); $row = &JTable::getInstance('Configuration', 'Table'); $id = JFactory::getApplication()->input->get('id'); $row->load($id); if ($row->accessLevel == 'Private') { $row->accessLevel = 'Public'; } else { $row->accessLevel = 'Private'; } if (!$row->store()) { JError::raiseError(500, $row->getError()); } $this->setRedirect('index.php?option=com_logicaldoc&view=configuration&layout=listconfiguration', JText::_('COM_LOGICALDOC_UPDATED')); } public function cancel() { $this->setRedirect('index.php?option=com_logicaldoc&view=configuration&layout=listconfiguration'); }}?>
1+
<?php/** * Copyright (c) 2006-2024 LogicalDOC * WebSites: www.logicaldoc.com * * No bytes were intentionally harmed during the development of this application. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */defined('_JEXEC') or die;jimport('joomla.application.component.controller');class LogicalDOCControllerConfiguration extends JControllerLegacy { public function display($cachable = false,$urlparams = false) { parent::display(); } public function buscar() { require_once (JPATH_COMPONENT . '/tables/configuration.php'); $row = JTable::getInstance('Configuration', 'Table'); // Load the data from the database $idConfiguration = JFactory::getApplication()->input->getInt('idConfiguration', 0); if ($idConfiguration) { $row->load($idConfiguration); $password = $row->password; $accessPassword = $row->accessPassword; } // Get the data from the request $postData = JFactory::getApplication()->input->post->getArray(); // Bind the data to the table object if (!$row->bind($postData)) { JError::raiseError(500, $row->getError()); } // If the password is not provided in the request, restore the original value if ($idConfiguration) { $passwordBind = $row->password; if ($passwordBind == '') { $row->password = $password; } $accessPasswordBind = $row->accessPassword; if ($accessPasswordBind == '') { $row->accessPassword = $accessPassword; } } // Store the data in the database if (!$row->store()) { JError::raiseError(500, $row->getError()); } $this->setRedirect('index.php?option=com_logicaldoc&view=configuration&layout=listconfiguration', JText::_('COM_LOGICALDOC_GUARDED')); } public function delete() { require_once (JPATH_COMPONENT . '/tables/configuration.php'); $row = &JTable::getInstance('Configuration', 'Table'); $row->idConfiguration = JFactory::getApplication()->input->get('id'); if (!$row->delete()) { JError::raiseError(500, $row->getError()); } $this->setRedirect('index.php?option=com_logicaldoc&view=configuration&layout=listconfiguration', JText::_('COM_LOGICALDOC_DELETED')); } public function edit() { JFactory::getApplication()->input->set('view', 'configuration'); JFactory::getApplication()->input->set('layout', 'formconfiguration'); $this->display(); } public function test() { require_once (JPATH_COMPONENT . '/tables/configuration.php'); $row = &JTable::getInstance('Configuration', 'Table'); $id = JFactory::getApplication()->input->get('id'); $row->load($id); $user = $row->username; $password = $row->password; $url = $row->url; $message = ""; try { $LDAuth = new SoapClient($url . '/services/Auth?wsdl'); // Login $loginResp = $LDAuth->login(array('username' => $user, 'password' => $password)); $token = $loginResp->return; $LDAuth->logout(array('sid' => $token)); $message = JText::_('COM_LOGICALDOC_CONNECTION_SUCCEEDED'); } catch (Exception $e) { $message = JText::_('COM_LOGICALDOC_CANNOT_ESTABLISH_A_CONNECTION'); } $this->setRedirect('index.php?option=com_logicaldoc&view=configuration&layout=listconfiguration', $message); } public function accessLevel() { require_once (JPATH_COMPONENT . '/tables/configuration.php'); $row = &JTable::getInstance('Configuration', 'Table'); $id = JFactory::getApplication()->input->get('id'); $row->load($id); if ($row->accessLevel == 'Private') { $row->accessLevel = 'Public'; } else { $row->accessLevel = 'Private'; } if (!$row->store()) { JError::raiseError(500, $row->getError()); } $this->setRedirect('index.php?option=com_logicaldoc&view=configuration&layout=listconfiguration', JText::_('COM_LOGICALDOC_UPDATED')); } public function cancel() { $this->setRedirect('index.php?option=com_logicaldoc&view=configuration&layout=listconfiguration'); }}?>

admin/controllers/explorer.php

Lines changed: 0 additions & 1 deletion
This file was deleted.

admin/controllers/search.php

Lines changed: 0 additions & 1 deletion
This file was deleted.

admin/logicaldoc.php

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,10 @@
4343
<script type="text/javascript" src="<?php echo JURI::base(true) . '/components/com_logicaldoc/assets/js/jquery.dataTables-1.9.4.js'; ?>"></script>
4444

4545
<?php
46-
if (!defined('DS'))
47-
define('DS', DIRECTORY_SEPARATOR);
4846
$controller = JFactory::getApplication()->input->get('view');
4947
switch ($controller) {
50-
case 'explorer':
51-
require_once(JPATH_COMPONENT . DS . 'controllers' . DS . $controller . '.php');
52-
$controllerName = 'LogicalDOCController' . $controller;
53-
$controller = new $controllerName();
54-
$controller->execute(JFactory::getApplication()->input->get('task'));
55-
$controller->redirect();
56-
break;
57-
case 'search':
58-
require_once(JPATH_COMPONENT . DS . 'controllers' . DS . $controller . '.php');
59-
$controllerName = 'LogicalDOCController' . $controller;
60-
$controller = new $controllerName();
61-
$controller->execute(JFactory::getApplication()->input->get('task'));
62-
$controller->redirect();
63-
break;
6448
case 'configuration':
65-
require_once(JPATH_COMPONENT . DS . 'controllers' . DS . $controller . '.php');
49+
require_once(JPATH_COMPONENT . '/controllers/' . $controller . '.php');
6650
$controllerName = 'LogicalDOCController' . $controller;
6751
$controller = new $controllerName();
6852
$controller->execute(JFactory::getApplication()->input->get('task'));
@@ -72,7 +56,7 @@
7256
$controller = 'configuration';
7357
JFactory::getApplication()->input->set('view', $controller);
7458
JFactory::getApplication()->input->set('layout', 'listconfiguration');
75-
require_once(JPATH_COMPONENT . DS . 'controllers' . DS . $controller . '.php');
59+
require_once(JPATH_COMPONENT . '/controllers/' . $controller . '.php');
7660
$controllerName = 'LogicalDOCController' . $controller;
7761
$controller = new $controllerName();
7862
$controller->execute(JFactory::getApplication()->input->get('task'));

0 commit comments

Comments
 (0)