closes #39 (new directory structure)
6
.gitignore
vendored
|
@ -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
|
@ -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
|
@ -0,0 +1,2 @@
|
|||
Deny from all
|
||||
#Allow from localhost
|
1
backend/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/database.sqlite
|
|
@ -1,5 +0,0 @@
|
|||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteCond %{SCRIPT_FILENAME} !index.php$
|
||||
RewriteRule (.*) index.php/$1 [L]
|
||||
</IfModule>
|
|
@ -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
|
@ -0,0 +1,6 @@
|
|||
Allow from all
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteRule ^backend/(.*) backend.php/$1 [L]
|
||||
</IfModule>
|
|
@ -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();
|
Before Width: | Height: | Size: 733 B After Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 685 B |
Before Width: | Height: | Size: 349 B After Width: | Height: | Size: 349 B |
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 710 B |
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 526 B |
Before Width: | Height: | Size: 737 B After Width: | Height: | Size: 737 B |
Before Width: | Height: | Size: 736 B After Width: | Height: | Size: 736 B |
Before Width: | Height: | Size: 745 B After Width: | Height: | Size: 745 B |
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 720 B |
Before Width: | Height: | Size: 715 B After Width: | Height: | Size: 715 B |
Before Width: | Height: | Size: 894 B After Width: | Height: | Size: 894 B |
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 750 B |
Before Width: | Height: | Size: 537 B After Width: | Height: | Size: 537 B |
Before Width: | Height: | Size: 778 B After Width: | Height: | Size: 778 B |
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 620 B |
Before Width: | Height: | Size: 530 B After Width: | Height: | Size: 530 B |
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 670 B |
Before Width: | Height: | Size: 566 B After Width: | Height: | Size: 566 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 610 B After Width: | Height: | Size: 610 B |
Before Width: | Height: | Size: 692 B After Width: | Height: | Size: 692 B |
Before Width: | Height: | Size: 725 B After Width: | Height: | Size: 725 B |
Before Width: | Height: | Size: 708 B After Width: | Height: | Size: 708 B |
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 105 B |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 90 B |
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 129 B |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
@ -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/');
|
||||
|
||||
?>
|
|
@ -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));
|
||||
}
|
||||
|
||||
/*
|