Commit e01c7349 authored by Benoit Mortier's avatar Benoit Mortier
Browse files

Fixes: #981 Improve the FusionDirectory API

Showing with 78 additions and 29 deletions
+78 -29
<?php <?php
require_once('variables_common.inc'); require_once('variables_common.inc');
/*! \file /*!
* \file variables.inc
* Define common locations and variables * Define common locations and variables
* Generated by fusiondirectory-setup */ * Generated by fusiondirectory-setup
*/
if(!defined("CONFIG_DIR")){ if(!defined("CONFIG_DIR")){
define ("CONFIG_DIR", "/etc/fusiondirectory/"); /* FusionDirectory etc path */ define ("CONFIG_DIR", "/etc/fusiondirectory/"); /* FusionDirectory etc path */
} }
/* Allow setting the config file in the apache configuration /*!
e.g. SetEnv CONFIG_FILE fusiondirectory.conf 1.0 * \brief Allow setting the config file in the apache configuration
* e.g. SetEnv CONFIG_FILE fusiondirectory.conf 1.0
*/ */
if(!defined("CONFIG_FILE")){ if(!defined("CONFIG_FILE")){
define ("CONFIG_FILE", "fusiondirectory.conf"); /* FusionDirectory filename */ define ("CONFIG_FILE", "fusiondirectory.conf"); /* FusionDirectory filename */
} }
/* Smarty compile dir */ /*!
* \brief Smarty compile dir
*/
define ("SPOOL_DIR","/var/spool/fusiondirectory/"); /* FusionDirectory spool directory */ define ("SPOOL_DIR","/var/spool/fusiondirectory/"); /* FusionDirectory spool directory */
/* Global cache dir */ /*!
* \brief Global cache dir
*/
define ("CACHE_DIR","/var/cache/fusiondirectory/"); /* FusionDirectory var directory */ define ("CACHE_DIR","/var/cache/fusiondirectory/"); /* FusionDirectory var directory */
/* Global locale cache dir */ /*!
* \brief Global locale cache dir
*/
define ("LOCALE_DIR", "/var/cache/fusiondirectory/locale/"); /* FusionDirectory locale directory */ define ("LOCALE_DIR", "/var/cache/fusiondirectory/locale/"); /* FusionDirectory locale directory */
/* Global tmp dir */ /*!
* \brief Global tmp dir
*/
define ("TEMP_DIR", "/var/cache/fusiondirectory/tmp/"); /* FusionDirectory tmp directory */ define ("TEMP_DIR", "/var/cache/fusiondirectory/tmp/"); /* FusionDirectory tmp directory */
/* Directory containing the configuration template */ /*!
* \brief Directory containing the configuration template
*/
define ("CONFIG_TEMPLATE_DIR", "/var/cache/fusiondirectory/template/"); /* FusionDirectory template directory */ define ("CONFIG_TEMPLATE_DIR", "/var/cache/fusiondirectory/template/"); /* FusionDirectory template directory */
/* Directory containing the fai logs */ /*!
* \brief Directory containing the fai logs
*/
define ("FAI_LOG_DIR", "/var/cache/fusiondirectory/fai/"); /* FusionDirectory fai directory */ define ("FAI_LOG_DIR", "/var/cache/fusiondirectory/fai/"); /* FusionDirectory fai directory */
/* Directory containing the vacation files */ /*!
* \brief Directory containing the vacation files
*/
define ("VACATION_DIR", "/var/cache/fusiondirectory/vacation/"); /* FusionDirectory vacation directory */ define ("VACATION_DIR", "/var/cache/fusiondirectory/vacation/"); /* FusionDirectory vacation directory */
/* Directory containing the vacation files */ /*!
* \brief Directory containing the vacation files
*/
define ("SUPANN_DIR", "/var/cache/fusiondirectory/supann/"); /* FusionDirectory supann template directory */ define ("SUPANN_DIR", "/var/cache/fusiondirectory/supann/"); /* FusionDirectory supann template directory */
/* Directory containing the asterisk files */ /*!
* \brief Directory containing the asterisk files
*/
define ("ASTERISK_DIR", "/var/cache/fusiondirectory/asterisk/"); /* FusionDirectory asterisk template directory */ define ("ASTERISK_DIR", "/var/cache/fusiondirectory/asterisk/"); /* FusionDirectory asterisk template directory */
/* Directory containing the systems files */ /*!
* \brief Directory containing the systems files
*/
define ("SYSTEMS_DIR", "/var/cache/fusiondirectory/systems/"); /* FusionDirectory systems template directory */ define ("SYSTEMS_DIR", "/var/cache/fusiondirectory/systems/"); /* FusionDirectory systems template directory */
/* Directory containing the mail files */ /*!
* \brief Directory containing the mail files
*/
define ("MAIL_DIR", "/var/cache/fusiondirectory/mail/"); /* FusionDirectory mail template directory */ define ("MAIL_DIR", "/var/cache/fusiondirectory/mail/"); /* FusionDirectory mail template directory */
/* name of the class.cache file */ /*!
* \brief name of the class.cache file
*/
define("CLASS_CACHE", "class.cache"); /* name of the class cache */ define("CLASS_CACHE", "class.cache"); /* name of the class cache */
?> ?>
...@@ -20,42 +20,64 @@ ...@@ -20,42 +20,64 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
/*! \file /*!
* Define common locations and variables */ * \file variables_common.inc
* Define common locations and variables
*/
/* Allow setting the config file in the apache configuration /*
e.g. SetEnv CONFIG_DIR /etc/fusiondirectory * \brief Allow setting the config file in the apache configuration
* e.g. SetEnv CONFIG_DIR /etc/fusiondirectory
*/ */
if(isset($_SERVER['CONFIG_DIR'])){ if(isset($_SERVER['CONFIG_DIR'])){
define ("CONFIG_DIR",$_SERVER['CONFIG_DIR']); define ("CONFIG_DIR",$_SERVER['CONFIG_DIR']);
} }
/* Allow setting the config file in the apache configuration /*
e.g. SetEnv CONFIG_FILE fusiondirectory.conf 1.0 * \brief Allow setting the config file in the apache configuration
* e.g. SetEnv CONFIG_FILE fusiondirectory.conf 1.0
*/ */
if(isset($_SERVER['CONFIG_FILE'])){ if(isset($_SERVER['CONFIG_FILE'])){
define ("CONFIG_FILE",$_SERVER['CONFIG_FILE']); define ("CONFIG_FILE",$_SERVER['CONFIG_FILE']);
} }
/* php library path */ /*!
* \brief php library path
*/
define ("PHP_DIR", "/usr/share/php"); /*! Define php directory */ define ("PHP_DIR", "/usr/share/php"); /*! Define php directory */
/* php pear path */ /*!
* \brief php pear path
*/
define ("PEAR_DIR", "/usr/share/php"); /*! Define PEAR directory */ define ("PEAR_DIR", "/usr/share/php"); /*! Define PEAR directory */
/* fpdf library path */ /*!
* \brief fpdf library path
*/
define("FPDF","/usr/share/php/fpdf/fpdf.php"); /*! Define fpdf library path */ define("FPDF","/usr/share/php/fpdf/fpdf.php"); /*! Define fpdf library path */
/* Global FPDF FONT define */ /*!
* \brief Global FPDF FONT define
*/
define("FPDF_FONTPATH", "/usr/share/php/fpdf/font/"); /*! Define fpdf font path */ define("FPDF_FONTPATH", "/usr/share/php/fpdf/font/"); /*! Define fpdf font path */
/* path for smarty libraries */ /*!
* \brief Path for smarty libraries
*/
define("SMARTY", "/usr/share/php/smarty/libs/Smarty.class.php"); /*! Define smarty2 library path */ define("SMARTY", "/usr/share/php/smarty/libs/Smarty.class.php"); /*! Define smarty2 library path */
/*!
* \brief Path for smarty3 libraries
*/
define("SMARTY3", "/usr/share/php/smarty3/Smarty.class.php"); /*! Define smarty3 library path */ define("SMARTY3", "/usr/share/php/smarty3/Smarty.class.php"); /*! Define smarty3 library path */
/* name of the utility used to create windows passwords */ /*!
* \brief name of the utility used to create windows passwords
*/
define ("MKNTPWD", "/usr/sbin/fusiondirectory-mkntpassword"); /*! Define the name of the binary used to create smb password */ define ("MKNTPWD", "/usr/sbin/fusiondirectory-mkntpassword"); /*! Define the name of the binary used to create smb password */
/* FusionDirectory Version */ /*!
* \brief FusionDirectory Version
*/
define ("FD_VERSION", "1.0.3"); /*! Define FusionDirectory version */ define ("FD_VERSION", "1.0.3"); /*! Define FusionDirectory version */
?> ?>
  • bmortier @bmortier

    mentioned in issue #370 (closed)

    By sabaku on 2017-09-02T14:45:23 (imported from GitLab)

    ·

    mentioned in issue #370 (closed)

    By sabaku on 2017-09-02T14:45:23 (imported from GitLab)

    Toggle commit list
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment