Пример #1
0
 public function getValue()
 {
     if (!$this->value && $this->uploadedFile()) {
         $this->value = \Meta\FileSystem::generateFileName($_FILES[$this->altName()]['name']);
     }
     return parent::getValue();
 }
Пример #2
0
 public function getFullPath()
 {
     return \Meta\FileSystem::getFilesPath() . '/' . $this->name;
 }
Пример #3
0
 public static function init()
 {
     if (!is_writable(\Meta\FileSystem::getFilesPath())) {
         \Meta\Flash::warning(t('The file system directory is not writable. To set permission, type: <b>chmod 777 ' . \Meta\FileSystem::getFilesPath() . ' -R</b>'));
     }
 }
Пример #4
0
<?php

error_reporting(E_ALL);
date_default_timezone_set('UTC');
// session
if (!session_id()) {
    session_start();
}
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/src/core.php';
\Meta\Installer::checkConfiguration();
// check configuration file
require __DIR__ . '/app/config.php';
\Meta\Installer::checkDbTables();
// check if initial database has installed
require __DIR__ . '/sql/migrations.php';
// load db migrations & init scripts
\Meta\DbMigration::execute(new \migrations());
\Meta\FileSystem::init();
// load page definitions
require_once __DIR__ . '/app/pages.php';
// routing dispatcher
if (!\Meta\Route::get()->dispatch()) {
    echo new \Meta\Page\NotFound();
}