Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1169281
install.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, Sep 25, 10:33 PM
Size
944 B
Mime Type
text/x-php
Expires
Sat, Sep 27, 10:33 PM (1 d, 5 h)
Engine
blob
Format
Raw Data
Handle
756641
Attached To
rMCUS Modules.Custom
install.php
View Options
<?php
$module_folder
=
'custom'
;
if
(!
defined
(
'IS_INSTALL'
))
{
// separate module install
define
(
'IS_INSTALL'
,
1
);
define
(
'ADMIN'
,
1
);
define
(
'REL_PATH'
,
$module_folder
);
define
(
'FULL_PATH'
,
realpath
(
dirname
(
__FILE__
)
.
'/..'
)
);
include_once
(
FULL_PATH
.
'/core/kernel/startup.php'
);
require_once
FULL_PATH
.
'/core/install/install_toolkit.php'
;
$toolkit
=
new
kInstallToolkit
();
}
else
{
// install, using installation wizard
$toolkit
=&
$this
->
toolkit
;
/* @var $toolkit kInstallToolkit */
}
$application
=&
kApplication
::
Instance
();
$application
->
Init
();
if
(
$application
->
RecallVar
(
'user_id'
)
!=
-
1
)
{
die
(
'restricted access!'
);
}
$toolkit
->
RunSQL
(
'/'
.
$module_folder
.
'/install/install_schema.sql'
);
$toolkit
->
RunSQL
(
'/'
.
$module_folder
.
'/install/install_data.sql'
);
$toolkit
->
ImportLanguage
(
'/'
.
$module_folder
.
'/install/english'
);
$toolkit
->
finalizeModuleInstall
(
$module_folder
,
false
);
Event Timeline
Log In to Comment