From be7c439fe5ff027bdd0897fd2856d0861ebbc45c Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Thu, 07 Jun 2012 11:03:07 -0400 Subject: [PATCH] Implemented: FS#2256 - Show contact name instead of login name in dashboardm if user is a client --- server/lib/classes/system.inc.php | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php index 5de2f81..c43a0cc 100644 --- a/server/lib/classes/system.inc.php +++ b/server/lib/classes/system.inc.php @@ -1253,6 +1253,34 @@ $app->log('Created Maildir '.$maildir_path.' with subfolder: '.$subfolder,LOGLEVEL_DEBUG); } + + //* Function to create directory paths and chown them to a user and group + function mkdirpath($path, $mode = 0755, $user = '', $group = '') { + $path_parts = explode('/',$path); + $new_path = ''; + if(is_array($path_parts)) { + foreach($path_parts as $part) { + $new_path .= '/'.$part; + if(!@is_dir($new_path)) { + mkdir($new_path); + chmod($new_path,$mode); + if($user != '') chown($new_path,$user); + if($group != '') chgrp($new_path,$group); + } + } + } + + } + + //* Check if a application is installed + function is_installed($appname) { + exec('which '.escapeshellcmd($appname).' 2> /dev/null',$out,$returncode); + if(isset($out[0]) && stristr($out[0],$appname) && $returncode == 0) { + return true; + } else { + return false; + } + } } ?> -- Gitblit v1.9.1