WIP egw installs now without phpgwapi and allows to login
@ -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);
|
||||
|
||||
|
@ -407,6 +407,8 @@ 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
|
||||
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'));
|
||||
@ -425,6 +427,7 @@ class Egw extends Egw\Base
|
||||
define('PHPGW_IMAGES',EGW_IMAGES);
|
||||
define('PHPGW_APP_IMAGES_DIR',EGW_APP_IMAGES_DIR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* force the session cache to be re-created, because some of it's data changed
|
||||
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -100,11 +100,21 @@ 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';
|
||||
}
|
||||
// then jdots aka Stylite template
|
||||
if (file_exists(EGW_SERVER_ROOT.'/jdots') && empty($GLOBALS['egw_info']['server']['template_set']))
|
||||
{
|
||||
$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)
|
||||
@ -124,6 +134,11 @@ abstract class Framework extends Framework\Extra
|
||||
$GLOBALS['egw_info']['server']['template_set'] = 'idots';
|
||||
return self::factory();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$class = $GLOBALS['egw_info']['server']['template_set'].'_framework';
|
||||
}
|
||||
return new $class($GLOBALS['egw_info']['server']['template_set']);
|
||||
}
|
||||
|
||||
@ -982,8 +997,9 @@ 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');
|
||||
// templates packaged in old phpgwapi
|
||||
if (file_exists(EGW_SERVER_ROOT . '/phpgwapi') && ($d = dir(EGW_SERVER_ROOT . '/phpgwapi/templates')))
|
||||
{
|
||||
while (($entry=$d->read()))
|
||||
{
|
||||
if ($entry != '..' && file_exists(EGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry .'/class.'.$entry.'_framework.inc.php'))
|
||||
@ -1004,6 +1020,7 @@ abstract class Framework extends Framework\Extra
|
||||
}
|
||||
}
|
||||
$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()))
|
||||
|
@ -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],
|
||||
|
@ -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;
|
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 147 B After Width: | Height: | Size: 147 B |
BIN
api/templates/default/images/body-background.png
Normal file
After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
BIN
api/templates/default/images/gradient22.png
Normal file
After Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 356 B After Width: | Height: | Size: 356 B |
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 275 B |
56
login.php
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* eGroupWare - Login
|
||||
* EGroupware - Login
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @author Dan Kuykendall <seek3r@phpgroupware.org>
|
||||
@ -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'] . '<br>';
|
||||
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']))
|
||||
{
|
||||
|
20
logout.php
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* eGroupWare - Logout
|
||||
* EGroupware - Logout
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @author Joseph Engo <jengo@phpgroupware.org>
|
||||
@ -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')
|
||||
{
|
||||
|
@ -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');
|
||||
|
@ -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') . '<br />';
|
||||
}
|
||||
$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 '<br />';
|
||||
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 '<br />';
|
||||
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') . '!';
|
||||
|
@ -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()))
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -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,12 +1076,26 @@ 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
|
||||
));
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add ACL rights
|
||||
*
|
||||
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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'];
|
||||
|
@ -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 = '<a href="index.php" class="link">' . lang('Setup Main Menu') . '</a>';
|
||||
$index_img = '<img src="../phpgwapi/templates/default/images/bullet.png" />';
|
||||
$index_img = '<img src="../api/templates/default/images/bullet.png" />';
|
||||
}
|
||||
|
||||
$GLOBALS['setup_tpl']->set_var('lang_version',lang('version'));
|
||||
|
@ -87,12 +87,17 @@ class setup_process
|
||||
else
|
||||
{
|
||||
$pass['api'] = $setup_info['api'];
|
||||
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'];
|
||||
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 '<br>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'))
|
||||
{
|
||||
|
@ -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']))
|
||||
{
|
||||
|
@ -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','<tr><td colspan="2"><form action="manageheader.php" method="post">Please Select your language '.setup_html::lang_select(True,'en')."</form></td></tr>");
|
||||
}
|
||||
|
@ -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]);
|
||||
|
@ -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)
|
||||
|
@ -10,23 +10,16 @@
|
||||
<meta name="language" content="{lang_code}" />
|
||||
<meta name="author" content="egroupware http://www.egroupware.org" />
|
||||
<meta name="robots" content="none" />
|
||||
<link rel="icon" href="../phpgwapi/templates/default/images/favicon.ico" type="image/x-ico" />
|
||||
<link rel="shortcut icon" href="../phpgwapi/templates/default/images/favicon.ico" />
|
||||
<link href="../phpgwapi/templates/idots/css/traditional.css" type="text/css" rel="stylesheet" />
|
||||
<link href="../phpgwapi/templates/idots/css/idots.css" type="text/css" rel="stylesheet" />
|
||||
<link rel="icon" href="../api/templates/default/images/favicon.ico" type="image/x-ico" />
|
||||
<link rel="shortcut icon" href="../api/templates/default/images/favicon.ico" />
|
||||
<link href="../api/templates/default/default.css" type="text/css" rel="stylesheet" />
|
||||
<link href="../api/templates/default/idots.css" type="text/css" rel="stylesheet" />
|
||||
|
||||
<!--{java_script}-->
|
||||
|
||||
<!-- this solves the internet explorer png-transparency bug, but only for ie 5.5 and 6.0 -->
|
||||
<!--[if lt IE 7.0]>
|
||||
<script src="../phpgwapi/templates/idots/js/pngfix.js" type=text/javascript>
|
||||
</script>
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="divLogo"><a href="http://www.egroupware.org" target="_blank"><img src="../phpgwapi/templates/default/images/logo.png" border="0" alt="egroupware" /></a></div>
|
||||
<div id="divLogo"><a href="http://www.egroupware.org" target="_blank"><img src="../api/templates/default/images/logo.png" border="0" alt="egroupware" /></a></div>
|
||||
|
||||
<div id="divMain">
|
||||
<div id="divAppIconBar">
|
||||
@ -36,7 +29,7 @@
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100%"><img src="../phpgwapi/templates/idots/images/spacer.gif" width="1" height="68" alt="spacer" /></td>
|
||||
<td width="100%"><img src="templates/default/images/spacer.gif" width="1" height="68" alt="spacer" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100%"> </td>
|
||||
@ -62,11 +55,11 @@
|
||||
<table width="100%" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tr class="divSideboxEntry">
|
||||
<td width="20" align="center" valign="middle" class="textSidebox"><img src="../phpgwapi/templates/default/images/bullet.png" alt="ball" /></td><td class="textSidebox"><a class="textsidebox" href="../index.php">{user_login}</a></td>
|
||||
<td width="20" align="center" valign="middle" class="textSidebox"><img src="../api/templates/default/images/bullet.png" alt="ball" /></td><td class="textSidebox"><a class="textsidebox" href="../index.php">{user_login}</a></td>
|
||||
</tr>
|
||||
<!-- BEGIN loged_in -->
|
||||
<tr class="divSideboxEntry">
|
||||
<td width="20" align="center" valign="middle" class="textSidebox"><img src="../phpgwapi/templates/default/images/bullet.png" alt="ball" /></td><td class="textSidebox">{check_install}</td>
|
||||
<td width="20" align="center" valign="middle" class="textSidebox"><img src="../api/templates/default/images/bullet.png" alt="ball" /></td><td class="textSidebox">{check_install}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="divSideboxEntry">
|
||||
@ -74,17 +67,17 @@
|
||||
</tr>
|
||||
|
||||
<tr class="divSideboxEntry">
|
||||
<td width="20" align="center" valign="middle" class="textSidebox"><img src="../phpgwapi/templates/default/images/bullet.png" alt="ball" /></td><td class="textSidebox">{register_hooks}</td>
|
||||
<td width="20" align="center" valign="middle" class="textSidebox"><img src="../api/templates/default/images/bullet.png" alt="ball" /></td><td class="textSidebox">{register_hooks}</td>
|
||||
</tr>
|
||||
<tr class="divSideboxEntry">
|
||||
<td width="20" align="center" valign="middle" class="textSidebox"><img src="../phpgwapi/templates/default/images/bullet.png" alt="ball" /></td><td class="textSidebox">{logoutbutton}</td>
|
||||
<td width="20" align="center" valign="middle" class="textSidebox"><img src="../api/templates/default/images/bullet.png" alt="ball" /></td><td class="textSidebox">{logoutbutton}</td>
|
||||
</tr>
|
||||
<!-- END loged_in -->
|
||||
<tr class="divSideboxEntry">
|
||||
<td colspan="2" class="textSidebox"> </td>
|
||||
</tr>
|
||||
<tr class="divSideboxEntry">
|
||||
<td width="20" align="center" valign="middle" class="textSidebox"><img src="../phpgwapi/templates/default/images/bullet.png" alt="ball" /></td><td class="textSidebox">{manual}</td>
|
||||
<td width="20" align="center" valign="middle" class="textSidebox"><img src="../api/templates/default/images/bullet.png" alt="ball" /></td><td class="textSidebox">{manual}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
BIN
setup/templates/default/images/spacer.gif
Executable file
After Width: | Height: | Size: 43 B |
@ -60,14 +60,6 @@ function setDefaultDBPort(selectBox,portField)
|
||||
<td>{lang_persistdescr}</td>
|
||||
</tr>
|
||||
<tr class="row_off">
|
||||
<td><strong>{lang_session}</strong><br />
|
||||
<select name="setting[session_handler]">
|
||||
{session_options}
|
||||
</select>
|
||||
</td>
|
||||
<td>{lang_session_descr}</td>
|
||||
</tr>
|
||||
<tr class="row_on">
|
||||
<td><strong>{lang_enablemcrypt}</strong><br />
|
||||
<select name="setting[mcrypt_enabled]">
|
||||
<option value="True"{mcrypt_enabled_yes}>{lang_Yes}</option>
|
||||
@ -76,11 +68,11 @@ function setDefaultDBPort(selectBox,portField)
|
||||
</td>
|
||||
<td>{lang_mcrypt_warning}</td>
|
||||
</tr>
|
||||
<tr class="row_off">
|
||||
<tr class="row_on">
|
||||
<td><strong>{lang_mcryptiv}</strong><br /><input type="text" name="setting[mcrypt_iv]" value="{mcrypt_iv}" size="35" /></td>
|
||||
<td>{lang_mcryptivdescr}</td>
|
||||
</tr>
|
||||
<tr class="row_on">
|
||||
<tr class="row_off">
|
||||
<td><strong>{lang_domselect}</strong><br />
|
||||
<select name="setting[show_domain_selectbox]">
|
||||
<option value="True"{show_domain_selectbox_yes}>{lang_Yes}</option>
|
||||
|