Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1165879
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
Mon, Sep 22, 6:57 PM
Size
2 KB
Mime Type
text/x-php
Expires
Wed, Sep 24, 6:57 PM (6 m, 27 s)
Engine
blob
Format
Raw Data
Handle
754984
Attached To
rMINL Modules.In-Link
install.php
View Options
<?php
/**
* @version $Id: install.php 16507 2016-12-26 18:30:07Z alex $
* @package In-Link
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/
$module_folder
=
'modules/in-link'
;
if
(
!
defined
(
'IS_INSTALL'
)
)
{
// separate module install
define
(
'IS_INSTALL'
,
1
);
define
(
'ADMIN'
,
1
);
define
(
'FULL_PATH'
,
realpath
(
dirname
(
__FILE__
)
.
'/../..'
));
include_once
(
FULL_PATH
.
'/core/kernel/startup.php'
);
require_once
FULL_PATH
.
'/core/install/install_toolkit.php'
;
$constants_file
=
FULL_PATH
.
'/'
.
$module_folder
.
'/constants.php'
;
if
(
file_exists
(
$constants_file
)
)
{
require_once
$constants_file
;
}
$toolkit
=
new
kInstallToolkit
();
}
else
{
// install, using installation wizard
$toolkit
=&
$this
->
toolkit
;
/* @var $toolkit kInstallToolkit */
}
$application
=&
kApplication
::
Instance
();
$application
->
Init
();
if
(
$application
->
RecallVar
(
'user_id'
)
!=
USER_ROOT
)
{
die
(
'restricted access!'
);
}
$category
=&
$toolkit
->
createModuleCategory
(
'Directory'
,
'Link Directory'
,
'#in-link/section_design#'
,
'in-link/img/menu_links.gif'
);
$toolkit
->
RunSQL
(
'/'
.
$module_folder
.
'/install/install_schema.sql'
);
$toolkit
->
RunSQL
(
'/'
.
$module_folder
.
'/install/install_data.sql'
,
'{LinkCatId}'
,
$category
->
GetID
());
$toolkit
->
ImportLanguage
(
'/'
.
$module_folder
.
'/install/english'
,
isset
(
$constants_file
));
$toolkit
->
SetModuleRootCategory
(
basename
(
$module_folder
),
$category
->
GetID
());
$toolkit
->
linkCustomFields
(
basename
(
$module_folder
),
'l'
,
4
);
// to create Custom Fields for Links
$toolkit
->
linkCustomFields
(
'KERNEL'
,
'c'
,
1
);
// to create ItemTemplate custom field
$toolkit
->
setModuleItemTemplate
(
$category
,
'l'
,
'#in-link/item_design#'
);
$toolkit
->
finalizeModuleInstall
(
$module_folder
,
true
);
Event Timeline
Log In to Comment