Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1216827
install_over_kx.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Nov 13, 1:00 AM
Size
2 KB
Mime Type
text/x-php
Expires
Sat, Nov 15, 1:00 AM (1 h, 12 m)
Engine
blob
Format
Raw Data
Handle
795352
Attached To
rINP In-Portal
install_over_kx.php
View Options
<?php
// new startup: begin
define
(
'REL_PATH'
,
'admin'
);
$relation_level
=
count
(
explode
(
'/'
,
REL_PATH
)
);
define
(
'FULL_PATH'
,
realpath
(
dirname
(
__FILE__
)
.
str_repeat
(
'/..'
,
$relation_level
)
)
);
if
(!
defined
(
'IS_INSTALL'
))
define
(
'IS_INSTALL'
,
1
);
require_once
FULL_PATH
.
'/kernel/startup.php'
;
// new startup: end
$application
=&
kApplication
::
Instance
();
$application
->
Init
();
require_once
FULL_PATH
.
'/admin/install/install_lib.php'
;
echo
'<strong>In-Portal Installation</strong><br />'
;
echo
'1. Importing Database<br />'
;
RunSchemaFile
(
$application
->
Conn
,
FULL_PATH
.
'/admin/install/inportal_schema.sql'
,
'dbconnection'
);
RunSQLFile
(
$application
->
Conn
,
FULL_PATH
.
'/admin/install/inportal_data.sql'
,
'dbconnection'
);
echo
'2. Writing config.php<br />'
;
if
(!(
isset
(
$ini_file
)
&&
$ini_file
))
{
$ini_file
=
FULL_PATH
.
'/config.php'
;
$ini_vars
=
inst_parse_portal_ini
(
$ini_file
,
true
);
}
$sql
=
'SELECT Version FROM '
.
TABLE_PREFIX
.
'Modules WHERE Name = '
.
$application
->
Conn
->
qstr
(
'In-Portal'
);
$mod_version
=
$application
->
Conn
->
GetOne
(
$sql
);
set_ini_value
(
'Module Versions'
,
'In-Portal'
,
$mod_version
);
save_values
();
echo
'3. Removing Config Cache<br />'
;
$sql
=
'DELETE FROM '
.
TABLE_PREFIX
.
'Cache WHERE (VarName = "config_files") OR (VarName LIKE "%_parsed")'
;
$application
->
Conn
->
Query
(
$sql
);
echo
'4. Importing Language Pack<br />'
;
$lang_xml
=&
$application
->
recallObjectP
(
'LangXML'
,
null
,
Array
(),
false
);
// false - don't use temp tables
/* @var $lang_xml LangXML_Parser */
$lang_xml
->
Parse
(
FULL_PATH
.
'/admin/install/langpacks/english.lang'
,
'|0|1|2|'
,
''
);
echo
'5. Verifying License Status<br />'
;
$modules_helper
=&
$application
->
recallObject
(
'ModulesHelper'
);
/* @var $modules_helper kModulesHelper */
$modules
=
$modules_helper
->
checkLogin
();
if
(
in_array
(
'In-Portal'
,
$modules
))
{
// in-portal is licensed
echo
'<script type="text/javascript">window.location.href = "index.php";</script>'
;
}
else
{
echo
'<a href="install.php?install_type=5&state=license&next_step=2">Please Update Your License</a><br />'
;
}
echo
'<strong>Done</strong><br />'
;
?>
Event Timeline
Log In to Comment