diff --git a/app/AppKernel.php b/app/AppKernel.php new file mode 100644 index 0000000000..f488dd9e6d --- /dev/null +++ b/app/AppKernel.php @@ -0,0 +1,88 @@ +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'; + } +} + diff --git a/app/cache/.gitkeep b/app/cache/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/main/inc/conf/add_course.conf.dist.php b/app/config/add_course.conf.dist.php old mode 100755 new mode 100644 similarity index 51% rename from main/inc/conf/add_course.conf.dist.php rename to app/config/add_course.conf.dist.php index 9bbf9544c9..1cfa7fd7ec --- a/main/inc/conf/add_course.conf.dist.php +++ b/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; diff --git a/main/inc/conf/auth.conf.dist.php b/app/config/auth.conf.dist.php old mode 100755 new mode 100644 similarity index 100% rename from main/inc/conf/auth.conf.dist.php rename to app/config/auth.conf.dist.php diff --git a/main/inc/conf/course_info.conf.dist.php b/app/config/course_info.conf.dist.php old mode 100755 new mode 100644 similarity index 74% rename from main/inc/conf/course_info.conf.dist.php rename to app/config/course_info.conf.dist.php index 4719a993a1..c378f04a18 --- a/main/inc/conf/course_info.conf.dist.php +++ b/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. diff --git a/main/inc/conf/events.conf.dist.php b/app/config/events.conf.dist.php old mode 100755 new mode 100644 similarity index 100% rename from main/inc/conf/events.conf.dist.php rename to app/config/events.conf.dist.php diff --git a/app/config/mail.conf.dist.php b/app/config/mail.conf.dist.php new file mode 100644 index 0000000000..8b6c4caaa1 --- /dev/null +++ b/app/config/mail.conf.dist.php @@ -0,0 +1,19 @@ +