diff --git a/.bowerrc b/.bowerrc
index 80a0422f2..7b707d10a 100644
--- a/.bowerrc
+++ b/.bowerrc
@@ -1,4 +1,5 @@
{
+ "directory": "public/bower_components",
"scripts": {
"postinstall": "grunt default genlicense",
"postuninstall": "grunt default genlicense"
diff --git a/.gitignore b/.gitignore
index 0b17ff268..ed59cec7c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
node_modules
-bower_components
-tmp
+public/bower_components
+tmp/
application/config/email.php
application/config/database.php
*.patch
@@ -19,4 +19,5 @@ git-svn-diff.py
*.~
*.log
application/sessions/*
-license/.licenses
+public/license/.licenses
+vendor/mikey179
diff --git a/Dockerfile b/Dockerfile
index 709ef980e..fe671a15c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -11,7 +11,7 @@ RUN echo "date.timezone = \"UTC\"" > /usr/local/etc/php/conf.d/timezone.ini
WORKDIR /app
COPY . /app
-RUN ln -s /app/* /var/www/html
+RUN rm -rf /var/www && ln -s /app/*[^public] /var/www && ln -nsf /app/public /var/www/html
RUN cp application/config/database.php.tmpl application/config/database.php && \
sed -i -e "s/\(localhost\)/web/g" test/ospos.js && \
diff --git a/Gruntfile.js b/Gruntfile.js
index 8b0ca7898..c3e2acb23 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -37,10 +37,29 @@ module.exports = function(grunt) {
},
targetdist: {
options: {
- destPrefix: 'dist'
+ destPrefix: 'public/dist'
},
files: {
- 'jquery-ui.css': 'jquery-ui/themes/base/jquery-ui.css'
+ 'login.css': '../../css/login.css',
+ 'style.css': '../../css/style.css',
+ 'invoice_email.css': '../../css/invoice_email.css',
+ 'barcode_font.css': '../../css/barcode_font.css',
+ 'jquery-ui.css': 'jquery-ui/themes/base/jquery-ui.css',
+ 'bootswatch/cerulean/bootstrap.min.css': 'bootswatch/cerulean/bootstrap.min.css',
+ 'bootswatch/cosmo/bootstrap.min.css': 'bootswatch/cosmo/bootstrap.min.css',
+ 'bootswatch/cyborg/bootstrap.min.css': 'bootswatch/cyborg/bootstrap.min.css',
+ 'bootswatch/darkly/bootstrap.min.css': 'bootswatch/darkly/bootstrap.min.css',
+ 'bootswatch/flatly/bootstrap.min.css': 'bootswatch/flatly/bootstrap.min.css',
+ 'bootswatch/journal/bootstrap.min.css': 'bootswatch/journal/bootstrap.min.css',
+ 'bootswatch/paper/bootstrap.min.css': 'bootswatch/paper/bootstrap.min.css',
+ 'bootswatch/readable/bootstrap.min.css': 'bootswatch/readable/bootstrap.min.css',
+ 'bootswatch/sandstone/bootstrap.min.css': 'bootswatch/sandstone/bootstrap.min.css',
+ 'bootswatch/slate/bootstrap.min.css': 'bootswatch/slate/bootstrap.min.css',
+ 'bootswatch/spacelab/bootstrap.min.css': 'bootswatch/spacelab/bootstrap.min.css',
+ 'bootswatch/superhero/bootstrap.min.css': 'bootswatch/superhero/bootstrap.min.css',
+ 'bootswatch/united/bootstrap.min.css': 'bootswatch/united/bootstrap.min.css',
+ 'bootswatch/yeti/bootstrap.min.css': 'bootswatch/yeti/bootstrap.min.css',
+ 'bootswatch/fonts': 'bootswatch/fonts'
}
},
targetdistbootswatch: {
@@ -70,7 +89,7 @@ module.exports = function(grunt) {
cssmin: {
target: {
files: {
- 'dist/<%= pkg.name %>.min.css': ['tmp/opensourcepos_bower.css', 'css/*.css', '!css/login.css', '!css/invoice_email.css', '!css/barcode_font.css', '!css/style.css']
+ 'public/dist/<%= pkg.name %>.min.css': ['tmp/opensourcepos_bower.css', 'css/*.css', '!css/login.css', '!css/invoice_email.css', '!css/barcode_font.css', '!css/style.css']
}
}
},
@@ -80,7 +99,7 @@ module.exports = function(grunt) {
separator: ';'
},
files: {
- 'dist/<%= pkg.name %>.js': ['tmp/opensourcepos_bower.js', 'js/jquery*', 'js/*.js']
+ 'tmp/<%= pkg.name %>.js': ['tmp/opensourcepos_bower.js', 'js/jquery*', 'js/*.js']
}
},
sql: {
@@ -99,7 +118,7 @@ module.exports = function(grunt) {
},
dist: {
files: {
- 'dist/<%= pkg.name %>.min.js': ['dist/<%= pkg.name %>.js']
+ 'public/dist/<%= pkg.name %>.min.js': ['tmp/<%= pkg.name %>.js']
}
}
},
@@ -121,7 +140,7 @@ module.exports = function(grunt) {
scriptTemplate: '',
openTag: '',
closeTag: '',
- absolutePath: true
+ ignorePath: '../../../'
},
src: ['css/*.css', '!css/login.css', '!css/invoice_email.css', '!css/barcode_font.css'],
dest: 'application/views/partial/header.php',
@@ -131,9 +150,9 @@ module.exports = function(grunt) {
scriptTemplate: '',
openTag: '',
closeTag: '',
- absolutePath: true
+ ignorePath: '../../../public/'
},
- src: ['dist/*.css', '!dist/login.css', '!dist/invoice_email.css', '!dist/barcode_font.css'],
+ src: ['public/dist/*.css', '!public/dist/login.css', '!public/dist/invoice_email.css', '!public/dist/barcode_font.css'],
dest: 'application/views/partial/header.php',
},
css_login: {
@@ -141,9 +160,9 @@ module.exports = function(grunt) {
scriptTemplate: '',
openTag: '',
closeTag: '',
- absolutePath: true
+ ignorePath: '../../public/'
},
- src: ['dist/login.css'],
+ src: ['public/dist/login.css'],
dest: 'application/views/login.php'
},
js: {
@@ -151,7 +170,7 @@ module.exports = function(grunt) {
scriptTemplate: '',
openTag: '',
closeTag: '',
- absolutePath: true
+ ignorePath: '../../../'
},
src: ['js/jquery*', 'js/*.js'],
dest: 'application/views/partial/header.php'
@@ -161,9 +180,9 @@ module.exports = function(grunt) {
scriptTemplate: '',
openTag: '',
closeTag: '',
- absolutePath: true
+ ignorePath: '../../../public/'
},
- src: ['dist/*min.js'],
+ src: ['public/dist/*min.js'],
dest: 'application/views/partial/header.php'
}
},
@@ -187,8 +206,8 @@ module.exports = function(grunt) {
dev: {
options: {
match: [ {
- 'opensourcepos.min.js': 'dist/opensourcepos.min.js',
- 'opensourcepos.min.css': 'dist/opensourcepos.min.css'
+ 'opensourcepos.min.js': 'public/dist/opensourcepos.min.js',
+ 'opensourcepos.min.css': 'public/dist/opensourcepos.min.css'
} ],
replacement: 'md5'
},
@@ -202,8 +221,8 @@ module.exports = function(grunt) {
// Target-specific file lists and/or options go here.
options: {
// Target-specific options go here.
- directory: 'bower_components',
- output: 'license/LICENSES'
+ directory: 'public/bower_components',
+ output: 'publiclicense/LICENSES'
},
},
},
diff --git a/application/config/config.php b/application/config/config.php
index 840336996..eaefb1c35 100644
--- a/application/config/config.php
+++ b/application/config/config.php
@@ -1,43 +1,4 @@
-load(strtr($file, '', '_lang.php'));
+ $this->load(strtr($file, '', '_lang.php'));
}
}
}
diff --git a/application/hooks/load_config.php b/application/hooks/load_config.php
index e13d0dc1d..2e32b5222 100644
--- a/application/hooks/load_config.php
+++ b/application/hooks/load_config.php
@@ -23,7 +23,7 @@ function load_config()
$CI->config->set_item('language', $language);
- $map = directory_map('./application/language/' . $language);
+ $map = directory_map('../application/language/' . $language);
foreach($map as $file)
{
if(!is_array($file) && substr(strrchr($file,'.'), 1) == "php")
diff --git a/system/language/ar-EG/calendar_lang.php b/application/language/arabic/calendar_lang.php
similarity index 100%
rename from system/language/ar-EG/calendar_lang.php
rename to application/language/arabic/calendar_lang.php
diff --git a/system/language/ar-EG/date_lang.php b/application/language/arabic/date_lang.php
similarity index 100%
rename from system/language/ar-EG/date_lang.php
rename to application/language/arabic/date_lang.php
diff --git a/system/language/ar-EG/db_lang.php b/application/language/arabic/db_lang.php
similarity index 100%
rename from system/language/ar-EG/db_lang.php
rename to application/language/arabic/db_lang.php
diff --git a/system/language/ar-EG/email_lang.php b/application/language/arabic/email_lang.php
similarity index 100%
rename from system/language/ar-EG/email_lang.php
rename to application/language/arabic/email_lang.php
diff --git a/system/language/ar-EG/form_validation_lang.php b/application/language/arabic/form_validation_lang.php
similarity index 100%
rename from system/language/ar-EG/form_validation_lang.php
rename to application/language/arabic/form_validation_lang.php
diff --git a/system/language/ar-EG/ftp_lang.php b/application/language/arabic/ftp_lang.php
similarity index 100%
rename from system/language/ar-EG/ftp_lang.php
rename to application/language/arabic/ftp_lang.php
diff --git a/system/language/ar-EG/imglib_lang.php b/application/language/arabic/imglib_lang.php
similarity index 100%
rename from system/language/ar-EG/imglib_lang.php
rename to application/language/arabic/imglib_lang.php
diff --git a/system/core/compat/index.html b/application/language/arabic/index.html
similarity index 100%
rename from system/core/compat/index.html
rename to application/language/arabic/index.html
diff --git a/system/language/ar-EG/migration_lang.php b/application/language/arabic/migration_lang.php
similarity index 100%
rename from system/language/ar-EG/migration_lang.php
rename to application/language/arabic/migration_lang.php
diff --git a/system/language/ar-EG/number_lang.php b/application/language/arabic/number_lang.php
similarity index 100%
rename from system/language/ar-EG/number_lang.php
rename to application/language/arabic/number_lang.php
diff --git a/system/language/ar-EG/pagination_lang.php b/application/language/arabic/pagination_lang.php
similarity index 100%
rename from system/language/ar-EG/pagination_lang.php
rename to application/language/arabic/pagination_lang.php
diff --git a/system/language/ar-EG/profiler_lang.php b/application/language/arabic/profiler_lang.php
similarity index 100%
rename from system/language/ar-EG/profiler_lang.php
rename to application/language/arabic/profiler_lang.php
diff --git a/system/language/ar-EG/unit_test_lang.php b/application/language/arabic/unit_test_lang.php
similarity index 100%
rename from system/language/ar-EG/unit_test_lang.php
rename to application/language/arabic/unit_test_lang.php
diff --git a/system/language/ar-EG/upload_lang.php b/application/language/arabic/upload_lang.php
similarity index 100%
rename from system/language/ar-EG/upload_lang.php
rename to application/language/arabic/upload_lang.php
diff --git a/application/language/armenian/calendar_lang.php b/application/language/armenian/calendar_lang.php
new file mode 100644
index 000000000..dc51823dc
--- /dev/null
+++ b/application/language/armenian/calendar_lang.php
@@ -0,0 +1,56 @@
+
+
+ 403 Forbidden
+
+
+
+Directory access is forbidden.
+
+
+