closes #39 (new directory structure)

This commit is contained in:
Steffen Vogel 2010-12-27 16:06:03 +01:00
parent bcddbfa584
commit d5d782aebb
168 changed files with 61 additions and 61 deletions

6
.gitignore vendored
View File

@ -1,6 +1,6 @@
backend/volkszaehler.conf.php
share/sql/demo/pulses.dummy.copy
etc/volkszaehler.conf.php
misc/sql/demo/pulses.dummy.copy
.project
.buildpath
.settings/
backend/lib/vendor/*
lib/vendor/*

4
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "controller/ethersex"]
path = controller/ethersex
[submodule "misc/controller/ethersex"]
path = misc/controller/ethersex
url = git://github.com/volkszaehler/ethersex.git

2
.htaccess Normal file
View File

@ -0,0 +1,2 @@
Deny from all
#Allow from localhost

1
backend/.gitignore vendored
View File

@ -1 +0,0 @@
/database.sqlite

View File

@ -1,5 +0,0 @@
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !index.php$
RewriteRule (.*) index.php/$1 [L]
</IfModule>

View File

@ -29,15 +29,14 @@ use Volkszaehler\Util;
// TODO replace by state class
define('VZ_VERSION', 0.2);
define('VZ_DIR', realpath(__DIR__ . '/../..'));
define('VZ_BACKEND_DIR', VZ_DIR . '/backend');
// class autoloading
require_once VZ_BACKEND_DIR . '/lib/Util/ClassLoader.php';
require_once VZ_DIR . '/lib/Util/ClassLoader.php';
$classLoaders = array(
new Volkszaehler\Util\ClassLoader('Doctrine', VZ_BACKEND_DIR . '/lib/vendor/Doctrine'),
new Volkszaehler\Util\ClassLoader('Symfony', VZ_BACKEND_DIR . '/lib/vendor/Symfony'),
new Volkszaehler\Util\ClassLoader('Volkszaehler', VZ_BACKEND_DIR . '/lib')
new Volkszaehler\Util\ClassLoader('Doctrine', VZ_DIR . '/lib/vendor/Doctrine'),
new Volkszaehler\Util\ClassLoader('Symfony', VZ_DIR . '/lib/vendor/Symfony'),
new Volkszaehler\Util\ClassLoader('Volkszaehler', VZ_DIR . '/lib')
);
foreach ($classLoaders as $loader) {
@ -45,7 +44,7 @@ foreach ($classLoaders as $loader) {
}
// load configuration
Util\Configuration::load(VZ_BACKEND_DIR . '/volkszaehler.conf');
Util\Configuration::load(VZ_DIR . '/etc/volkszaehler.conf');
$em = Volkszaehler\Router::createEntityManager(TRUE); // get admin credentials

@ -1 +0,0 @@
Subproject commit df9cbb1f251f6aa609f127ab2109f4ea6933c1fe

6
htdocs/.htaccess Normal file
View File

@ -0,0 +1,6 @@
Allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^backend/(.*) backend.php/$1 [L]
</IfModule>

View File

@ -35,21 +35,20 @@ error_reporting(E_ALL | E_STRICT);
// TODO replace by state class
define('VZ_VERSION', 0.2);
define('VZ_DIR', realpath(__DIR__ . '/..'));
define('VZ_BACKEND_DIR', VZ_DIR . '/backend');
// class autoloading
require VZ_BACKEND_DIR . '/lib/Util/ClassLoader.php';
require VZ_DIR . '/lib/Util/ClassLoader.php';
$classLoaders = array(
new Util\ClassLoader('Volkszaehler', VZ_BACKEND_DIR . '/lib'),
new Util\ClassLoader('Doctrine', VZ_BACKEND_DIR . '/lib/vendor/Doctrine')
new Util\ClassLoader('Volkszaehler', VZ_DIR . '/lib'),
new Util\ClassLoader('Doctrine', VZ_DIR . '/lib/vendor/Doctrine')
);
foreach ($classLoaders as $loader) {
$loader->register(); // register on SPL autoload stack
}
Util\Configuration::load(VZ_BACKEND_DIR . '/volkszaehler.conf');
Util\Configuration::load(VZ_DIR . '/etc/volkszaehler.conf');
$r = new Router();
$r->run();

View File

Before

Width:  |  Height:  |  Size: 733 B

After

Width:  |  Height:  |  Size: 733 B

View File

Before

Width:  |  Height:  |  Size: 685 B

After

Width:  |  Height:  |  Size: 685 B

View File

Before

Width:  |  Height:  |  Size: 349 B

After

Width:  |  Height:  |  Size: 349 B

View File

Before

Width:  |  Height:  |  Size: 710 B

After

Width:  |  Height:  |  Size: 710 B

View File

Before

Width:  |  Height:  |  Size: 526 B

After

Width:  |  Height:  |  Size: 526 B

View File

Before

Width:  |  Height:  |  Size: 737 B

After

Width:  |  Height:  |  Size: 737 B

View File

Before

Width:  |  Height:  |  Size: 736 B

After

Width:  |  Height:  |  Size: 736 B

View File

Before

Width:  |  Height:  |  Size: 745 B

After

Width:  |  Height:  |  Size: 745 B

View File

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 720 B

View File

Before

Width:  |  Height:  |  Size: 715 B

After

Width:  |  Height:  |  Size: 715 B

View File

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 894 B

View File

Before

Width:  |  Height:  |  Size: 750 B

After

Width:  |  Height:  |  Size: 750 B

View File

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 537 B

View File

Before

Width:  |  Height:  |  Size: 778 B

After

Width:  |  Height:  |  Size: 778 B

View File

Before

Width:  |  Height:  |  Size: 343 B

After

Width:  |  Height:  |  Size: 343 B

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 620 B

After

Width:  |  Height:  |  Size: 620 B

View File

Before

Width:  |  Height:  |  Size: 530 B

After

Width:  |  Height:  |  Size: 530 B

View File

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 225 B

View File

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 670 B

View File

Before

Width:  |  Height:  |  Size: 566 B

After

Width:  |  Height:  |  Size: 566 B

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 610 B

After

Width:  |  Height:  |  Size: 610 B

View File

Before

Width:  |  Height:  |  Size: 692 B

After

Width:  |  Height:  |  Size: 692 B

View File

Before

Width:  |  Height:  |  Size: 725 B

After

Width:  |  Height:  |  Size: 725 B

View File

Before

Width:  |  Height:  |  Size: 708 B

After

Width:  |  Height:  |  Size: 708 B

View File

@ -24,6 +24,8 @@
* along with volkszaehler.org. If not, see <http://www.gnu.org/licenses/>.
*/
// TODO check for requirements (Javascript etc)
header('Location: ' . ((isset($_SERVER['HTTPS'])) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']) . '/frontend/');
?>

View File

@ -105,7 +105,7 @@ abstract class Definition {
}
public static function getJSON() {
return Util\JSON::decode(file_get_contents(VZ_BACKEND_DIR . static::FILE));
return Util\JSON::decode(file_get_contents(VZ_DIR . static::FILE));
}
/*

Some files were not shown because too many files have changed in this diff Show More