mirror of https://github.com/movim/movim
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
745 B
35 lines
745 B
<?php
|
|
|
|
class AdminTest extends \Movim\Widget\Base
|
|
{
|
|
function load()
|
|
{
|
|
$this->addjs('admintest.js');
|
|
$this->addcss('admintest.css');
|
|
}
|
|
|
|
public function version()
|
|
{
|
|
return (version_compare(PHP_VERSION, '5.6.0') >= 0);
|
|
}
|
|
|
|
public function testDir($dir)
|
|
{
|
|
return (file_exists($dir) && is_dir($dir) && is_writable($dir));
|
|
}
|
|
|
|
public function testFile($file)
|
|
{
|
|
return (file_exists($file) && is_writable($file));
|
|
}
|
|
|
|
function display()
|
|
{
|
|
$md = \Modl\Modl::getInstance();
|
|
|
|
$infos = $md->check();
|
|
|
|
$this->view->assign('dbconnected', $md->_connected);
|
|
$this->view->assign('dbinfos', is_array($infos) ? count($infos) : 0);
|
|
}
|
|
}
|