| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/lemans/administrator/components/com_djcatalog2/models/ |
Upload File : |
<?php
/**
* @package DJ-Catalog2
* @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
* @license http://www.gnu.org/licenses GNU/GPL
* @author url: http://dj-extensions.com
* @author email contact@dj-extensions.com
*
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Factory;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Language\Text;
jimport( 'joomla.application.component.helper');
jimport( 'joomla.application.component.model');
class DJCatalog2ModelCPanel extends BaseDatabaseModel {
function __construct()
{
parent::__construct();
}
function performChecks() {
$app = Factory::getApplication();
$siteApp = Factory::getApplication('Site');
$menus = $siteApp->getMenu('Site');
$component = ComponentHelper::getComponent('com_djcatalog2');
$menu_items = $menus->getItems('component_id', $component->id);
$checks = array();
$checks['images'] = DJCATIMGFOLDER;
$checks['custom_images'] = DJCATIMGFOLDER.'/custom';
$checks['attachments'] = DJCATATTFOLDER;
$checks['licence'] = JPATH_ROOT.'/components/com_djcatalog2';
foreach ($checks as $type => $folder) {
if (!is_writable($folder)) {
$app->enqueueMessage(Text::_('COM_DJCATALOG2_FOLDER_CHECK_'.strtoupper($type)), 'warning');
}
}
if (!extension_loaded('gd')){
$app->enqueueMessage(Text::_('COM_DJCATALOG2_GD_CHECK_FAIL'), 'warning');
}
$root_menu_found = false;
foreach ($menu_items as $item) {
if (isset($item->query)) {
if (array_key_exists('view', $item->query)) {
$cid = 0;
if (isset($item->query['cid'])) {
$cid = (int)$item->query['cid'];
}
if ($item->query['view'] == 'items' && $cid == 0) {
$root_menu_found = true;
break;
}
}
}
}
if ($root_menu_found === false) {
$app->enqueueMessage(Text::_('COM_DJCATALOG2_MENU_CHECK_FAIL'), 'message');
}
}
}
?>