Quellcode durchsuchen

Add new file structure see #7522

Julio Montoya vor 10 Jahren
Ursprung
Commit
9438dbdd6c

+ 88 - 0
app/AppKernel.php

@@ -0,0 +1,88 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+/**
+ * Class AppKernel
+ */
+class AppKernel
+{
+    protected $rootDir;
+
+    /**
+     * @return string
+     */
+    public function getRootDir()
+    {
+        if (null === $this->rootDir) {
+            $r = new \ReflectionObject($this);
+            $this->rootDir = str_replace('\\', '/', dirname($r->getFileName()));
+        }
+
+        return $this->rootDir;
+    }
+
+    /*public function getCacheDir()
+    {
+        return dirname(dirname(__DIR__)).'/cache/'.$this->environment;
+    }
+
+    public function getLogDir()
+    {
+        return dirname(dirname(__DIR__)).'/log/';
+    }*/
+
+    /*public function getLogDir()
+    {
+        return $this->rootDir.'/../logs/'.$this->environment.'/logs/';
+    }
+
+    public function getCacheDir()
+    {
+        return $this->rootDir.'/../data/temp/'.$this->environment.'/cache/';
+    }*/
+
+    // Custom paths
+
+    /**
+     * Returns the real root path
+     * @return string
+     */
+    public function getRealRootDir()
+    {
+        return realpath($this->getRootDir().'/../').'/';
+    }
+
+    /**
+     * Returns the data path
+     * @return string
+     */
+    public function getDataDir()
+    {
+        return $this->getRealRootDir().'data/';
+    }
+
+    /**
+     * @return string
+     */
+    public function getAppDir()
+    {
+        return $this->getRealRootDir().'app/';
+    }
+
+    /**
+     * @return string
+     */
+    public function getConfigDir()
+    {
+        return $this->getRealRootDir().'app/config/';
+    }
+
+    /**
+     * @return string
+     */
+    public function getConfigurationFile()
+    {
+        return $this->getRealRootDir().'app/config/configuration.php';
+    }
+}
+

+ 0 - 0
app/cache/.gitkeep


+ 3 - 3
main/inc/conf/add_course.conf.dist.php → app/config/add_course.conf.dist.php

@@ -7,6 +7,6 @@
  *	@package chamilo.configuration
  */
 
-$firstExpirationDelay			= 31536000; // <- 86400*365    // 60*60*24 = 1 jour = 86400
-$prefixAntiNumber				= 'z';
-$DEBUG							= false;
+$firstExpirationDelay = 31536000; // <- 86400*365    // 60*60*24 = 1 jour = 86400
+$prefixAntiNumber = 'z';
+$DEBUG = false;

+ 0 - 0
main/inc/conf/auth.conf.dist.php → app/config/auth.conf.dist.php


+ 9 - 9
main/inc/conf/course_info.conf.dist.php → app/config/course_info.conf.dist.php

@@ -29,15 +29,15 @@ $canBeEmpty['department_name']		= true;
 $canBeEmpty['department_url']		= true;
 */
 
-$showDiskQuota						= true;
+$showDiskQuota = true;
 //$showDiskUse						= true;
 //$showLinkToChangeDiskQuota		= true;
-$showExpirationDate 				= true;
-$showCreationDate 					= true;
-$showLastEdit 						= true;
-$showLastVisit 						= true;
-$canReportExpirationDate			= true; // Needs to be true
-											// if ScriptToReportExpirationDate
-											// is not automaticly called
+$showExpirationDate = true;
+$showCreationDate = true;
+$showLastEdit = true;
+$showLastVisit = true;
+$canReportExpirationDate = true; // Needs to be true
+// if ScriptToReportExpirationDate
+// is not automaticly called
 //$linkToChangeDiskQuota			= 'changeQuota.php';
-$urlScriptToReportExpirationDate	= 'postpone.php'; // external script to postpone the expiration of course.
+$urlScriptToReportExpirationDate = 'postpone.php'; // external script to postpone the expiration of course.

+ 0 - 0
main/inc/conf/events.conf.dist.php → app/config/events.conf.dist.php


+ 19 - 0
app/config/mail.conf.dist.php

@@ -0,0 +1,19 @@
+<?php
+
+/**
+ *	This file holds the configuration settings
+ *	for phpmailer Class.
+ *
+ *	@package chamilo.configuration
+ */
+
+$platform_email['SMTP_FROM_EMAIL'] = (isset($administrator['email']) ? $administrator['email'] : 'admin@example.com');
+$platform_email['SMTP_FROM_NAME'] = (isset($administrator['name']) ? $administrator['name'] : 'Admin');
+$platform_email['SMTP_HOST'] = 'localhost';
+$platform_email['SMTP_PORT'] = 25;
+$platform_email['SMTP_MAILER'] = IS_WINDOWS_OS ? 'smtp' : 'mail'; // mail, sendmail or smtp
+$platform_email['SMTP_AUTH'] = 0;
+$platform_email['SMTP_USER'] = '';
+$platform_email['SMTP_PASS'] = '';
+$platform_email['SMTP_CHARSET'] = api_get_system_encoding();
+$platform_email['SMTP_UNIQUE_SENDER'] = 0; // to send all mails from the same user

+ 0 - 0
main/inc/conf/portfolio.conf.dist.php → app/config/portfolio.conf.dist.php


+ 0 - 0
main/inc/conf/profile.conf.dist.php → app/config/profile.conf.dist.php


+ 0 - 0
app/courses/.gitkeep


+ 0 - 0
app/home/.gitkeep


+ 0 - 0
app/logs/.gitkeep


+ 0 - 0
app/upload/courses/.gitkeep


+ 0 - 0
app/upload/sessions/.gitkeep


+ 0 - 0
app/upload/users/.gitkeep


+ 0 - 19
main/inc/conf/mail.conf.dist.php

@@ -1,19 +0,0 @@
-<?php
-
-/**
- *	This file holds the configuration settings
- *	for phpmailer Class.
- *
- *	@package chamilo.configuration
- */
-
-$platform_email['SMTP_FROM_EMAIL']   = (isset($administrator['email'])?$administrator['email']:'admin@example.com');
-$platform_email['SMTP_FROM_NAME']    = (isset($administrator['name'])?$administrator['name']:'Admin');
-$platform_email['SMTP_HOST']         = 'localhost';
-$platform_email['SMTP_PORT']         = 25;
-$platform_email['SMTP_MAILER']       = IS_WINDOWS_OS ? 'smtp' : 'mail'; // mail, sendmail or smtp
-$platform_email['SMTP_AUTH']         = 0;
-$platform_email['SMTP_USER']         = '';
-$platform_email['SMTP_PASS']         = '';
-$platform_email['SMTP_CHARSET']      = api_get_system_encoding();
-$platform_email['SMTP_UNIQUE_SENDER']= 0; // to send all mails from the same user