Can edit permission for modules stored on an alternate document root directory.
This commit is contained in:
parent
4220aa58eb
commit
6c232bef62
16
ChangeLog
16
ChangeLog
@ -1,5 +1,21 @@
|
||||
English Dolibarr changelog
|
||||
|
||||
|
||||
***** Changelog for 2.7 compared to 2.6 *****
|
||||
|
||||
For users:
|
||||
- New: Add filter on status in emailing selector for Dolibarr users.
|
||||
|
||||
For translators:
|
||||
- Update some language files.
|
||||
|
||||
For developers:
|
||||
- Removed some deprecated files.
|
||||
- Creation of directory in module descriptor is simpler.
|
||||
- Can use an alternate document_root directory to develop with
|
||||
sources on two repositories.
|
||||
|
||||
|
||||
***** Changelog for 2.6 compared to 2.5 *****
|
||||
|
||||
For users:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -19,10 +19,10 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/admin/perms.php
|
||||
\ingroup core
|
||||
\brief Page d'administration/configuration des permissions par defaut
|
||||
\version $Id$
|
||||
* \file htdocs/admin/perms.php
|
||||
* \ingroup core
|
||||
* \brief Page d'administration/configuration des permissions par defaut
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
@ -75,12 +75,19 @@ print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
|
||||
// Charge les modules soumis a permissions
|
||||
$db->begin();
|
||||
|
||||
$dir = DOL_DOCUMENT_ROOT . "/includes/modules/";
|
||||
$handle=opendir($dir);
|
||||
// Charge les modules soumis a permissions
|
||||
$modules = array();
|
||||
foreach ($conf->dol_document_root as $dirroot)
|
||||
{
|
||||
$dir = $dirroot . "/includes/modules/";
|
||||
|
||||
// Load modules attributes in arrays (name, numero, orders) from dir directory
|
||||
//print $dir."\n<br>";
|
||||
$handle=@opendir($dir);
|
||||
if ($handle)
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, strlen($file) - 10) == '.class.php')
|
||||
@ -89,7 +96,7 @@ while (($file = readdir($handle))!==false)
|
||||
|
||||
if ($modName)
|
||||
{
|
||||
include_once("../includes/modules/$file");
|
||||
include_once($dir."/".$file);
|
||||
$objMod = new $modName($db);
|
||||
if ($objMod->rights_class) {
|
||||
|
||||
@ -101,6 +108,8 @@ while (($file = readdir($handle))!==false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$db->commit();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user