diff --git a/contrib/bin/fusiondirectory-setup b/contrib/bin/fusiondirectory-setup index d3bd4a1bc853a2c6c92dcf7587e60f6b03361ba0..9888ddd643a41cec073d5d2bec8e3d3abb2ce21f 100644 --- a/contrib/bin/fusiondirectory-setup +++ b/contrib/bin/fusiondirectory-setup @@ -440,22 +440,22 @@ sub check_config { sub write_vars { my $filecontent = <<eof; <?php - require_once('variables_common.inc'); +require_once('variables_common.inc'); - /*! \\file - * Define common locations and variables - * Generated by fusiondirectory-setup */ +/*! \\file + * Define common locations and variables + * Generated by fusiondirectory-setup */ - if(!defined("CONFIG_DIR")){ - define ("CONFIG_DIR", "$vars{fd_config_dir}/"); /* FusionDirectory etc path */ - } +if (!defined("CONFIG_DIR")) { + define ("CONFIG_DIR", "$vars{fd_config_dir}/"); /* FusionDirectory etc path */ +} - /* Allow setting the config file in the apache configuration - e.g. SetEnv CONFIG_FILE fusiondirectory.conf 1.0 - */ - if(!defined("CONFIG_FILE")){ - define ("CONFIG_FILE", "$vars{config_file}"); /* FusionDirectory filename */ - } +/* Allow setting the config file in the apache configuration + e.g. SetEnv CONFIG_FILE fusiondirectory.conf 1.0 + */ +if (!defined("CONFIG_FILE")) { + define ("CONFIG_FILE", "$vars{config_file}"); /* FusionDirectory filename */ +} /* Path for smarty3 libraries */ define("SMARTY", "$vars{fd_smarty_dir}"); @@ -463,26 +463,26 @@ define("SMARTY", "$vars{fd_smarty_dir}"); /* Smarty compile dir */ define ("SPOOL_DIR", "$vars{fd_spool_dir}/"); /* FusionDirectory spool directory */ - /* Global cache dir */ - define ("CACHE_DIR","$vars{fd_cache}/"); /* FusionDirectory var directory */ +/* Global cache dir */ +define ("CACHE_DIR", "$vars{fd_cache}/"); /* FusionDirectory var directory */ - /* Global locale cache dir */ - define ("LOCALE_DIR", "$locale_cache_dir/"); /* FusionDirectory locale directory */ +/* Global locale cache dir */ +define ("LOCALE_DIR", "$locale_cache_dir/"); /* FusionDirectory locale directory */ - /* Global tmp dir */ - define ("TEMP_DIR", "$tmp_dir/"); /* FusionDirectory tmp directory */ +/* Global tmp dir */ +define ("TEMP_DIR", "$tmp_dir/"); /* FusionDirectory tmp directory */ - /* Directory containing the configuration template */ - define ("CONFIG_TEMPLATE_DIR", "$template_dir/"); /* FusionDirectory template directory */ +/* Directory containing the configuration template */ +define ("CONFIG_TEMPLATE_DIR", "$template_dir/"); /* FusionDirectory template directory */ - /* Directory containing the fai logs */ - define ("FAI_LOG_DIR", "$fai_log_dir/"); /* FusionDirectory fai directory */ +/* Directory containing the fai logs */ +define ("FAI_LOG_DIR", "$fai_log_dir/"); /* FusionDirectory fai directory */ - /* Directory containing the supann files - define ("SUPANN_DIR", "$vars{fd_config_dir}/supann/"); /* FusionDirectory supann template directory */ +/* Directory containing the supann files +define ("SUPANN_DIR", "$vars{fd_config_dir}/supann/"); /* FusionDirectory supann template directory */ - /* name of the class.cache file */ - define("CLASS_CACHE", "$vars{class_cache}"); /* name of the class cache */ +/* name of the class.cache file */ +define("CLASS_CACHE", "$vars{class_cache}"); /* name of the class cache */ ?> eof diff --git a/include/variables.inc b/include/variables.inc index b32730aa3a4ef5ec80378e2be717cb95db95475e..22957d37eca8932d2f214c43fab48631376f20ae 100644 --- a/include/variables.inc +++ b/include/variables.inc @@ -1,5 +1,4 @@ <?php - /* This code is part of FusionDirectory (http://www.fusiondirectory.org/) Copyright (C) 2003-2010 Cajus Pollmeier @@ -46,6 +45,7 @@ if (!defined("CONFIG_FILE")) { define("SMARTY", "/usr/share/php/smarty3/Smarty.class.php"); /*! + * \brief Smarty compile dir */ define ("SPOOL_DIR", "/var/spool/fusiondirectory/"); /* FusionDirectory spool directory */ diff --git a/include/variables_common.inc b/include/variables_common.inc index 24b3a01f188561d91dea7a125f61ca12ba356aca..1dc69177dfd1416c89e9d73b1d06cf3b41aef3f5 100644 --- a/include/variables_common.inc +++ b/include/variables_common.inc @@ -1,5 +1,4 @@ <?php - /* This code is part of FusionDirectory (http://www.fusiondirectory.org/) Copyright (C) 2003-2010 Cajus Pollmeier @@ -29,16 +28,16 @@ * \brief Allow setting the config file in the apache configuration * e.g. SetEnv CONFIG_DIR /etc/fusiondirectory */ -if(isset($_SERVER['CONFIG_DIR'])){ - define ("CONFIG_DIR",$_SERVER['CONFIG_DIR']); +if (isset($_SERVER['CONFIG_DIR'])) { + define ("CONFIG_DIR", $_SERVER['CONFIG_DIR']); } /* * \brief Allow setting the config file in the apache configuration * e.g. SetEnv CONFIG_FILE fusiondirectory.conf 1.0 */ -if(isset($_SERVER['CONFIG_FILE'])){ - define ("CONFIG_FILE",$_SERVER['CONFIG_FILE']); +if (isset($_SERVER['CONFIG_FILE'])) { + define ("CONFIG_FILE", $_SERVER['CONFIG_FILE']); } /*! @@ -54,7 +53,7 @@ define ("PEAR_DIR", "/usr/share/php"); /*! Define PEAR directory */ /*! * \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 */ /*! * \brief Global FPDF FONT define @@ -70,4 +69,5 @@ define ("FD_VERSION", "1.0.8-dev"); /*! Define FusionDirectory version */ * \brief FusionDirectory config object RDN */ define ("CONFIGRDN", "cn=fusiondirectory,ou=configs,"); /*! Define FusionDirectory config object */ + ?> diff --git a/plugins/personal/password/class_password.inc b/plugins/personal/password/class_password.inc index 3a860a52d3350c72b42379222ee893d12e514dc9..0f0836da6ed7202e299d729abfe6763c0444f222 100644 --- a/plugins/personal/password/class_password.inc +++ b/plugins/personal/password/class_password.inc @@ -1,5 +1,4 @@ <?php - /* This code is part of FusionDirectory (http://www.fusiondirectory.org/) Copyright (C) 2003 Cajus Pollmeier @@ -30,7 +29,7 @@ class password extends plugin function password(&$config, $dn = NULL, $parent = NULL) { - plugin::plugin($config, $dn, $parent); + parent::__construct($config, $dn, $parent); // Try to generate a password proposal, if this is successfull // then preselect the proposal usage. @@ -47,8 +46,8 @@ class password extends plugin function refreshProposal() { - $this->proposal = passwordMethod::getPasswordProposal($this->config); - $this->proposalEnabled = (!empty($this->proposal)); + $this->proposal = passwordMethod::getPasswordProposal($this->config); + $this->proposalEnabled = (!empty($this->proposal)); } function execute() diff --git a/plugins/personal/password/main.inc b/plugins/personal/password/main.inc index a7e90b749821737342c78ab846d999f9297117f1..f0b336300e9365950f1cd94373f7984cc5a01086 100644 --- a/plugins/personal/password/main.inc +++ b/plugins/personal/password/main.inc @@ -1,5 +1,4 @@ <?php - /* This code is part of FusionDirectory (http://www.fusiondirectory.org/) Copyright (C) 2003 Cajus Pollmeier @@ -21,39 +20,36 @@ */ /* Remove locks created by this plugin */ -$lock_msg=""; -if ($remove_lock){ - if(session::is_set('password')){ +$lock_msg = ""; +if ($remove_lock) { + if (session::is_set('password')) { //Nothing to do here } } /* Remove this plugin from session */ -if ( $cleanup ){ +if ($cleanup) { session::un_set('password'); session::un_set('edit'); -}else{ - +} else { /* Reset requested? */ - if (isset($_POST['edit_cancel'])){ - session::un_set ('edit'); - session::un_set ('password'); + if (isset($_POST['edit_cancel'])) { + session::un_set('edit'); + session::un_set('password'); } /* Create password object on demand */ - if (!session::is_set('password') || (isset($_GET['reset']) && $_GET['reset'] == 1)){ + if (!session::is_set('password') || (isset($_GET['reset']) && $_GET['reset'] == 1)) { session::set('password', new password ($config, $ui->dn)); } $password = session::get('password'); /* Execute formular */ - $display.= $password->execute (); + $display .= $password->execute(); /* Page header*/ $display = print_header(get_template_path('plugins/password/images/icon.png'), _("Password settings"), "").$display; } - -// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>