issue 2662 coding convention in modules/addon

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12233 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-11-15 08:26:15 +00:00
parent 7928ad163b
commit da0146a8ae
5 changed files with 982 additions and 926 deletions

View file

@ -1,115 +1,124 @@
<?php
/**
* Admin view class of addon modules
* @author NHN (developers@xpressengine.com)
**/
class addonAdminView extends addon {
/**
* Admin view class of addon modules
* @author NHN (developers@xpressengine.com)
*/
class addonAdminView extends addon
{
/**
* Initialization
*
* @return void
*/
function init()
{
$this->setTemplatePath($this->module_path.'tpl');
}
/**
* Initialization
*
* @return void
**/
function init() {
$this->setTemplatePath($this->module_path.'tpl');
}
/**
* Add Management main page (showing the list)
*
* @return Object
*/
function dispAddonAdminIndex()
{
$oAdminModel = &getAdminModel('admin');
/**
* Add Management main page (showing the list)
*
* @return Object
**/
function dispAddonAdminIndex() {
$oAdminModel = &getAdminModel('admin');
// Add to the list settings
$oAddonModel = &getAdminModel('addon');
$addon_list = $oAddonModel->getAddonListForSuperAdmin();
// Add to the list settings
$oAddonModel = &getAdminModel('addon');
$addon_list = $oAddonModel->getAddonListForSuperAdmin();
$security = new Security($addon_list);
$addon_list = $security->encodeHTML('..', '..author..');
$security = new Security($addon_list);
$addon_list = $security->encodeHTML('..', '..author..');
foreach($addon_list as $no => $addon_info)
{
$addon_list[$no]->description = nl2br(trim($addon_info->description));
}
foreach($addon_list as $no => $addon_info)
Context::set('addon_list', $addon_list);
Context::set('addon_count', count($addon_list));
// Template specifies the path and file
$this->setTemplateFile('addon_list');
}
/**
* Display setup page
*
* @return Object
*/
function dispAddonAdminSetup()
{
$site_module_info = Context::get('site_module_info');
// Wanted to add the requested
$selected_addon = Context::get('selected_addon');
// Wanted to add the requested information
$oAddonModel = &getAdminModel('addon');
$addon_info = $oAddonModel->getAddonInfoXml($selected_addon, $site_module_info->site_srl, 'site');
Context::set('addon_info', $addon_info);
// Get a mid list
$oModuleModel = &getModel('module');
$oModuleAdminModel = &getAdminModel('module');
if($site_module_info->site_srl) $args->site_srl = $site_module_info->site_srl;
$columnList = array('module_srl', 'module_category_srl', 'mid', 'browser_title');
$mid_list = $oModuleModel->getMidList($args, $columnList);
// module_category and module combination
if(!$site_module_info->site_srl)
{
// Get a list of module categories
$module_categories = $oModuleModel->getModuleCategories();
if(is_array($mid_list))
{
$addon_list[$no]->description = nl2br(trim($addon_info->description));
foreach($mid_list as $module_srl => $module)
{
$module_categories[$module->module_category_srl]->list[$module_srl] = $module;
}
}
}
else
{
$module_categories[0]->list = $mid_list;
}
Context::set('addon_list', $addon_list);
Context::set('addon_count', count($addon_list));
// Template specifies the path and file
$this->setTemplateFile('addon_list');
}
Context::set('mid_list',$module_categories);
/**
* Display setup page
*
* @return Object
**/
function dispAddonAdminSetup() {
$site_module_info = Context::get('site_module_info');
// Wanted to add the requested
$selected_addon = Context::get('selected_addon');
// Wanted to add the requested information
$oAddonModel = &getAdminModel('addon');
$addon_info = $oAddonModel->getAddonInfoXml($selected_addon, $site_module_info->site_srl, 'site');
Context::set('addon_info', $addon_info);
// Get a mid list
$oModuleModel = &getModel('module');
$oModuleAdminModel = &getAdminModel('module');
// Template specifies the path and file
$this->setTemplateFile('setup_addon');
if($site_module_info->site_srl) $args->site_srl = $site_module_info->site_srl;
$columnList = array('module_srl', 'module_category_srl', 'mid', 'browser_title');
$mid_list = $oModuleModel->getMidList($args, $columnList);
// module_category and module combination
if(!$site_module_info->site_srl) {
// Get a list of module categories
$module_categories = $oModuleModel->getModuleCategories();
if(Context::get('module') != 'admin')
{
$this->setLayoutPath('./common/tpl');
$this->setLayoutFile('popup_layout');
}
if(is_array($mid_list)) {
foreach($mid_list as $module_srl => $module) {
$module_categories[$module->module_category_srl]->list[$module_srl] = $module;
}
}
} else {
$module_categories[0]->list = $mid_list;
}
$security = new Security();
$security->encodeHTML('addon_info.', 'addon_info.author..', 'mid_list....');
}
Context::set('mid_list',$module_categories);
/**
* Display information
*
* @return Object
*/
function dispAddonAdminInfo()
{
$site_module_info = Context::get('site_module_info');
// Wanted to add the requested
$selected_addon = Context::get('selected_addon');
// Wanted to add the requested information
$oAddonModel = &getAdminModel('addon');
$addon_info = $oAddonModel->getAddonInfoXml($selected_addon, $site_module_info->site_srl);
Context::set('addon_info', $addon_info);
// Set the layout to be pop-up
$this->setLayoutFile('popup_layout');
// Template specifies the path and file
$this->setTemplateFile('addon_info');
// Template specifies the path and file
$this->setTemplateFile('setup_addon');
if(Context::get('module') != 'admin')
{
$this->setLayoutPath('./common/tpl');
$this->setLayoutFile('popup_layout');
}
$security = new Security();
$security->encodeHTML('addon_info.', 'addon_info.author..', 'mid_list....');
}
/**
* Display information
*
* @return Object
**/
function dispAddonAdminInfo() {
$site_module_info = Context::get('site_module_info');
// Wanted to add the requested
$selected_addon = Context::get('selected_addon');
// Wanted to add the requested information
$oAddonModel = &getAdminModel('addon');
$addon_info = $oAddonModel->getAddonInfoXml($selected_addon, $site_module_info->site_srl);
Context::set('addon_info', $addon_info);
// Set the layout to be pop-up
$this->setLayoutFile('popup_layout');
// Template specifies the path and file
$this->setTemplateFile('addon_info');
$security = new Security();
$security->encodeHTML('addon_info.', 'addon_info.author..');
}
}
?>
$security = new Security();
$security->encodeHTML('addon_info.', 'addon_info.author..');
}
}
/* End of file addon.admin.view.php */
/* Location: ./modules/addon/addon.admin.view.php */