From c15fcdfb522a9f920a2b9378c6c3249bd4d5b430 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 2 May 2016 22:26:40 +0000 Subject: [PATCH] WIP egw installs now without phpgwapi and allows to login --- api/src/Accounts/Sql.php | 2 +- api/src/Egw.php | 39 +++++---- api/src/Egw/Base.php | 16 ++-- api/src/Framework.php | 79 +++++++++++------- api/templates/default/default.css | 18 ++-- .../css => api/templates/default}/idots.css | 12 +-- .../images/appbox-header-background.png | Bin .../default}/images/background-icon-bar.png | Bin .../templates/default}/images/bgtopmenu2.png | Bin .../default/images/body-background.png | Bin 0 -> 240 bytes .../templates/default/images/favicon.ico | Bin api/templates/default/images/gradient22.png | Bin 0 -> 280 bytes .../templates/default/images/logo.png | Bin .../templates/default/images/logo.svg | 0 .../default}/images/resize-transparent.png | Bin .../templates/default}/images/resize.png | Bin login.php | 56 +++++++------ logout.php | 20 +++-- setup/admin_account.php | 16 ++-- setup/applications.php | 28 +++---- setup/check_install.php | 7 +- setup/config.php | 3 +- setup/inc/class.setup.inc.php | 27 ++++-- setup/inc/class.setup_cmd_config.inc.php | 20 ++--- setup/inc/class.setup_detection.inc.php | 6 +- setup/inc/class.setup_html.inc.php | 14 ++-- setup/inc/class.setup_process.inc.php | 29 ++++--- setup/index.php | 2 +- setup/manageheader.php | 2 +- setup/schematoy.php | 14 ++-- setup/sqltoarray.php | 18 ++-- setup/templates/default/head.tpl | 29 +++---- setup/templates/default/images/spacer.gif | Bin 0 -> 43 bytes setup/templates/default/manageheader.tpl | 12 +-- 34 files changed, 258 insertions(+), 211 deletions(-) rename {phpgwapi/templates/idots/css => api/templates/default}/idots.css (86%) rename {phpgwapi/templates/idots => api/templates/default}/images/appbox-header-background.png (100%) rename {phpgwapi/templates/idots => api/templates/default}/images/background-icon-bar.png (100%) rename {phpgwapi/templates/idots => api/templates/default}/images/bgtopmenu2.png (100%) create mode 100644 api/templates/default/images/body-background.png rename {phpgwapi => api}/templates/default/images/favicon.ico (100%) create mode 100644 api/templates/default/images/gradient22.png rename {phpgwapi => api}/templates/default/images/logo.png (100%) rename {phpgwapi => api}/templates/default/images/logo.svg (100%) rename {phpgwapi/templates/idots => api/templates/default}/images/resize-transparent.png (100%) rename {phpgwapi/templates/idots => api/templates/default}/images/resize.png (100%) create mode 100755 setup/templates/default/images/spacer.gif diff --git a/api/src/Accounts/Sql.php b/api/src/Accounts/Sql.php index dac6634bda..823db6599a 100644 --- a/api/src/Accounts/Sql.php +++ b/api/src/Accounts/Sql.php @@ -323,7 +323,7 @@ class Sql { if (!(int)$account_id) return; - $acl =& CreateObject('phpgwapi.acl',$account_id); + $acl = new Api\Acl($account_id); $acl->read_repository(); $acl->delete('phpgw_group',false); diff --git a/api/src/Egw.php b/api/src/Egw.php index 257d9f2660..d33bb02a0d 100644 --- a/api/src/Egw.php +++ b/api/src/Egw.php @@ -407,23 +407,26 @@ class Egw extends Egw\Base define('PHPGW_ACL_CUSTOM_2',128); define('PHPGW_ACL_CUSTOM_3',256); // A few hacker resistant constants that will be used throught the program - define('EGW_TEMPLATE_DIR', $this->common->get_tpl_dir('phpgwapi')); - define('EGW_IMAGES_DIR', $this->common->get_image_path('phpgwapi')); - define('EGW_IMAGES_FILEDIR', $this->common->get_image_dir('phpgwapi')); - define('EGW_APP_ROOT', $this->common->get_app_dir()); - define('EGW_APP_INC', $this->common->get_inc_dir()); - define('EGW_APP_TPL', $this->common->get_tpl_dir()); - define('EGW_IMAGES', $this->common->get_image_path()); - define('EGW_APP_IMAGES_DIR', $this->common->get_image_dir()); - // and the old ones - define('PHPGW_TEMPLATE_DIR',EGW_TEMPLATE_DIR); - define('PHPGW_IMAGES_DIR',EGW_IMAGES_DIR); - define('PHPGW_IMAGES_FILEDIR',EGW_IMAGES_FILEDIR); - define('PHPGW_APP_ROOT',EGW_APP_ROOT); - define('PHPGW_APP_INC',EGW_APP_INC); - define('PHPGW_APP_TPL',EGW_APP_TPL); - define('PHPGW_IMAGES',EGW_IMAGES); - define('PHPGW_APP_IMAGES_DIR',EGW_APP_IMAGES_DIR); + if (file_exists(EGW_SERVER_ROOT.'/phpgwapi')) + { + define('EGW_TEMPLATE_DIR', $this->common->get_tpl_dir('phpgwapi')); + define('EGW_IMAGES_DIR', $this->common->get_image_path('phpgwapi')); + define('EGW_IMAGES_FILEDIR', $this->common->get_image_dir('phpgwapi')); + define('EGW_APP_ROOT', $this->common->get_app_dir()); + define('EGW_APP_INC', $this->common->get_inc_dir()); + define('EGW_APP_TPL', $this->common->get_tpl_dir()); + define('EGW_IMAGES', $this->common->get_image_path()); + define('EGW_APP_IMAGES_DIR', $this->common->get_image_dir()); + // and the old ones + define('PHPGW_TEMPLATE_DIR',EGW_TEMPLATE_DIR); + define('PHPGW_IMAGES_DIR',EGW_IMAGES_DIR); + define('PHPGW_IMAGES_FILEDIR',EGW_IMAGES_FILEDIR); + define('PHPGW_APP_ROOT',EGW_APP_ROOT); + define('PHPGW_APP_INC',EGW_APP_INC); + define('PHPGW_APP_TPL',EGW_APP_TPL); + define('PHPGW_IMAGES',EGW_IMAGES); + define('PHPGW_APP_IMAGES_DIR',EGW_APP_IMAGES_DIR); + } } /** @@ -593,7 +596,7 @@ class Egw extends Egw\Base if (!$GLOBALS['egw_info']['server']['asyncservice']) // is default { $async = new Asyncservice(); - $async->fallback(); + $async->check_run('fallback'); } $this->db->disconnect(); } diff --git a/api/src/Egw/Base.php b/api/src/Egw/Base.php index 2c6f60dd10..8464e59d44 100644 --- a/api/src/Egw/Base.php +++ b/api/src/Egw/Base.php @@ -18,7 +18,9 @@ namespace EGroupware\Api\Egw; use EGroupware\Api; // explicitly list old, non-namespaced classes -use common; // get_tpl_dir +// they are only used, if phpgwapi is installed +use accounts as egw_accounts; +use egw_session; /** * Egw\Base object used in setup, does not instanciate anything by default @@ -53,6 +55,8 @@ class Base */ var $ADOdb; + var $system_charset = 'utf-8'; + /** * Classes which get instanciated in a different name * @@ -62,12 +66,11 @@ class Base 'log' => 'errorlog', 'link' => 'bolink', // depricated use static egw_link methods 'datetime' => 'egw_datetime', - 'template' => 'Template', - 'session' => 'egw_session', // otherwise $GLOBALS['egw']->session->appsession() fails // classes moved to new api dir + 'template' => true, + 'applications' => 'EGroupware\\Api\\Egw\\Applications', 'framework' => true, // special handling in __get() 'ldap' => true, - 'auth' => 'EGroupware\\Api\\Auth', ); /** @@ -99,7 +102,7 @@ class Base return $this->$name; } - if (!isset(self::$sub_objects[$name]) && !class_exists($name)) + if (!isset(self::$sub_objects[$name]) && !class_exists('EGroupware\\Api\\'.ucfirst($name)) && !class_exists($name)) { if ($name != 'ADOdb') error_log(__METHOD__.": There's NO $name object! ".function_backtrace()); return null; @@ -117,7 +120,8 @@ class Base case 'ldap': return $this->ldap = Api\Ldap::factory(false); default: - $class = isset(self::$sub_objects[$name]) ? self::$sub_objects[$name] : $name; + $class = isset(self::$sub_objects[$name]) ? self::$sub_objects[$name] : 'EGroupware\\Api\\'.ucfirst($name); + if (!class_exists($class)) $class = $name; break; } return $this->$name = new $class(); diff --git a/api/src/Framework.php b/api/src/Framework.php index e3287eac6e..7d532d30a5 100644 --- a/api/src/Framework.php +++ b/api/src/Framework.php @@ -100,29 +100,44 @@ abstract class Framework extends Framework\Extra */ public static function factory() { - if ((Header\UserAgent::mobile() || $GLOBALS['egw_info']['user']['preferences']['common']['theme'] == 'mobile') && - file_exists(EGW_SERVER_ROOT.'/pixelegg')) + // we prefer Pixelegg template, if it is available + if (file_exists(EGW_SERVER_ROOT.'/pixelegg') && + (Header\UserAgent::mobile() || $GLOBALS['egw_info']['user']['preferences']['common']['theme'] == 'mobile' || + empty($GLOBALS['egw_info']['server']['template_set']))) { $GLOBALS['egw_info']['server']['template_set'] = 'pixelegg'; } - // default to idots, if no template_set set, to eg. not stall installations if settings use self::link - if (empty($GLOBALS['egw_info']['server']['template_set'])) $GLOBALS['egw_info']['server']['template_set'] = 'idots'; - // setup the new eGW framework (template sets) - $class = $GLOBALS['egw_info']['server']['template_set'].'_framework'; - if (!class_exists($class)) // first try to autoload the class + // then jdots aka Stylite template + if (file_exists(EGW_SERVER_ROOT.'/jdots') && empty($GLOBALS['egw_info']['server']['template_set'])) { - require_once($file=EGW_INCLUDE_ROOT.'/phpgwapi/templates/'.$GLOBALS['egw_info']['server']['template_set'].'/class.'.$class.'.inc.php'); - if (!in_array($file,(array)$_SESSION['egw_required_files'])) + $GLOBALS['egw_info']['server']['template_set'] = 'jdots'; + } + // and last, if installed old phpgwapi idots etc. + if (file_exists(EGW_SERVER_ROOT.'/phpgwapi')) + { + // default to idots, if no template_set set, to eg. not stall installations if settings use self::link + if (empty($GLOBALS['egw_info']['server']['template_set'])) $GLOBALS['egw_info']['server']['template_set'] = 'idots'; + // setup the new eGW framework (template sets) + $class = $GLOBALS['egw_info']['server']['template_set'].'_framework'; + if (!class_exists($class)) // first try to autoload the class { - $_SESSION['egw_required_files'][] = $file; // automatic load the used framework class, when the object get's restored + require_once($file=EGW_INCLUDE_ROOT.'/phpgwapi/templates/'.$GLOBALS['egw_info']['server']['template_set'].'/class.'.$class.'.inc.php'); + if (!in_array($file,(array)$_SESSION['egw_required_files'])) + { + $_SESSION['egw_required_files'][] = $file; // automatic load the used framework class, when the object get's restored + } + } + // fall back to idots if a template does NOT support current user-agent + if ($class != 'idots_framework' && method_exists($class,'is_supported_user_agent') && + !call_user_func(array($class,'is_supported_user_agent'))) + { + $GLOBALS['egw_info']['server']['template_set'] = 'idots'; + return self::factory(); } } - // fall back to idots if a template does NOT support current user-agent - if ($class != 'idots_framework' && method_exists($class,'is_supported_user_agent') && - !call_user_func(array($class,'is_supported_user_agent'))) + else { - $GLOBALS['egw_info']['server']['template_set'] = 'idots'; - return self::factory(); + $class = $GLOBALS['egw_info']['server']['template_set'].'_framework'; } return new $class($GLOBALS['egw_info']['server']['template_set']); } @@ -982,28 +997,30 @@ abstract class Framework extends Framework\Extra static function list_templates($full_data=false) { $list = array('pixelegg'=>null,'jdots'=>null,'idots'=>null); - // templates packaged in the api - $d = dir(EGW_SERVER_ROOT . '/phpgwapi/templates'); - while (($entry=$d->read())) + // templates packaged in old phpgwapi + if (file_exists(EGW_SERVER_ROOT . '/phpgwapi') && ($d = dir(EGW_SERVER_ROOT . '/phpgwapi/templates'))) { - if ($entry != '..' && file_exists(EGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry .'/class.'.$entry.'_framework.inc.php')) + while (($entry=$d->read())) { - if (file_exists ($f = EGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry . '/setup/setup.inc.php')) + if ($entry != '..' && file_exists(EGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry .'/class.'.$entry.'_framework.inc.php')) { - include($f); - $list[$entry] = $full_data ? $GLOBALS['egw_info']['template'][$entry] : - $GLOBALS['egw_info']['template'][$entry]['title']; - } - else - { - $list[$entry] = $full_data ? array( - 'name' => $entry, - 'title' => $entry, - ) : $entry; + if (file_exists ($f = EGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry . '/setup/setup.inc.php')) + { + include($f); + $list[$entry] = $full_data ? $GLOBALS['egw_info']['template'][$entry] : + $GLOBALS['egw_info']['template'][$entry]['title']; + } + else + { + $list[$entry] = $full_data ? array( + 'name' => $entry, + 'title' => $entry, + ) : $entry; + } } } + $d->close(); } - $d->close(); // templates packaged like apps in own directories (containing as setup/setup.inc.php file!) $dr = dir(EGW_SERVER_ROOT); while (($entry=$dr->read())) diff --git a/api/templates/default/default.css b/api/templates/default/default.css index 585c980bb4..3821b8d939 100755 --- a/api/templates/default/default.css +++ b/api/templates/default/default.css @@ -108,7 +108,7 @@ a:hover,a:active body { - background-image:url(../images/body-background.png); + background-image:url(images/body-background.png); } form @@ -191,7 +191,7 @@ input[type=image] #sideresize { - background-image:url(../images/resize.png); + background-image:url(images/resize.png); width:13px; height:13px; right:1px; @@ -306,7 +306,7 @@ body { #topmenu { background-color: #0081c1; - background-image: url(../images/bgtopmenu2.png); + background-image: url(images/bgtopmenu2.png); color:#006699; /*border-top: solid 1px #7e7e7e;*/ border-bottom: solid #5793ff 1px; @@ -373,7 +373,7 @@ body { { background-color:silver; border:solid 1px #9c9c9c; - background-image: url(../images/background-icon-bar.png); + background-image: url(images/background-icon-bar.png); background-repeat: repeat-x; overflow:visible; height: 45px; /* prevents text line to show in IE7+8(Compatibilitymode) */ @@ -412,7 +412,7 @@ body { #divAppboxHeader { - background-image:url(../images/appbox-header-background.png); + background-image:url(images/appbox-header-background.png); background-repeat: repeat-x; height: 25px; border-bottom:solid 1px #c0c0c0; @@ -515,7 +515,7 @@ Preferences tabs } #egwpopup_header { - background-image: url(../images/gradient22.png); + background-image: url(images/gradient22.png); height: 18px; line-height: 18px; margin: 0; @@ -834,7 +834,7 @@ tr.draggedOver td { } td.lettersearch { border-color: #E0E0E0; - background-image: url(../images/gradient22.png); + background-image: url(images/gradient22.png); } .nextmatch_header tr { @@ -900,11 +900,11 @@ td.lettersearch { } .egwGridView_outer span.sort.asc { - background-image: url(../images/up.png); + background-image: url(images/up.png); } .egwGridView_outer span.sort.desc { - background-image: url(../images/down.png); + background-image: url(images/down.png); } .egwGridView_grid input[type=checkbox], diff --git a/phpgwapi/templates/idots/css/idots.css b/api/templates/default/idots.css similarity index 86% rename from phpgwapi/templates/idots/css/idots.css rename to api/templates/default/idots.css index 036e5b0167..45797fa2d5 100644 --- a/phpgwapi/templates/idots/css/idots.css +++ b/api/templates/default/idots.css @@ -8,7 +8,7 @@ border: none; background-position: 0px 30px; background-color: white; - background-image: url(../images/gradient22.png); + background-image: url(images/gradient22.png); } #divStatusBar { @@ -16,7 +16,7 @@ } #divAppboxHeader { - background-image: url(../images/gradient22.png); + background-image: url(images/gradient22.png); border: none; height: 18px; line-height: 18px; @@ -48,7 +48,7 @@ width:auto; } .divSideboxHeader { - background-image: url(../images/gradient22.png); + background-image: url(images/gradient22.png); border: none; height: 18px; line-height: 18px; @@ -83,7 +83,7 @@ } #topmenu { - background-image: url(../images/gradient22.png); + background-image: url(images/gradient22.png); border: none; x-background-color: #e0e0e0; x-background-image: none; @@ -99,7 +99,7 @@ } #sideresize { - background-image:url(../images/resize-transparent.png); + background-image:url(images/resize-transparent.png); } .th { @@ -140,7 +140,7 @@ a:link, a:visited, select, input, textarea { padding-left: 8px; } .divLoginboxHeader { - background-image: url(../images/gradient22.png); + background-image: url(images/gradient22.png); } #menu1Container{ position: absolute; diff --git a/phpgwapi/templates/idots/images/appbox-header-background.png b/api/templates/default/images/appbox-header-background.png similarity index 100% rename from phpgwapi/templates/idots/images/appbox-header-background.png rename to api/templates/default/images/appbox-header-background.png diff --git a/phpgwapi/templates/idots/images/background-icon-bar.png b/api/templates/default/images/background-icon-bar.png similarity index 100% rename from phpgwapi/templates/idots/images/background-icon-bar.png rename to api/templates/default/images/background-icon-bar.png diff --git a/phpgwapi/templates/idots/images/bgtopmenu2.png b/api/templates/default/images/bgtopmenu2.png similarity index 100% rename from phpgwapi/templates/idots/images/bgtopmenu2.png rename to api/templates/default/images/bgtopmenu2.png diff --git a/api/templates/default/images/body-background.png b/api/templates/default/images/body-background.png new file mode 100644 index 0000000000000000000000000000000000000000..02db2b402cfa8e41fb0fc80fe6957dfa0bae8265 GIT binary patch literal 240 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ)!2~2kE z#M9T6{W6ybpQh-$4PH(_A(s-@h!W@g+}zZ>5(ej@)Wnk16ovB4k_?5Aj8p}8Pu~C? z2)8&tH&r1&O(8R{B(*3lwJ0?&IaML4QXwESS0OkrHRtwaNo}Bc_MR?|Ar-ewPjBR9 zP~c&9Ojf;F?>UX(O@P9>U(b%uF*a7cxo*|gFppRH?{zyFJo@+@Ca7>O*d5>gw)mVh bXB~)z4*}Q$iB}m>NyV literal 0 HcmV?d00001 diff --git a/phpgwapi/templates/default/images/favicon.ico b/api/templates/default/images/favicon.ico similarity index 100% rename from phpgwapi/templates/default/images/favicon.ico rename to api/templates/default/images/favicon.ico diff --git a/api/templates/default/images/gradient22.png b/api/templates/default/images/gradient22.png new file mode 100644 index 0000000000000000000000000000000000000000..b70fabaf8cf04c3f5cfbcb61ed415a6addd802d0 GIT binary patch literal 280 zcmeAS@N?(olHy`uVBq!ia0vp^Ahrkx6Ogp-v1SBPEa{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i=;@^ot|NZ(b+z)2_`O6Gq2u@(*P&oG9e*eRXAjbLob`XYtyxk+P2><+hkHL&` z`FjwN@ceiPWBU5|2Oz0w_5c5Yb%{N@U;ojAnML3Wu2F4?wzU$i^2HM^FQJ-5b qvw @@ -11,6 +11,10 @@ * @version $Id$ */ +use EGroupware\Api; +use EGroupware\Api\Framework; +use EGroupware\Api\Egw; + $submit = False; // set to some initial value $GLOBALS['egw_info'] = array('flags' => array( @@ -42,7 +46,7 @@ if(isset($GLOBALS['sitemgr_info']) && $GLOBALS['egw_info']['user']['userid'] == { if($GLOBALS['egw']->session->verify()) { - $GLOBALS['egw']->hooks->process('logout'); + Api\Hooks::process('logout'); $GLOBALS['egw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']); } } @@ -101,8 +105,8 @@ if($GLOBALS['egw_info']['server']['auth_type'] == 'cas') else { // allow template to overide login-template (without modifying header.inc.php) by setting default or forced pref - $prefs = new preferences(); - $prefs->account_id = preferences::DEFAULT_ID; + $prefs = new Api\Preferences(); + $prefs->account_id = Api\Preferences::DEFAULT_ID; $prefs->read_repository(); $class = $prefs->data['common']['template_set'].'_framework'; @@ -113,7 +117,7 @@ else } unset($prefs); unset($class); - $GLOBALS['egw']->framework = egw_framework::factory(); + $GLOBALS['egw']->framework = Framework::factory(); // This is used for system downtime, to prevent new logins. if($GLOBALS['egw_info']['server']['deny_all_logins']) @@ -132,13 +136,13 @@ else return lang('Sorry, your login has expired'); case 4: return lang('Cookies are required to login to this site'); - case egw_session::CD_BAD_LOGIN_OR_PASSWORD: + case Api\Session::CD_BAD_LOGIN_OR_PASSWORD: return lang('Bad login or password'); - case egw_session::CD_FORCE_PASSWORD_CHANGE: + case Api\Session::CD_FORCE_PASSWORD_CHANGE: return lang('You must change your password!'); - case egw_session::CD_ACCOUNT_EXPIRED: + case Api\Session::CD_ACCOUNT_EXPIRED: return lang('Account is expired'); - case egw_session::CD_BLOCKED: + case Api\Session::CD_BLOCKED: return lang('Blocked, too many attempts'); case 10: $GLOBALS['egw']->session->egw_setcookie('sessionid'); @@ -233,12 +237,12 @@ else !isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['SSL_CLIENT_S_DN'])) { $GLOBALS['egw']->session->egw_setcookie('eGW_remember','',0,'/'); - egw::redirect_link('/login.php','cd=5'); + Egw::redirect_link('/login.php','cd=5'); } /* cookie enabled check comment out, as it seems to cause a redirect loop under certain conditions and browsers :-( if ($_COOKIE['eGW_cookie_test'] !== 'enabled') { - egw::redirect_link('/login.php','cd=4'); + Egw::redirect_link('/login.php','cd=4'); }*/ // don't get login data again when $submit is true @@ -277,7 +281,7 @@ else $GLOBALS['sessionid'] = $GLOBALS['egw']->session->create($login, $passwd, $passwd_type, false, true, true); // true = let session fail on forced password change - if (!$GLOBALS['sessionid'] && $GLOBALS['egw']->session->cd_reason == egw_session::CD_FORCE_PASSWORD_CHANGE) + if (!$GLOBALS['sessionid'] && $GLOBALS['egw']->session->cd_reason == Api\Session::CD_FORCE_PASSWORD_CHANGE) { if (isset($_POST['new_passwd'])) { @@ -301,8 +305,8 @@ else } elseif (!isset($GLOBALS['sessionid']) || ! $GLOBALS['sessionid']) { - $GLOBALS['egw']->session->egw_setcookie('eGW_remember','',0,'/'); - egw::redirect_link('/login.php?cd=' . $GLOBALS['egw']->session->cd_reason); + Api\Session::egw_setcookie('eGW_remember','',0,'/'); + Egw::redirect_link('/login.php?cd=' . $GLOBALS['egw']->session->cd_reason); } else { @@ -342,7 +346,7 @@ else } // check if new translations are available - translation::check_invalidate_cache(); + Api\Translation::check_invalidate_cache(); $forward = isset($_GET['phpgw_forward']) ? urldecode($_GET['phpgw_forward']) : @$_POST['phpgw_forward']; if (!$forward) @@ -359,7 +363,7 @@ else if(strpos($_SERVER['HTTP_REFERER'], $_SERVER['REQUEST_URI']) === false) { // login requuest does not come from login.php // redirect to referer on logout - $GLOBALS['egw']->session->appsession('referer', 'login', $_SERVER['HTTP_REFERER']); + Api\Cache::setSession('login', 'referer', $_SERVER['HTTP_REFERER']); } $strength = ($GLOBALS['egw_info']['server']['force_pwd_strength']?$GLOBALS['egw_info']['server']['force_pwd_strength']:false); if ($strength && $strength>5) $strength =5; @@ -370,7 +374,7 @@ else { error_log('login::'.__LINE__.' User '. $login. ' authenticated with an unsave password'.' '.$unsave_msg); $message = lang('eGroupWare checked your password for safetyness. You have to change your password for the following reason:')."\n"; - egw::redirect_link('/index.php', array( + Egw::redirect_link('/index.php', array( 'menuaction' => 'preferences.uipassword.change', 'message' => $message . $unsave_msg, 'cd' => 'yes', @@ -380,14 +384,14 @@ else { // commiting the session, before redirecting might fix racecondition in session creation $GLOBALS['egw']->session->commit_session(); - egw::redirect_link($forward,$extra_vars); + Egw::redirect_link($forward,$extra_vars); } } } // show login screen if(isset($_COOKIE['last_loginid'])) { - $prefs = new preferences($GLOBALS['egw']->accounts->name2id($_COOKIE['last_loginid'])); + $prefs = new Api\Preferences($GLOBALS['egw']->accounts->name2id($_COOKIE['last_loginid'])); if($prefs->account_id) { @@ -411,17 +415,17 @@ else } if ($_COOKIE['eGW_cookie_test'] !== 'enabled') { - egw_session::egw_setcookie('eGW_cookie_test','enabled',0); + Api\Session::egw_setcookie('eGW_cookie_test','enabled',0); } #print 'LANG:' . $GLOBALS['egw_info']['user']['preferences']['common']['lang'] . '
'; - translation::init(); // this will set the language according to the (new) set prefs - translation::add_app('login'); - translation::add_app('loginscreen'); - $GLOBALS['loginscreenmessage'] = translation::translate('loginscreen_message',false,''); + Api\Translation::init(); // this will set the language according to the (new) set prefs + Api\Translation::add_app('login'); + Api\Translation::add_app('loginscreen'); + $GLOBALS['loginscreenmessage'] = Api\Translation::translate('loginscreen_message',false,''); if($GLOBALS['loginscreenmessage'] == 'loginscreen_message' || empty($GLOBALS['loginscreenmessage'])) { - translation::add_app('loginscreen','en'); // trying the en one - $GLOBALS['loginscreenmessage'] = translation::translate('loginscreen_message',false,''); + Api\Translation::add_app('loginscreen','en'); // trying the en one + $GLOBALS['loginscreenmessage'] = Api\Translation::translate('loginscreen_message',false,''); } if($GLOBALS['loginscreenmessage'] == 'loginscreen_message' || empty($GLOBALS['loginscreenmessage'])) { diff --git a/logout.php b/logout.php index e21abfbc52..00eddd94e1 100755 --- a/logout.php +++ b/logout.php @@ -1,6 +1,6 @@ @@ -10,6 +10,8 @@ * @version $Id$ */ +use EGroupware\Api; + $GLOBALS['egw_info'] = array( 'flags' => array( 'disable_Template_class' => True, @@ -21,12 +23,12 @@ $GLOBALS['egw_info'] = array( ); include('./header.inc.php'); -$GLOBALS['sessionid'] = egw_session::get_sessionid(); -$GLOBALS['kp3'] = egw_session::get_request('kp3'); +$GLOBALS['sessionid'] = Api\Session::get_sessionid(); +$GLOBALS['kp3'] = Api\Session::get_request('kp3'); $verified = $GLOBALS['egw']->session->verify(); -if(!($redirectTarget = $GLOBALS['egw']->session->appsession('referer', 'login'))) +if(!($redirectTarget = Api\Cache::getSession('login', 'referer'))) { $redirectTarget = $GLOBALS['egw_info']['server']['webserver_url'].'/login.php?cd=1&domain='.$GLOBALS['egw_info']['user']['domain']; } @@ -37,14 +39,14 @@ elseif(strpos($redirectTarget, '[?&]cd=') !== false) if($verified) { - $GLOBALS['egw']->hooks->process('logout'); + Api\Hooks::process('logout'); $GLOBALS['egw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']); } -$GLOBALS['egw']->session->egw_setcookie('eGW_remember','',0,'/'); -$GLOBALS['egw']->session->egw_setcookie('sessionid'); -$GLOBALS['egw']->session->egw_setcookie('kp3'); -$GLOBALS['egw']->session->egw_setcookie('domain'); +Api\Session::egw_setcookie('eGW_remember','',0,'/'); +Api\Session::egw_setcookie('sessionid'); +Api\Session::egw_setcookie('kp3'); +Api\Session::egw_setcookie('domain'); if($GLOBALS['egw_info']['server']['auth_type'] == 'cas') { diff --git a/setup/admin_account.php b/setup/admin_account.php index 4093111b5d..d582f043aa 100644 --- a/setup/admin_account.php +++ b/setup/admin_account.php @@ -19,7 +19,7 @@ if (strpos($_SERVER['PHP_SELF'],'admin_account.php') !== false) // Authorize the user to use setup app and load the database // Does not return unless user is authorized - if(!$GLOBALS['egw_setup']->auth('Config') || get_var('cancel',Array('POST'))) + if(!$GLOBALS['egw_setup']->auth('Config') || $_POST['cancel']) { Header('Location: index.php'); exit; @@ -36,12 +36,12 @@ if ($_POST['submit']) } /* Posted admin data */ - $passwd = get_var('passwd',Array('POST')); - $passwd2 = get_var('passwd2',Array('POST')); - $username = get_var('username',Array('POST')); - $fname = get_var('fname',Array('POST')); - $lname = get_var('lname',Array('POST')); - $email = get_var('email',Array('POST')); + $passwd = $_POST['passwd']; + $passwd2 = $_POST['passwd2']; + $username = $_POST['username']; + $fname = $_POST['fname']; + $lname = $_POST['lname']; + $email = $_POST['email']; if($passwd != $passwd2 || !$username) { @@ -153,7 +153,7 @@ else $GLOBALS['egw_setup']->add_acl($apps,'run',$admingroupid); /* Creation of the demo accounts is optional - the checkbox is on by default. */ - if(get_var('create_demo',Array('POST'))) + if($_POST['create_demo']) { // Create 3 demo accounts $GLOBALS['egw_setup']->add_account('demo','Demo','Account','guest'); diff --git a/setup/applications.php b/setup/applications.php index 20d54c7336..0a900160d8 100644 --- a/setup/applications.php +++ b/setup/applications.php @@ -106,22 +106,22 @@ $setup_info = $GLOBALS['egw_setup']->detection->check_depends( @ksort($setup_info); -if(@get_var('cancel',Array('POST'))) +if(@$_POST['cancel']) { Header("Location: index.php"); exit; } -if(@get_var('submit',Array('POST'))) +if(@$_POST['submit']) { $GLOBALS['egw_setup']->html->show_header(lang('Application Management'),False,'config',$GLOBALS['egw_setup']->ConfigDomain . '(' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'] . ')'); $setup_tpl->set_var('description',lang('App install/remove/upgrade') . ':'); $setup_tpl->pparse('out','header'); - $appname = get_var('appname',Array('POST')); - $remove = get_var('remove',Array('POST')); - $install = get_var('install',Array('POST')); - $upgrade = get_var('upgrade',Array('POST')); + $appname = $_POST['appname']; + $remove = $_POST['remove']; + $install = $_POST['install']; + $upgrade = $_POST['upgrade']; $register_hooks = false; @@ -235,14 +235,14 @@ else $GLOBALS['egw_setup']->html->show_header(lang('Application Management'),False,'config',$GLOBALS['egw_setup']->ConfigDomain . '(' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'] . ')'); } -if(@get_var('hooks', Array('GET'))) +if(@$_GET['hooks']) { Api\Cache::flush(Api\Cache::INSTANCE); echo lang('Cached cleared') . '
'; } -$detail = get_var('detail',Array('GET')); -$resolve = get_var('resolve',Array('GET')); +$detail = $_GET['detail']; +$resolve = $_GET['resolve']; if(@$detail) { @ksort($setup_info[$detail]); @@ -300,13 +300,13 @@ if(@$detail) } elseif (@$resolve) { - $version = get_var('version',Array('GET')); - $notables = get_var('notables',Array('GET')); + $version = $_GET['version']; + $notables = $_GET['notables']; $setup_tpl->set_var('description',lang('Problem resolution'). ':'); $setup_tpl->pparse('out','header'); $app_title = $setup_info[$resolve]['title'] ? $setup_info[$resolve]['title'] : $setup_info[$resolve]['name']; - if(get_var('post',Array('GET'))) + if($_GET['post']) { echo '"' . $app_title . '" ' . lang('may be broken') . ' '; echo lang('because an application it depends upon was upgraded'); @@ -315,7 +315,7 @@ elseif (@$resolve) echo '
'; echo lang('However, the application may still work') . '.'; } - elseif(get_var('badinstall',Array('GET'))) + elseif($_GET['badinstall']) { echo '"' . $app_title . '" ' . lang('is broken') . ' '; echo lang('because of a failed upgrade or install') . '.'; @@ -324,7 +324,7 @@ elseif (@$resolve) echo '
'; echo lang('You should either uninstall and then reinstall it, or attempt manual repairs') . '.'; } - elseif(get_var('deleted',Array('GET'))) + elseif($_GET['deleted']) { echo '"' . $app_title . '" ' . lang('is broken') . ' '; echo lang('because its sources are missing') . '!'; diff --git a/setup/check_install.php b/setup/check_install.php index bf104f24cf..2d447c7a2c 100644 --- a/setup/check_install.php +++ b/setup/check_install.php @@ -9,6 +9,9 @@ * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @version $Id$ */ + +use EGroupware\Api; + $run_by_webserver = !!$_SERVER['PHP_SELF']; $is_windows = strtoupper(substr(PHP_OS,0,3)) == 'WIN'; @@ -839,12 +842,12 @@ function gd_check() if ($run_by_webserver) { $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup'); - $setup_tpl = CreateObject('phpgwapi.Template',$tpl_root); + $setup_tpl = new Api\Framework\Template($tpl_root); $setup_tpl->set_file(array( 'T_head' => 'head.tpl', 'T_footer' => 'footer.tpl', )); - $ConfigDomain = get_var('ConfigDomain',Array('POST','COOKIE')); + $ConfigDomain = $_REQUEST['ConfigDomain']; if (@$_GET['intro']) { if(($ConfigLang = setup::get_lang())) { diff --git a/setup/config.php b/setup/config.php index 2789b582c2..2a83ca27bf 100644 --- a/setup/config.php +++ b/setup/config.php @@ -55,13 +55,12 @@ $setup_info = $GLOBALS['egw_setup']->detection->get_db_versions(); $newsettings = $_POST['newsettings']; -if(@get_var('submit',Array('POST')) && @$newsettings) +if(@$_POST['submit'] && @$newsettings) { /* Load hook file with functions to validate each config (one/none/all) */ $GLOBALS['egw_setup']->hook('config_validate','setup'); $newsettings['tz_offset'] = date('Z')/3600; - print_debug('TZ_OFFSET',$newsettings['tz_offset']); $GLOBALS['egw_setup']->db->transaction_begin(); foreach($newsettings as $setting => $value) diff --git a/setup/inc/class.setup.inc.php b/setup/inc/class.setup.inc.php index 290452155d..b638ecbb72 100644 --- a/setup/inc/class.setup.inc.php +++ b/setup/inc/class.setup.inc.php @@ -99,7 +99,7 @@ class setup { if(!isset($this->ConfigDomain) || empty($this->ConfigDomain)) { - $this->ConfigDomain = get_var('ConfigDomain',array('COOKIE','POST'),$_POST['FormDomain']); + $this->ConfigDomain = isset($_REQUEST['ConfigDomain']) ? $_REQUEST['ConfigDomain'] : $_POST['FormDomain']; } $GLOBALS['egw_info']['server']['db_type'] = $GLOBALS['egw_domain'][$this->ConfigDomain]['db_type']; @@ -668,9 +668,10 @@ class setup return false; // app not found or no hook } $GLOBALS['settings'] = array(); + $hook_data = array('location' => 'settings','setup' => true); if (isset($setup_info['hooks']['settings'])) { - $settings = ExecMethod($setup_info['hooks']['settings'],array('location' => 'settings','setup' => true)); + $settings = ExecMethod($setup_info['hooks']['settings'],$hook_data); } elseif(in_array('settings',$setup_info['hooks']) && file_exists($file = EGW_INCLUDE_ROOT.'/'.$appname.'/inc/hook_settings.inc.php')) { @@ -685,7 +686,9 @@ class setup return false; } // include idots template prefs for (common) preferences - if ($appname == 'preferences' && file_exists($file = EGW_INCLUDE_ROOT.'/phpgwapi/templates/idots/hook_settings.inc.php')) + if ($appname == 'preferences' && (file_exists($file = EGW_INCLUDE_ROOT.'/pixelegg/hook_settings.inc.php') || + file_exists($file = EGW_INCLUDE_ROOT.'/jdots/hook_settings.inc.php') || + file_exists($file = EGW_INCLUDE_ROOT.'/phpgwapi/templates/idots/hook_settings.inc.php'))) { $GLOBALS['settings'] = array(); include_once($file); @@ -1073,10 +1076,24 @@ class setup $this->accounts->search(array( 'type' => 'accounts', 'start' => 0, - 'offset' => 2 // we only need to check 2 Api\Accounts, if we just check for not anonymous + 'offset' => 2 // we only need to check 2 accounts, if we just check for not anonymous )); - return $this->accounts->total > 1; + if ($this->accounts->total != 1) + { + return $this->accounts->total > 1; + } + + // one account, need to check it's not the anonymous one + $this->accounts->search(array( + 'type' => 'accounts', + 'start' => 0, + 'offset' => 0, + 'query_type' => 'lid', + 'query' => 'anonymous', + )); + + return !$this->accounts->total; } /** diff --git a/setup/inc/class.setup_cmd_config.inc.php b/setup/inc/class.setup_cmd_config.inc.php index a5d12f7c72..b2f8c6f15f 100644 --- a/setup/inc/class.setup_cmd_config.inc.php +++ b/setup/inc/class.setup_cmd_config.inc.php @@ -451,13 +451,13 @@ class setup_cmd_config extends setup_cmd if (!$scan_done++) { // now add auth backends found in filesystem - foreach(scandir(EGW_INCLUDE_ROOT.'/phpgwapi/inc') as $class) + foreach(scandir(EGW_INCLUDE_ROOT.'/api/src/Auth') as $file) { $matches = null; - if (preg_match('/^class\.auth_([a-z]+)\.inc\.php$/', $class, $matches) && - !isset($auth_types[$matches[1]])) + if (preg_match('/^([a-z0-9]+)\.php$/', $file, $matches) && + !isset($auth_types[strtolower($matches[1])]) && $matches[1] != 'Backend') { - $auth_types[$matches[1]] = ucfirst($matches[1]); + $auth_types[strtolower($matches[1])] = $matches[1]; } } foreach(self::$options['--account-auth'] as &$param) @@ -489,15 +489,15 @@ class setup_cmd_config extends setup_cmd if (!$scan_done++) { // now add auth backends found in filesystem - foreach(scandir(EGW_INCLUDE_ROOT.'/phpgwapi/inc') as $file) + foreach(scandir(EGW_INCLUDE_ROOT.'/api/src/Accounts') as $file) { $matches = null; - if (preg_match('/^class\.accounts_([a-z]+)\.inc\.php$/', $file, $matches) && - !isset($account_repositories[$matches[1]]) && - class_exists($class='accounts_'.$matches[1]) && - ($matches[1] == $current || !is_callable($callable=$class.'::available') || call_user_func($callable))) + if (preg_match('/^([a-z0-9]+)\.php$/', $file, $matches) && + !isset($account_repositories[strtolower($matches[1])]) && + class_exists($class='EGroupware\\Api\\Accounts\\'.$matches[1]) && + (strtolower($matches[1]) == $current || !is_callable($callable=$class.'::available') || call_user_func($callable))) { - $account_repositories[$matches[1]] = ucfirst($matches[1]); + $account_repositories[strtolower($matches[1])] = $matches[1]; } } } diff --git a/setup/inc/class.setup_detection.inc.php b/setup/inc/class.setup_detection.inc.php index 09c713d763..e8e8b6336c 100755 --- a/setup/inc/class.setup_detection.inc.php +++ b/setup/inc/class.setup_detection.inc.php @@ -78,7 +78,11 @@ class setup_detection } /* This is to catch old setup installs that did not have phpgwapi listed as an app */ $tmp = @$setup_info['phpgwapi']['version']; /* save the file version */ - if(!@$setup_info['phpgwapi']['currentver']) + if (isset($setup_info['api']['version'])) + { + // new api, dont care about old pre egroupware stuff + } + elseif(!@$setup_info['phpgwapi']['currentver']) { $setup_info['phpgwapi']['currentver'] = $setup_info['admin']['currentver']; $setup_info['phpgwapi']['version'] = $setup_info['admin']['currentver']; diff --git a/setup/inc/class.setup_html.inc.php b/setup/inc/class.setup_html.inc.php index b3b2bbbc3b..9214c15ac9 100644 --- a/setup/inc/class.setup_html.inc.php +++ b/setup/inc/class.setup_html.inc.php @@ -31,8 +31,8 @@ class setup_html $GLOBALS['header_template']->set_block('header','domain','domain'); $var = Array(); - $deletedomain = get_var('deletedomain',Array('POST')); - $domains = get_var('domains',Array('POST')); + $deletedomain = $_POST['deletedomain']; + $domains = $_POST['domains']; foreach($domains as $k => $v) { @@ -41,7 +41,7 @@ class setup_html continue; } $variableName = str_replace('.','_',$k); - $dom = get_var('setting_'.$variableName,Array('POST')); + $dom = $_POST['setting_'.$variableName]; $GLOBALS['header_template']->set_var('DB_DOMAIN',$v); foreach($dom as $x => $y) { @@ -72,7 +72,7 @@ class setup_html $GLOBALS['header_template']->set_var('domain',''); - $setting = get_var('setting',Array('POST')); + $setting = $_POST['setting']; while($setting && list($k,$v) = @each($setting)) { if(strtoupper($k) == 'HEADER_ADMIN_PASSWORD') @@ -101,14 +101,14 @@ class setup_html /* hack to get tpl dir */ if (is_dir(EGW_SERVER_ROOT)) { - $srv_root = EGW_SERVER_ROOT . SEP . "$app_name" . SEP; + $srv_root = EGW_SERVER_ROOT . '/' . $app_name . '/'; } else { $srv_root = ''; } - $tpl_typical = 'templates' . SEP . 'default'; + $tpl_typical = 'templates/default'; $tpl_root = "$srv_root" ."$tpl_typical"; return $tpl_root; } @@ -154,7 +154,7 @@ class setup_html if(basename($_SERVER['SCRIPT_FILENAME']) != 'index.php') { $index_btn = '' . lang('Setup Main Menu') . ''; - $index_img = ''; + $index_img = ''; } $GLOBALS['setup_tpl']->set_var('lang_version',lang('version')); diff --git a/setup/inc/class.setup_process.inc.php b/setup/inc/class.setup_process.inc.php index 269950ea76..4e86fcaa44 100755 --- a/setup/inc/class.setup_process.inc.php +++ b/setup/inc/class.setup_process.inc.php @@ -87,12 +87,17 @@ class setup_process else { $pass['api'] = $setup_info['api']; - $pass['phpgwapi'] = $setup_info['phpgwapi']; + if (file_exists(EGW_SERVER_ROOT.'/phpgwapi') && is_readable(EGW_SERVER_ROOT.'/phpgwapi')) + { + $pass['phpgwapi'] = $setup_info['phpgwapi']; + } } $pass['admin'] = $setup_info['admin']; $pass['preferences'] = $setup_info['preferences']; - $pass['etemplate'] = $setup_info['etemplate']; // helps to minimize passes, as many apps depend on it - + if (file_exists(EGW_SERVER_ROOT.'/etemplate')) + { + $pass['etemplate'] = $setup_info['etemplate']; // helps to minimize passes, as many apps depend on it + } $this->api_version_target = $setup_info['api']['version']; $i = 1; @@ -132,9 +137,13 @@ class setup_process switch($method) { case 'new': + if (empty($GLOBALS['egw_info']['server']['temp_dir'])) + { + $GLOBALS['egw_info']['server']['temp_dir'] = sys_get_temp_dir(); + } /* Create tables and insert new records for each app in this list */ $passing_c = $this->current($pass,$DEBUG); - if (isset($pass['phpgwapi'])) $this->save_minimal_config($preset_config); + if (isset($pass['api'])) $this->save_minimal_config($preset_config); $passing = $this->default_records($passing_c,$DEBUG); break; case 'upgrade': @@ -292,7 +301,7 @@ class setup_process } $current_config['install_id'] = md5($_SERVER['HTTP_HOST'].microtime(true).$GLOBALS['egw_setup']->ConfigDomain); - $current_config['postpone_statistics_submit'] = time() + 2 * 30 * 3600; // ask user in 2 month from now, when he has something to report + $current_config['postpone_statistics_submit'] = time() + 2 * 30 * 86400; // ask user in 2 month from now, when he has something to report // use securest password hash by default require_once EGW_SERVER_ROOT.'/setup/inc/hook_config.inc.php'; // for sql_passwdhashes, to get securest available password hash @@ -401,7 +410,7 @@ class setup_process if($DEBUG) { echo '
process->current(): Incoming status: ' . $appname . ',status: '. $appdata['status']; } - $appdir = EGW_SERVER_ROOT . SEP . $appname . SEP . 'setup' . SEP; + $appdir = EGW_SERVER_ROOT . '/' . $appname . '/setup/'; if($appdata['tables'] && file_exists($appdir.'tables_current.inc.php')) { @@ -479,7 +488,7 @@ class setup_process } foreach($setup_info as $appname => &$appdata) { - $appdir = EGW_SERVER_ROOT . SEP . $appname . SEP . 'setup' . SEP; + $appdir = EGW_SERVER_ROOT . '/' . $appname . '/setup/'; if(file_exists($appdir.'default_records.inc.php')) { @@ -520,7 +529,7 @@ class setup_process } foreach($setup_info as $appname => &$appdata) { - $appdir = EGW_SERVER_ROOT . SEP . $appname . SEP . 'setup' . SEP; + $appdir = EGW_SERVER_ROOT . '/' . $appname . '/setup/'; if(file_exists($appdir.'test_data.inc.php')) { @@ -554,7 +563,7 @@ class setup_process } foreach($setup_info as $appname => &$appdata) { - $appdir = EGW_SERVER_ROOT . SEP . $appname . SEP . 'setup' . SEP; + $appdir = EGW_SERVER_ROOT . '/' . $appname . '/setup/'; if(file_exists($appdir.'tables_baseline.inc.php')) { @@ -633,7 +642,7 @@ class setup_process { $currentver = $appdata['currentver']; $targetver = $appdata['version']; // The version we need to match when done - $appdir = EGW_SERVER_ROOT . SEP . $appname . SEP . 'setup' . SEP; + $appdir = EGW_SERVER_ROOT . '/' . $appname . '/setup/'; if(file_exists($appdir . 'tables_update.inc.php')) { diff --git a/setup/index.php b/setup/index.php index 234c2a6d81..695f89be78 100644 --- a/setup/index.php +++ b/setup/index.php @@ -490,7 +490,7 @@ switch($GLOBALS['egw_info']['setup']['stage']['db']) } } // warn if essential apps are not installed - foreach(array('api','phpgwapi','etemplate','home','admin','preferences') as $app) + foreach(array('api','admin','preferences') as $app) { if (!isset($setup_info[$app]) || empty($setup_info[$app]['currentver'])) { diff --git a/setup/manageheader.php b/setup/manageheader.php index 3acf267d01..bc18d9a1dd 100644 --- a/setup/manageheader.php +++ b/setup/manageheader.php @@ -218,7 +218,7 @@ function show_header_form($validation_errors) $GLOBALS['egw_setup']->html->show_header($GLOBALS['egw_info']['setup']['HeaderFormMSG'], False, 'header'); - if(!get_var('ConfigLang',array('POST','COOKIE'))) + if(empty($_REQUEST['ConfigLang'])) { $setup_tpl->set_var('lang_select','
Please Select your language '.setup_html::lang_select(True,'en')."
"); } diff --git a/setup/schematoy.php b/setup/schematoy.php index 849224d0f1..a87789e35b 100644 --- a/setup/schematoy.php +++ b/setup/schematoy.php @@ -99,7 +99,7 @@ //var_dump($GLOBALS['setup_info']);exit; @ksort($GLOBALS['setup_info']); - if(get_var('cancel',Array('POST'))) + if($_POST['cancel']) { Header('Location: index.php'); exit; @@ -107,14 +107,14 @@ $GLOBALS['egw_setup']->html->show_header(lang("Developers' Table Schema Toy"),False,'config',$GLOBALS['egw_setup']->ConfigDomain); - if(get_var('submit',Array('POST'))) + if($_POST['submit']) { $GLOBALS['setup_tpl']->set_var('description',lang('App process') . ':'); $GLOBALS['setup_tpl']->pparse('out','header'); - $appname = get_var('appname','POST'); - $install = get_var('install','POST'); - $version = get_var('version','POST'); + $appname = $_POST['appname']; + $install = $_POST['install']; + $version = $_POST['version']; foreach($install as $appname => $key) { @@ -123,7 +123,7 @@ $terror[$appname]['version'] = $version[$appname]; $terror[$appname]['status'] = 'U'; - $appdir = EGW_SERVER_ROOT . SEP . $appname . SEP . 'setup' . SEP; + $appdir = EGW_SERVER_ROOT . '/' . $appname . '/setup/'; // Drop newest tables $terror[$appname]['tables'] = $GLOBALS['setup_info'][$appname]['tables']; @@ -170,7 +170,7 @@ $GLOBALS['setup_tpl']->pparse('out','footer'); exit; } - $detail = get_var('detail',Array('GET','POST')); + $detail = $_REQUEST['detail']; if($detail) { @ksort($GLOBALS['setup_info'][$detail]); diff --git a/setup/sqltoarray.php b/setup/sqltoarray.php index ff0bb7a0fc..937a5b8813 100644 --- a/setup/sqltoarray.php +++ b/setup/sqltoarray.php @@ -31,17 +31,17 @@ if(!$GLOBALS['egw_setup']->auth('Config')) $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup'); $setup_tpl = CreateObject('phpgwapi.Template',$tpl_root); -$cancel = get_var('cancel',Array('GET','POST')); +$cancel = $_REQUEST['cancel']; if($cancel) { Header('Location: applications.php'); exit; } -$apps = get_var('apps',Array('GET','POST')); -$download = get_var('download',Array('GET','POST')); -$submit = get_var('submit',Array('GET','POST')); -$showall = get_var('showall',Array('GET','POST')); -$appname = get_var('appname',Array('GET','POST')); +$apps = $_REQUEST['apps']; +$download = $_REQUEST['download']; +$submit = $_REQUEST['submit']; +$showall = $_REQUEST['showall']; +$appname = $_REQUEST['appname']; if($download) { $setup_tpl->set_file(array( @@ -114,9 +114,9 @@ function _arr2str($arr) function printout($template) { - $download = get_var('download',array('POST','GET')); - $appname = get_var('appname',array('POST','GET')); - $showall = get_var('showall',array('POST','GET')); + $download = $_REQUEST['download']; + $appname = $_REQUEST['appname']; + $showall = $_REQUEST['showall']; $apps = $GLOBALS['apps'] ? $GLOBALS['apps'] : ''; if($download) diff --git a/setup/templates/default/head.tpl b/setup/templates/default/head.tpl index 59156248b5..9df5b33c2c 100644 --- a/setup/templates/default/head.tpl +++ b/setup/templates/default/head.tpl @@ -10,23 +10,16 @@ - - - - + + + + - - - - - +
@@ -36,7 +29,7 @@ - + @@ -62,11 +55,11 @@
spacerspacer
 
- + - + @@ -74,17 +67,17 @@ - + - + - +
ball{user_login}ball{user_login}
ball{check_install}ball{check_install}
ball{register_hooks}ball{register_hooks}
ball{logoutbutton}ball{logoutbutton}
 
ball{manual}ball{manual}
diff --git a/setup/templates/default/images/spacer.gif b/setup/templates/default/images/spacer.gif new file mode 100755 index 0000000000000000000000000000000000000000..fc2560981ee1caca400e225e48d282106f907f2d GIT binary patch literal 43 ucmZ?wbhEHbWMp7uXkcLY|NlP&1B2pE7Df>utpmhBaYhCPCMFj~25SJyItL8^ literal 0 HcmV?d00001 diff --git a/setup/templates/default/manageheader.tpl b/setup/templates/default/manageheader.tpl index 56f6b03713..e4900d73f5 100644 --- a/setup/templates/default/manageheader.tpl +++ b/setup/templates/default/manageheader.tpl @@ -60,14 +60,6 @@ function setDefaultDBPort(selectBox,portField) {lang_persistdescr} - {lang_session}
- - - {lang_session_descr} - - {lang_enablemcrypt}
{lang_mcryptivdescr} - + {lang_domselect}