mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
add phpDoc comment to admin module
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10781 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ebc5edeec7
commit
dbec33b7ca
4 changed files with 202 additions and 92 deletions
|
|
@ -1,15 +1,16 @@
|
|||
<?php
|
||||
/**
|
||||
* @class adminAdminController
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief admin controller class of admin module
|
||||
**/
|
||||
|
||||
/**
|
||||
* adminAdminController class
|
||||
* admin controller class of admin module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @package /modules/admin
|
||||
* @version 0.1
|
||||
*/
|
||||
class adminAdminController extends admin {
|
||||
/**
|
||||
* @brief initialization
|
||||
* @return none
|
||||
**/
|
||||
/**
|
||||
* initialization
|
||||
* @return void
|
||||
*/
|
||||
function init() {
|
||||
// forbit access if the user is not an administrator
|
||||
$oMemberModel = &getModel('member');
|
||||
|
|
@ -17,6 +18,10 @@
|
|||
if($logged_info->is_admin!='Y') return $this->stop("msg_is_not_administrator");
|
||||
}
|
||||
|
||||
/**
|
||||
* Admin menu reset
|
||||
* @return void
|
||||
*/
|
||||
function procAdminMenuReset(){
|
||||
$menuSrl = Context::get('menu_srl');
|
||||
if (!$menuSrl) return $this->stop('msg_invalid_request');
|
||||
|
|
@ -30,10 +35,10 @@
|
|||
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Regenerate all cache files
|
||||
* @return none
|
||||
**/
|
||||
/**
|
||||
* Regenerate all cache files
|
||||
* @return void
|
||||
*/
|
||||
function procAdminRecompileCacheFile() {
|
||||
// rename cache dir
|
||||
$temp_cache_dir = './files/cache_'. time();
|
||||
|
|
@ -92,10 +97,10 @@
|
|||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Logout
|
||||
* @return none
|
||||
**/
|
||||
/**
|
||||
* Logout
|
||||
* @return void
|
||||
*/
|
||||
function procAdminLogout() {
|
||||
$oMemberController = &getController('member');
|
||||
$oMemberController->procMemberLogout();
|
||||
|
|
@ -103,6 +108,10 @@
|
|||
header('Location: '.getNotEncodedUrl('', 'module','admin'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert theme information
|
||||
* @return void|object
|
||||
*/
|
||||
function procAdminInsertThemeInfo(){
|
||||
$vars = Context::getRequestVars();
|
||||
$theme_file = _XE_PATH_.'files/theme/theme_info.php';
|
||||
|
|
@ -169,8 +178,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Toggle favorite
|
||||
**/
|
||||
* Toggle favorite
|
||||
* @return void
|
||||
*/
|
||||
function procAdminToggleFavorite()
|
||||
{
|
||||
$siteSrl = Context::get('site_srl');
|
||||
|
|
@ -203,8 +213,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief enviroment gathering agreement
|
||||
**/
|
||||
* Enviroment gathering agreement
|
||||
* @return void
|
||||
*/
|
||||
function procAdminEnviromentGatheringAgreement()
|
||||
{
|
||||
$isAgree = Context::get('is_agree');
|
||||
|
|
@ -216,8 +227,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief admin config update
|
||||
**/
|
||||
* Admin config update
|
||||
* @return void
|
||||
*/
|
||||
function procAdminUpdateConfig()
|
||||
{
|
||||
$adminTitle = Context::get('adminTitle');
|
||||
|
|
@ -260,8 +272,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief admin logo delete
|
||||
**/
|
||||
* Admin logo delete
|
||||
* @return void
|
||||
*/
|
||||
function procAdminDeleteLogo()
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
|
|
@ -282,8 +295,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Insert favorite
|
||||
**/
|
||||
* Insert favorite
|
||||
* @return object query result
|
||||
*/
|
||||
function _insertFavorite($siteSrl, $module, $type = 'module')
|
||||
{
|
||||
$args->adminFavoriteSrl = getNextSequence();
|
||||
|
|
@ -295,8 +309,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Delete favorite
|
||||
**/
|
||||
* Delete favorite
|
||||
* @return object query result
|
||||
*/
|
||||
function _deleteFavorite($favoriteSrl)
|
||||
{
|
||||
$args->admin_favorite_srl = $favoriteSrl;
|
||||
|
|
@ -305,8 +320,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Delete favorite
|
||||
**/
|
||||
* Delete all favorite
|
||||
* @return object query result
|
||||
*/
|
||||
function _deleteAllFavorite()
|
||||
{
|
||||
$args = null;
|
||||
|
|
@ -314,6 +330,10 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove admin icon
|
||||
* @return object|void
|
||||
*/
|
||||
function procAdminRemoveIcons(){
|
||||
$iconname = Context::get('iconname');
|
||||
$file_exist = FileHandler::readFile(_XE_PATH_.'files/attach/xeicon/'.$iconname);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,28 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* adminAdminModel class
|
||||
* admin model class of admin module
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @package /modules/admin
|
||||
* @version 0.1
|
||||
*/
|
||||
class adminAdminModel extends admin
|
||||
{
|
||||
/**
|
||||
* Ftp root path
|
||||
* @var string
|
||||
*/
|
||||
var $pwd;
|
||||
/**
|
||||
* Buffer for Admin GNB menu
|
||||
* @var string
|
||||
*/
|
||||
var $gnbLangBuffer;
|
||||
|
||||
/**
|
||||
* Add file list to Object after sftp connect
|
||||
* @return void|Object
|
||||
*/
|
||||
function getSFTPList()
|
||||
{
|
||||
$ftp_info = Context::getRequestVars();
|
||||
|
|
@ -38,6 +56,10 @@
|
|||
$this->add('list', $list);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add file list to Object after ftp connect
|
||||
* @return void|Object
|
||||
*/
|
||||
function getAdminFTPList()
|
||||
{
|
||||
Context::loadLang('./modules/autoinstall/lang');
|
||||
|
|
@ -98,6 +120,11 @@
|
|||
$this->add('list', $list);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameter arrange for send to XE collect server
|
||||
* @param string $type 'WORKING', 'INSTALL'
|
||||
* @return string
|
||||
*/
|
||||
function getEnv($type='WORKING') {
|
||||
|
||||
$skip = array(
|
||||
|
|
@ -156,6 +183,10 @@
|
|||
return $param;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return theme info list by theme directory list
|
||||
* @return array
|
||||
*/
|
||||
function getThemeList(){
|
||||
$path = _XE_PATH_.'themes';
|
||||
$list = FileHandler::readDir($path);
|
||||
|
|
@ -170,6 +201,12 @@
|
|||
return $theme_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return theme info
|
||||
* @param string $theme_name
|
||||
* @param array $layout_list
|
||||
* @return object
|
||||
*/
|
||||
function getThemeInfo($theme_name, $layout_list = null){
|
||||
if ($GLOBALS['__ThemeInfo__'][$theme_name]) return $GLOBALS['__ThemeInfo__'][$theme_name];
|
||||
|
||||
|
|
@ -294,6 +331,10 @@
|
|||
return $theme_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return theme module skin list
|
||||
* @return array
|
||||
*/
|
||||
function getModulesSkinList(){
|
||||
if ($GLOBALS['__ThemeModuleSkin__']['__IS_PARSE__']) return $GLOBALS['__ThemeModuleSkin__'];
|
||||
$searched_list = FileHandler::readDir('./modules');
|
||||
|
|
@ -323,6 +364,10 @@
|
|||
return $GLOBALS['__ThemeModuleSkin__'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return admin menu language
|
||||
* @return array
|
||||
*/
|
||||
function getAdminMenuLang()
|
||||
{
|
||||
$currentLang = Context::getLangType();
|
||||
|
|
@ -356,8 +401,11 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Get admin favorite list
|
||||
**/
|
||||
* Get admin favorite list
|
||||
* @param int $siteSrl if default site, siteSrl is zero
|
||||
* @param bool $isGetModuleInfo
|
||||
* @return object
|
||||
*/
|
||||
function getFavoriteList($siteSrl = 0, $isGetModuleInfo = false)
|
||||
{
|
||||
$args->site_srl = $siteSrl;
|
||||
|
|
@ -382,8 +430,11 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Check available insert favorite
|
||||
**/
|
||||
* Check available insert favorite
|
||||
* @param int $siteSrl if default site, siteSrl is zero
|
||||
* @param string $module
|
||||
* @return object
|
||||
*/
|
||||
function isExistsFavorite($siteSrl, $module)
|
||||
{
|
||||
$args->site_srl = $siteSrl;
|
||||
|
|
@ -406,8 +457,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Return site list
|
||||
**/
|
||||
* Return site list
|
||||
* @return void
|
||||
*/
|
||||
function getSiteAllList()
|
||||
{
|
||||
if(Context::get('domain')) $args->domain = Context::get('domain');
|
||||
|
|
@ -421,8 +473,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Return site count
|
||||
**/
|
||||
* Return site count
|
||||
* @param string $date
|
||||
* @return int
|
||||
*/
|
||||
function getSiteCountByDate($date = '')
|
||||
{
|
||||
if($date) $args->regDate = date('Ymd', strtotime($date));
|
||||
|
|
|
|||
|
|
@ -1,19 +1,28 @@
|
|||
<?php
|
||||
/**
|
||||
* @class adminAdminView
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief admin view class of admin module
|
||||
**/
|
||||
|
||||
/**
|
||||
* adminAdminView class
|
||||
* Admin view class of admin module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @package /modules/admin
|
||||
* @version 0.1
|
||||
*/
|
||||
class adminAdminView extends admin {
|
||||
|
||||
/**
|
||||
* layout list
|
||||
* @var array
|
||||
*/
|
||||
var $layout_list;
|
||||
/**
|
||||
* easy install check file
|
||||
* @var array
|
||||
*/
|
||||
var $easyinstallCheckFile = './files/env/easyinstall_last';
|
||||
|
||||
/**
|
||||
* @brief Initilization
|
||||
* @return none
|
||||
**/
|
||||
* Initilization
|
||||
* @return void
|
||||
*/
|
||||
function init() {
|
||||
// forbit access if the user is not an administrator
|
||||
$oMemberModel = &getModel('member');
|
||||
|
|
@ -49,6 +58,10 @@
|
|||
$this->checkEasyinstall();
|
||||
}
|
||||
|
||||
/**
|
||||
* check easy install
|
||||
* @return void
|
||||
*/
|
||||
function checkEasyinstall()
|
||||
{
|
||||
$lastTime = (int)FileHandler::readFile($this->easyinstallCheckFile);
|
||||
|
|
@ -78,12 +91,21 @@
|
|||
$this->_markingCheckEasyinstall();
|
||||
}
|
||||
|
||||
/**
|
||||
* update easy install file content
|
||||
* @return void
|
||||
*/
|
||||
function _markingCheckEasyinstall()
|
||||
{
|
||||
$currentTime = time();
|
||||
FileHandler::writeFile($this->easyinstallCheckFile, $currentTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* Include admin menu php file and make menu url
|
||||
* Setting admin logo, newest news setting
|
||||
* @return void
|
||||
*/
|
||||
function makeGnbUrl($module = 'admin')
|
||||
{
|
||||
global $lang;
|
||||
|
|
@ -188,10 +210,10 @@
|
|||
Context::setBrowserTitle($browserTitle);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Display Super Admin Dashboard
|
||||
* @return none
|
||||
**/
|
||||
/**
|
||||
* Display Super Admin Dashboard
|
||||
* @return void
|
||||
*/
|
||||
function dispAdminIndex() {
|
||||
// Get statistics
|
||||
$args->date = date("Ymd000000", time()-60*60*24);
|
||||
|
|
@ -293,10 +315,10 @@
|
|||
$this->setTemplateFile('index');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Display Configuration(settings) page
|
||||
* @return none
|
||||
**/
|
||||
/**
|
||||
* Display Configuration(settings) page
|
||||
* @return void
|
||||
*/
|
||||
function dispAdminConfigGeneral() {
|
||||
Context::loadLang('modules/install/lang');
|
||||
|
||||
|
|
@ -340,10 +362,10 @@
|
|||
$security->encodeHTML('news..', 'released_version', 'download_link', 'selected_lang', 'module_list..', 'module_list..author..', 'addon_list..', 'addon_list..author..', 'start_module.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Display Configuration(settings) page
|
||||
* @return none
|
||||
**/
|
||||
/**
|
||||
* Display FTP Configuration(settings) page
|
||||
* @return void
|
||||
*/
|
||||
function dispAdminConfigFtp() {
|
||||
Context::loadLang('modules/install/lang');
|
||||
|
||||
|
|
@ -359,9 +381,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Display Admin Menu Configuration(settings) page
|
||||
* @return none
|
||||
**/
|
||||
* Display Admin Menu Configuration(settings) page
|
||||
* @return void
|
||||
*/
|
||||
function dispAdminSetup()
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
|
|
@ -377,6 +399,10 @@
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Enviroment information send to XE collect server
|
||||
* @return void
|
||||
*/
|
||||
function showSendEnv() {
|
||||
if(Context::getResponseMethod() != 'HTML') return;
|
||||
|
||||
|
|
@ -411,6 +437,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Admin theme Configuration(settings) page
|
||||
* @return void
|
||||
*/
|
||||
function dispAdminTheme(){
|
||||
// choice theme file
|
||||
$theme_file = _XE_PATH_.'files/theme/theme_info.php';
|
||||
|
|
|
|||
|
|
@ -1,23 +1,25 @@
|
|||
<?php
|
||||
/**
|
||||
* @class admin
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief base class of admin module
|
||||
**/
|
||||
|
||||
/**
|
||||
* admin class
|
||||
* @brief base class of admin module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @package /modules/admin
|
||||
* @version 0.1
|
||||
*/
|
||||
class admin extends ModuleObject {
|
||||
|
||||
/**
|
||||
* @brief install admin module
|
||||
* @return new Object
|
||||
**/
|
||||
/**
|
||||
* Install admin module
|
||||
* @return Object
|
||||
*/
|
||||
function moduleInstall() {
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief if update is necessary it returns true
|
||||
**/
|
||||
/**
|
||||
* If update is necessary it returns true
|
||||
* @return bool
|
||||
*/
|
||||
function checkUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isColumnExists("admin_favorite", "type")) return true;
|
||||
|
|
@ -25,10 +27,10 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief update module
|
||||
* @return new Object
|
||||
**/
|
||||
/**
|
||||
* Update module
|
||||
* @return Object
|
||||
*/
|
||||
function moduleUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isColumnExists("admin_favorite", "type"))
|
||||
|
|
@ -53,17 +55,17 @@
|
|||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief regenerate cache file
|
||||
* @return none
|
||||
**/
|
||||
/**
|
||||
* Regenerate cache file
|
||||
* @return void
|
||||
*/
|
||||
function recompileCache() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief regenerate xe admin default menu
|
||||
* @return none
|
||||
**/
|
||||
/**
|
||||
* Regenerate xe admin default menu
|
||||
* @return void
|
||||
*/
|
||||
function createXeAdminMenu()
|
||||
{
|
||||
//insert menu
|
||||
|
|
@ -238,6 +240,10 @@
|
|||
$oMenuAdminConroller->makeXmlFile($menuSrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return parent menu key by child menu
|
||||
* @return string
|
||||
*/
|
||||
function _getGnbKey($menuName)
|
||||
{
|
||||
switch($menuName) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue