Ver Fonte

Add index.php.dist

See https://github.com/picocms/Pico/issues/285#issuecomment-160130798
Daniel Rudolf há 9 anos atrás
pai
commit
2535df7cfe
3 ficheiros alterados com 22 adições e 7 exclusões
  1. 1 0
      .travis.yml
  2. 1 7
      index.php
  3. 20 0
      index.php.dist

+ 1 - 0
.travis.yml

@@ -29,6 +29,7 @@ before_deploy:
   - deploy-phpdoc-release.sh
   - composer install --no-dev --optimize-autoloader
   - find vendor/ -type d -path 'vendor/*/*/.git' -print0 | xargs -0 rm -rf
+  - mv index.php.dist index.php
   - tar -czf "pico-release-$TRAVIS_TAG.tar.gz" README.md LICENSE CONTRIBUTING.md CHANGELOG.md composer.json composer.lock config content-sample lib plugins themes vendor .htaccess index.php
 
 deploy:

+ 1 - 7
index.php

@@ -1,10 +1,4 @@
-<?php
-// @codingStandardsIgnoreFile
-
-// check PHP version
-if (version_compare(PHP_VERSION, '5.3.6', '<')) {
-    die('Sorry, Pico requires PHP 5.3.6 or above to run!');
-}
+<?php // @codingStandardsIgnoreFile
 
 // load dependencies
 if(is_file(__DIR__ . '/vendor/autoload.php')) {

+ 20 - 0
index.php.dist

@@ -0,0 +1,20 @@
+<?php
+
+// check PHP version
+if (version_compare(PHP_VERSION, '5.3.6', '<')) {
+    die('Pico requires PHP 5.3.6 or above to run');
+}
+
+// load dependencies
+require_once(__DIR__ . '/vendor/autoload.php');
+
+// instance Pico
+$pico = new Pico(
+    __DIR__,    // root dir
+    'config/',  // config dir
+    'plugins/', // plugins dir
+    'themes/'   // themes dir
+);
+
+// run application
+echo $pico->run();