XpressEngine Core
1.11.2
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
modules
page
page.class.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (C) NAVER <http://www.navercorp.com> */
8
class
page
extends
ModuleObject
9
{
13
function
moduleInstall
()
14
{
15
// page generated from the cache directory to use
16
FileHandler::makeDir
(
'./files/cache/page'
);
17
18
return
new
BaseObject
();
19
}
20
24
function
checkUpdate
()
25
{
26
$oModuleModel
=
getModel
(
'module'
);
27
$oModuleController
=
getController
(
'module'
);
28
$version_update_id = implode(
'.'
, array(__CLASS__,
__XE_VERSION__
,
'updated'
));
29
if
(
$oModuleModel
->needUpdate($version_update_id))
30
{
31
$output
=
executeQuery
(
'page.pageTypeOpageCheck'
);
32
if
(
$output
->toBool() &&
$output
->data)
return
true
;
33
34
$output
=
executeQuery
(
'page.pageTypeNullCheck'
);
35
if
(
$output
->toBool() &&
$output
->data)
return
true
;
36
37
$oModuleController
->insertUpdatedLog($version_update_id);
38
}
39
40
return
false
;
41
}
42
46
function
moduleUpdate
()
47
{
48
$oModuleModel
=
getModel
(
'module'
);
49
$oModuleController
=
getController
(
'module'
);
50
$version_update_id = implode(
'.'
, array(__CLASS__,
__XE_VERSION__
,
'updated'
));
51
if
(
$oModuleModel
->needUpdate($version_update_id))
52
{
53
$args
=
new
stdClass;
54
// opage module instance update
55
$output
=
executeQueryArray
(
'page.pageTypeOpageCheck'
);
56
if
(
$output
->toBool() && count(
$output
->data) > 0)
57
{
58
foreach
(
$output
->data as $val)
59
{
60
$args
->module_srl = $val->module_srl;
61
$args
->name =
'page_type'
;
62
$args
->value=
'OUTSIDE'
;
63
$in_out =
executeQuery
(
'page.insertPageType'
,
$args
);
64
}
65
$output
=
executeQuery
(
'page.updateAllOpage'
);
66
if
(!
$output
->toBool())
return
$output
;
67
}
68
69
// old page module instance update
70
$output
=
executeQueryArray
(
'page.pageTypeNullCheck'
);
71
$skin_update_srls = array();
72
if
(
$output
->toBool() &&
$output
->data)
73
{
74
foreach
(
$output
->data as $val)
75
{
76
$args
->module_srl = $val->module_srl;
77
$args
->name =
'page_type'
;
78
$args
->value=
'WIDGET'
;
79
$in_out =
executeQuery
(
'page.insertPageType'
,
$args
);
80
81
$skin_update_srls[] = $val->module_srl;
82
}
83
}
84
85
if
(count($skin_update_srls)>0)
86
{
87
$skin_args =
new
stdClass;
88
$skin_args->module_srls = implode(
','
,$skin_update_srls);
89
$skin_args->is_skin_fix =
"Y"
;
90
$ouput =
executeQuery
(
'page.updateSkinFix'
, $skin_args);
91
}
92
93
$oModuleController
->insertUpdatedLog($version_update_id);
94
}
95
96
return
new
BaseObject
(0,
'success_updated'
);
97
}
98
102
function
recompileCache
()
103
{
104
}
105
}
106
/* End of file page.class.php */
107
/* Location: ./modules/page/page.class.php */
$oModuleModel
$oModuleModel
Definition:
ko.install.php:236
getController
getController($module_name)
Definition:
func.inc.php:90
__XE_VERSION__
const __XE_VERSION__
Definition:
config.inc.php:32
$output
$output
Definition:
ko.install.php:193
page
high class of the module page
Definition:
page.class.php:8
page\checkUpdate
checkUpdate()
a method to check if successfully installed
Definition:
page.class.php:24
BaseObject
Definition:
BaseObject.class.php:9
page\moduleUpdate
moduleUpdate()
Execute update.
Definition:
page.class.php:46
$args
$args
Definition:
ko.install.php:185
page\recompileCache
recompileCache()
Re-generate the cache file.
Definition:
page.class.php:102
page\moduleInstall
moduleInstall()
Implement if additional tasks are necessary when installing.
Definition:
page.class.php:13
FileHandler\makeDir
makeDir($path_string)
Definition:
FileHandler.class.php:282
getModel
getModel($module_name)
Definition:
func.inc.php:145
ModuleObject
Definition:
ModuleObject.class.php:9
executeQueryArray
executeQueryArray($query_id, $args=NULL, $arg_columns=NULL)
Definition:
func.inc.php:219
executeQuery
executeQuery($query_id, $args=NULL, $arg_columns=NULL)
Definition:
func.inc.php:203
$oModuleController
$oModuleController
Definition:
ko.install.php:287
Generated on Tue Dec 18 2018 17:04:29 for XpressEngine Core by
1.8.5