mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-24 12:52:19 +09:00
issue 2119. supporting php 5.4. addon module.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12707 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8a7c28babc
commit
ee9247e866
4 changed files with 309 additions and 103 deletions
|
|
@ -1,10 +1,12 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* High class of addon modules
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class addon extends ModuleObject
|
||||
{
|
||||
|
||||
/**
|
||||
* Implement if additional tasks are necessary when installing
|
||||
*
|
||||
|
|
@ -13,7 +15,7 @@ class addon extends ModuleObject
|
|||
function moduleInstall()
|
||||
{
|
||||
// Register to add a few
|
||||
$oAddonController = &getAdminController('addon');
|
||||
$oAddonController = getAdminController('addon');
|
||||
$oAddonController->doInsert('autolink', 0, 'site', 'Y');
|
||||
$oAddonController->doInsert('blogapi');
|
||||
$oAddonController->doInsert('counter', 0, 'site', 'Y');
|
||||
|
|
@ -35,14 +37,23 @@ class addon extends ModuleObject
|
|||
*/
|
||||
function checkUpdate()
|
||||
{
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isColumnExists("addons", "is_used_m")) return true;
|
||||
if(!$oDB->isColumnExists("addons_site", "is_used_m")) return true;
|
||||
$oDB = DB::getInstance();
|
||||
if(!$oDB->isColumnExists("addons", "is_used_m"))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
if(!$oDB->isColumnExists("addons_site", "is_used_m"))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// 2011. 7. 29. add is_fixed column
|
||||
if(!$oDB->isColumnExists('addons', 'is_fixed')) return true;
|
||||
if(!$oDB->isColumnExists('addons', 'is_fixed'))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return false;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -52,20 +63,20 @@ class addon extends ModuleObject
|
|||
*/
|
||||
function moduleUpdate()
|
||||
{
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB = DB::getInstance();
|
||||
if(!$oDB->isColumnExists("addons", "is_used_m"))
|
||||
{
|
||||
$oDB->addColumn("addons", "is_used_m", "char", 1, "N", true);
|
||||
$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);
|
||||
$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);
|
||||
$oDB->addColumn('addons', 'is_fixed', 'char', 1, 'N', TRUE);
|
||||
|
||||
// move addon info to addon_site table
|
||||
$output = executeQueryArray('addon.getAddons');
|
||||
|
|
@ -73,6 +84,7 @@ class addon extends ModuleObject
|
|||
{
|
||||
foreach($output->data as $row)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->site_srl = 0;
|
||||
$args->addon = $row->addon;
|
||||
$args->is_used = $row->is_used;
|
||||
|
|
@ -93,6 +105,7 @@ class addon extends ModuleObject
|
|||
*/
|
||||
function recompileCache()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue