mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-17 10:19:55 +09:00
Syndication API를 XE Core에 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7640 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ee1fc6237a
commit
1675d4c8d9
38 changed files with 1025 additions and 0 deletions
40
modules/syndication/syndication.admin.controller.php
Normal file
40
modules/syndication/syndication.admin.controller.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
/**
|
||||
* @class syndicationAdminController
|
||||
* @author zero (skklove@gmail.com)
|
||||
* @brief syndication 모듈의 admin Controller class
|
||||
**/
|
||||
|
||||
class syndicationAdminController extends syndication {
|
||||
|
||||
function init() {
|
||||
}
|
||||
|
||||
function procSyndicationAdminInsertService() {
|
||||
$oModuleController = &getController('module');
|
||||
$oSyndicationController = &getController('syndication');
|
||||
$oSyndicationModel = &getModel('syndication');
|
||||
|
||||
$config->target_services = explode('|@|',Context::get('target_services'));
|
||||
$config->site_url = preg_replace('/\/+$/is','',Context::get('site_url'));
|
||||
$config->year = Context::get('year');
|
||||
if(!$config->site_url) return new Object(-1,'msg_site_url_is_null');
|
||||
|
||||
$oModuleController->insertModuleConfig('syndication',$config);
|
||||
$oSyndicationController->ping($oSyndicationModel->getID('site'), 'site');
|
||||
|
||||
$except_module = Context::get('except_module');
|
||||
$output = executeQuery('syndication.deleteExceptModules');
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$modules = explode(',',$except_module);
|
||||
for($i=0,$c=count($modules);$i<$c;$i++) {
|
||||
$args->module_srl = $modules[$i];
|
||||
$output = executeQuery('syndication.insertExceptModule',$args);
|
||||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
|
||||
$this->setMessage('success_applied');
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue