Ver código fonte

Move constants to global.php

Daniel Rudolf 10 anos atrás
pai
commit
284e0ce7de
2 arquivos alterados com 14 adições e 13 exclusões
  1. 13 0
      global.php
  2. 1 13
      index.php

+ 13 - 0
global.php

@@ -0,0 +1,13 @@
+<?php
+define('HTTPDOCS', realpath(rtrim(__DIR__, '/')) . '/');
+define('ROOT_DIR', realpath(HTTPDOCS . '../httpdocs-includes') . '/');
+
+define('LIB_DIR', ROOT_DIR . 'lib/');
+define('VENDOR_DIR', ROOT_DIR . 'vendor/');
+define('PLUGINS_DIR', ROOT_DIR . 'plugins/');
+define('THEMES_DIR', HTTPDOCS . 'themes/');
+define('CONFIG_DIR', ROOT_DIR . 'config/');
+define('CACHE_DIR', LIB_DIR . 'cache/');
+
+require_once(VENDOR_DIR . 'autoload.php');
+

+ 1 - 13
index.php

@@ -1,15 +1,3 @@
 <?php
 <?php
-
-define('ROOT_DIR', realpath(dirname(__FILE__)) . '/');
-define('LIB_DIR', ROOT_DIR . 'lib/');
-define('VENDOR_DIR', ROOT_DIR . 'vendor/');
-define('PLUGINS_DIR', ROOT_DIR . 'plugins/');
-define('THEMES_DIR', ROOT_DIR . 'themes/');
-define('CONFIG_DIR', ROOT_DIR . 'config/');
-define('CACHE_DIR', LIB_DIR . 'cache/');
-
-define('CONTENT_EXT', '.md');
-
-require_once(VENDOR_DIR . 'autoload.php');
-require_once(LIB_DIR . 'pico.php');
+require_once(__DIR__ . '/global.php');
 $pico = new Pico();
 $pico = new Pico();