1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-05 12:48:00 +02:00

Core Improvements: Next Round #79 #80

This commit is contained in:
Awilum
2013-01-08 23:52:23 +02:00
parent 7552b2aee5
commit cb95f9cee2
6 changed files with 339 additions and 268 deletions

View File

@@ -1,28 +1,28 @@
<?php
// Add plugin navigation link
Navigation::add(__('Information', 'information'), 'system', 'information', 5);
// Add plugin navigation link
Navigation::add(__('Information', 'information'), 'system', 'information', 5);
/**
* Information Admin Class
*/
class InformationAdmin extends Backend
{
/**
* Information Admin Class
* Information main function
*/
class InformationAdmin extends Backend
public static function main()
{
/**
* Information main function
*/
public static function main()
{
// Init vars
$php_modules = array();
// Init vars
$php_modules = array();
// Get array with the names of all modules compiled and loaded
$php_modules = get_loaded_extensions();
// Display view
View::factory('box/information/views/backend/index')
->assign('php_modules', $php_modules)
->display();
}
// Get array with the names of all modules compiled and loaded
$php_modules = get_loaded_extensions();
// Display view
View::factory('box/information/views/backend/index')
->assign('php_modules', $php_modules)
->display();
}
}

View File

@@ -1,29 +1,29 @@
<?php
/**
* Information plugin
*
* @package Monstra
* @subpackage Plugins
* @author Romanenko Sergey / Awilum
* @copyright 2012-2013 Romanenko Sergey / Awilum
* @version 1.0.0
*
*/
/**
* Information plugin
*
* @package Monstra
* @subpackage Plugins
* @author Romanenko Sergey / Awilum
* @copyright 2012-2013 Romanenko Sergey / Awilum
* @version 1.0.0
*
*/
// Register plugin
Plugin::register( __FILE__,
__('Information', 'information'),
__('Information plugin', 'information'),
'1.0.0',
'Awilum',
'http://monstra.org/',
null,
'box');
// Register plugin
Plugin::register( __FILE__,
__('Information', 'information'),
__('Information plugin', 'information'),
'1.0.0',
'Awilum',
'http://monstra.org/',
null,
'box');
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {
// Include Information Admin
Plugin::Admin('information', 'box');
// Include Information Admin
Plugin::Admin('information', 'box');
}
}

View File

@@ -54,5 +54,4 @@ class Menu
->display();
}
}