mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-15 09:19:57 +09:00
merge from 1.7.3.5(r13153:r13167)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@13168 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cc47d2b247
commit
2d3f149b5a
2042 changed files with 129266 additions and 126243 deletions
|
|
@ -1,93 +1,113 @@
|
|||
<?php
|
||||
/**
|
||||
* High class of addon modules
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
class addon extends ModuleObject {
|
||||
|
||||
/**
|
||||
* Implement if additional tasks are necessary when installing
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// Register to add a few
|
||||
$oAddonController = &getAdminController('addon');
|
||||
$oAddonController->doInsert('autolink', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('blogapi');
|
||||
$oAddonController->doInsert('counter', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('member_communication', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('member_extra_info', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('mobile', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('resize_image', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('openid_delegation_id');
|
||||
$oAddonController->doInsert('point_level_icon');
|
||||
/**
|
||||
* High class of addon modules
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class addon extends ModuleObject
|
||||
{
|
||||
|
||||
$oAddonController->makeCacheFile(0);
|
||||
return new Object();
|
||||
}
|
||||
/**
|
||||
* Implement if additional tasks are necessary when installing
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function moduleInstall()
|
||||
{
|
||||
// Register to add a few
|
||||
$oAddonController = getAdminController('addon');
|
||||
$oAddonController->doInsert('autolink', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('blogapi');
|
||||
$oAddonController->doInsert('counter', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('member_communication', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('member_extra_info', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('mobile', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('resize_image', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('openid_delegation_id');
|
||||
$oAddonController->doInsert('point_level_icon');
|
||||
|
||||
/**
|
||||
* A method to check if successfully installed
|
||||
*
|
||||
* @return bool
|
||||
**/
|
||||
function checkUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isColumnExists("addons", "is_used_m")) return true;
|
||||
if(!$oDB->isColumnExists("addons_site", "is_used_m")) return true;
|
||||
$oAddonController->makeCacheFile(0);
|
||||
return new Object();
|
||||
}
|
||||
|
||||
// 2011. 7. 29. add is_fixed column
|
||||
if (!$oDB->isColumnExists('addons', 'is_fixed')) return true;
|
||||
/**
|
||||
* A method to check if successfully installed
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function checkUpdate()
|
||||
{
|
||||
$oDB = DB::getInstance();
|
||||
if(!$oDB->isColumnExists("addons", "is_used_m"))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
if(!$oDB->isColumnExists("addons_site", "is_used_m"))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
// 2011. 7. 29. add is_fixed column
|
||||
if(!$oDB->isColumnExists('addons', 'is_fixed'))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute update
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isColumnExists("addons", "is_used_m")) {
|
||||
$oDB->addColumn("addons", "is_used_m", "char", 1, "N", true);
|
||||
}
|
||||
if(!$oDB->isColumnExists("addons_site", "is_used_m")) {
|
||||
$oDB->addColumn("addons_site", "is_used_m", "char", 1, "N", true);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// 2011. 7. 29. add is_fixed column
|
||||
if (!$oDB->isColumnExists('addons', 'is_fixed'))
|
||||
/**
|
||||
* Execute update
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function moduleUpdate()
|
||||
{
|
||||
$oDB = DB::getInstance();
|
||||
if(!$oDB->isColumnExists("addons", "is_used_m"))
|
||||
{
|
||||
$oDB->addColumn("addons", "is_used_m", "char", 1, "N", TRUE);
|
||||
}
|
||||
if(!$oDB->isColumnExists("addons_site", "is_used_m"))
|
||||
{
|
||||
$oDB->addColumn("addons_site", "is_used_m", "char", 1, "N", TRUE);
|
||||
}
|
||||
|
||||
// 2011. 7. 29. add is_fixed column
|
||||
if(!$oDB->isColumnExists('addons', 'is_fixed'))
|
||||
{
|
||||
$oDB->addColumn('addons', 'is_fixed', 'char', 1, 'N', TRUE);
|
||||
|
||||
// move addon info to addon_site table
|
||||
$output = executeQueryArray('addon.getAddons');
|
||||
if($output->data)
|
||||
{
|
||||
$oDB->addColumn('addons', 'is_fixed', 'char', 1, 'N', true);
|
||||
|
||||
// move addon info to addon_site table
|
||||
$output = executeQueryArray('addon.getAddons');
|
||||
if ($output->data)
|
||||
foreach($output->data as $row)
|
||||
{
|
||||
foreach($output->data as $row)
|
||||
{
|
||||
$args->site_srl = 0;
|
||||
$args->addon = $row->addon;
|
||||
$args->is_used = $row->is_used;
|
||||
$args->is_used_m = $row->is_used_m;
|
||||
$args->extra_vars = $row->extra_vars;
|
||||
executeQuery('addon.insertSiteAddon', $args);
|
||||
}
|
||||
$args = new stdClass();
|
||||
$args->site_srl = 0;
|
||||
$args->addon = $row->addon;
|
||||
$args->is_used = $row->is_used;
|
||||
$args->is_used_m = $row->is_used_m;
|
||||
$args->extra_vars = $row->extra_vars;
|
||||
executeQuery('addon.insertSiteAddon', $args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-generate the cache file
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function recompileCache() {
|
||||
}
|
||||
/**
|
||||
* Re-generate the cache file
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function recompileCache()
|
||||
{
|
||||
|
||||
}
|
||||
?>
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file addon.class.php */
|
||||
/* Location: ./modules/addon/addon.class.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue