mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-30 12:18:43 +09:00
Merge pull request #486 from BelleNottelling/prefix
This commit is contained in:
1485 files changed
+481
-438
No files matched your search
+6
-6
@@ -2,13 +2,13 @@ tests/CI:
|
||||
- tests/*
|
||||
|
||||
front-end:
|
||||
- src/bb-themes/*
|
||||
- src/themes/*
|
||||
|
||||
admin-panel:
|
||||
- src/bb-themes/admin_*
|
||||
- src/themes/admin_*
|
||||
|
||||
huraga:
|
||||
- src/bb-themes/huraga/*
|
||||
- src/themes/huraga/*
|
||||
|
||||
composer:
|
||||
- src/composer.json
|
||||
@@ -19,16 +19,16 @@ installer:
|
||||
- bin/install.sh
|
||||
|
||||
payments:
|
||||
- src/bb-library/Payment*
|
||||
- src/library/Payment*
|
||||
|
||||
server-manager:
|
||||
- src/bb-library/Server*
|
||||
- src/library/Server*
|
||||
|
||||
github-config:
|
||||
- .github/*
|
||||
|
||||
hosting:
|
||||
- src/bb-library/Server/Manager/*
|
||||
- src/library/Server/Manager/*
|
||||
|
||||
docker:
|
||||
- docker-compose.yaml
|
||||
|
||||
@@ -45,8 +45,8 @@ jobs:
|
||||
|
||||
- name: Create temporary directories and files
|
||||
run: |
|
||||
mkdir -p ./src/bb-data/{cache,log,uploads}
|
||||
touch ./src/bb-data/{cache,log,uploads}/index.html
|
||||
mkdir -p ./src/data/{cache,log,uploads}
|
||||
touch ./src/data/{cache,log,uploads}/index.html
|
||||
mkdir -p ./build/{code-browser,code-coverage,logs,pdepend,update,distribution,source}
|
||||
|
||||
- name: Build assets
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
run: |
|
||||
sed s/0.0.1/${GITHUB_SHA::7}/ Version.php > Version2.php
|
||||
mv Version2.php Version.php
|
||||
working-directory: ./build/source/bb-library/Box
|
||||
working-directory: ./build/source/library/Box
|
||||
|
||||
- name: Create the final archive
|
||||
run: zip -r ./FOSSBilling-preview.zip .
|
||||
|
||||
+10
-10
@@ -50,18 +50,18 @@ jobs:
|
||||
working-directory: ./src
|
||||
- name: Configure environment for Tests
|
||||
run: |
|
||||
cp ./src/bb-config-sample.php ./src/bb-config.php
|
||||
mkdir -p ./src/bb-data/cache
|
||||
mkdir -p ./src/bb-data/log
|
||||
echo > ./src/bb-data/log/license.log
|
||||
echo > ./src/bb-data/log/application.log
|
||||
echo > ./src/bb-data/log/php_error.log
|
||||
cp ./src/config-sample.php ./src/config.php
|
||||
mkdir -p ./src/data/cache
|
||||
mkdir -p ./src/data/log
|
||||
echo > ./src/data/log/license.log
|
||||
echo > ./src/data/log/application.log
|
||||
echo > ./src/data/log/php_error.log
|
||||
rm -rf ./src/install
|
||||
|
||||
- name: Run test suite for bb-modules
|
||||
- name: Run test suite for modules
|
||||
run: |
|
||||
php ./src/vendor/bin/phpunit ./tests/bb-modules/
|
||||
php ./src/vendor/bin/phpunit ./tests/modules/
|
||||
|
||||
- name: Run test suite for bb-library
|
||||
- name: Run test suite for library
|
||||
run: |
|
||||
php ./src/vendor/bin/phpunit ./tests/bb-library/
|
||||
php ./src/vendor/bin/phpunit ./tests/library/
|
||||
+4
-4
@@ -6,10 +6,10 @@
|
||||
tmp
|
||||
src/.htaccess
|
||||
src/bb-config*
|
||||
!src/bb-config-sample.php
|
||||
src/bb-data/log/*
|
||||
src/bb-data/cache/*
|
||||
src/bb-data/tmp.txt
|
||||
!src/config-sample.php
|
||||
src/data/log/*
|
||||
src/data/cache/*
|
||||
src/data/tmp.txt
|
||||
src/bb-test.php
|
||||
src/vendor*
|
||||
src/install/logs/*
|
||||
|
||||
@@ -45,20 +45,20 @@ return (new PhpCsFixer\Config())
|
||||
(new PhpCsFixer\Finder())
|
||||
->in(__DIR__ . '/src')
|
||||
->exclude([
|
||||
'bb-data',
|
||||
'bb-library',
|
||||
'bb-locale',
|
||||
'bb-themes',
|
||||
'data',
|
||||
'library',
|
||||
'locale',
|
||||
'themes',
|
||||
'vendor',
|
||||
'install',
|
||||
'bb-modules/Wysiwyg',
|
||||
'bb-modules/Servicecentovacast',
|
||||
'bb-modules/Servicesolusvm',
|
||||
'bb-modules/Spamchecker'
|
||||
'modules/Wysiwyg',
|
||||
'modules/Servicecentovacast',
|
||||
'modules/Servicesolusvm',
|
||||
'modules/Spamchecker'
|
||||
])
|
||||
->notPath(
|
||||
'rb.php',
|
||||
'bb-config-sample.php'
|
||||
'config-sample.php'
|
||||
)
|
||||
)
|
||||
;
|
||||
+4
-4
@@ -4,7 +4,7 @@ Master
|
||||
**General:**
|
||||
* Refactoring admin template with Tabler.io
|
||||
* Templates extensions .phtml renamed to .html.twig
|
||||
* Updated bb-themes/bootstrap to Bootstrap 5
|
||||
* Updated themes/bootstrap to Bootstrap 5
|
||||
|
||||
Release 4.22-beta.1.1
|
||||
------------------------------------------------------------------------------
|
||||
@@ -308,7 +308,7 @@ Release 2.9.10 (2012-09-10)
|
||||
|
||||
* Search clients by company name in clients listing page
|
||||
* Ability to define staff member permissions
|
||||
* New parameter in bb-config.php file BB_LOCALE_TIME_FORMAT - to define localized time format
|
||||
* New parameter in config.php file BB_LOCALE_TIME_FORMAT - to define localized time format
|
||||
* Add: New filter to display translatable date with time: bb_datetime
|
||||
* Update: Search clients by company name in clients listing page
|
||||
* Fix: Use PDO::MYSQL_ATTR_USE_BUFFERED_QUERY for PDO connection
|
||||
@@ -395,7 +395,7 @@ Release 2.6.17 (2012-06-17)
|
||||
* Ability to preview email templates. Old email templates are deprecated.
|
||||
* Ability to place new order for clients from admin area
|
||||
* Ability to change currency price format
|
||||
* Deprecated bb-library/Hook bindings. Now event hooks are binded from modules Service.php class
|
||||
* Deprecated library/Hook bindings. Now event hooks are binded from modules Service.php class
|
||||
* php mcrypt extension is now mandatory
|
||||
* Email settings are now stored in encrypted format
|
||||
* Added ability to reset email template to default
|
||||
@@ -446,7 +446,7 @@ Release v2.4.30 (2012-04-30)
|
||||
* https links updates
|
||||
* https://github.com/boxbilling/BoxBilling/issues/115 fix
|
||||
* Password issue fix: https://github.com/boxbilling/BoxBilling/issues/114
|
||||
* Including http://redbeanphp.com/ ORM in bb-library/rb.php For extensions as a helper
|
||||
* Including http://redbeanphp.com/ ORM in library/rb.php For extensions as a helper
|
||||
* Simplified nginx server support. Routing includes only 2 simple rules
|
||||
* Adding new core module mod_api. Api is now accessible from yourdomain.com/api/role/module/method. bb-api is deprecated and will be removed in 2.6 version
|
||||
* Gravatar url uses ssl if BoxBilling is on https
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ In the meantime, the /main branch is being maintained with bug fixes, security u
|
||||
|
||||
### Understanding the structure of FOSSBilling
|
||||
|
||||
FOSSBilling is an open-source project — it's made up of over [50 modules](https://github.com/FOSSBilling/FOSSBilling/tree/master/src/bb-modules). When you initially consider contributing to FOSSBilling, you might be unsure about which of those 50 modules implements the functionality you want to change or report a bug for. This section should help you with that.
|
||||
FOSSBilling is an open-source project — it's made up of over [50 modules](https://github.com/FOSSBilling/FOSSBilling/tree/master/src/modules). When you initially consider contributing to FOSSBilling, you might be unsure about which of those 50 modules implements the functionality you want to change or report a bug for. This section should help you with that.
|
||||
|
||||
There are 2 types of modules:
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ exec-php: ## Enter PHP container shell
|
||||
$(DOCKER_PHP_CONTAINER_EXEC) bash
|
||||
|
||||
cache-flush: ## Flush Twig cache
|
||||
$(DOCKER_PHP_CONTAINER_EXEC) rm -fr src/bb-data/cache/*
|
||||
$(DOCKER_PHP_CONTAINER_EXEC) rm -fr src/data/cache/*
|
||||
|
||||
exec-db: ## Enter DB container shell
|
||||
$(DOCKER_DB_CONTAINER_EXEC) bash
|
||||
@@ -48,16 +48,16 @@ install: start ## Install app after start
|
||||
rm -rf ./src/install
|
||||
|
||||
reinstall: ## Reinstall app
|
||||
rm -rf ./src/bb-config.php
|
||||
rm -rf ./src/config.php
|
||||
make install
|
||||
|
||||
test: start ## Run app tests
|
||||
echo "Running unit tests"
|
||||
echo > ./src/bb-data/log/application.log
|
||||
echo > ./src/bb-data/log/php_error.log
|
||||
echo > ./src/data/log/application.log
|
||||
echo > ./src/data/log/php_error.log
|
||||
rm -rf src/install
|
||||
docker run --rm --interactive --tty --volume $(PWD):/app composer install --working-dir=src --no-progress --no-suggest --prefer-dist
|
||||
$(DOCKER_PHP_CONTAINER_EXEC) ./src/vendor/bin/phpunit --dont-report-useless-tests ./tests/bb-modules/
|
||||
$(DOCKER_PHP_CONTAINER_EXEC) ./src/vendor/bin/phpunit --dont-report-useless-tests ./tests/modules/
|
||||
|
||||
build: ## Build App with Docker CI image
|
||||
docker run --rm \
|
||||
|
||||
@@ -85,8 +85,8 @@ You can either download the .tar file to your local computer and then upload it
|
||||
|
||||
Your web directory's structure should now look like this:
|
||||
- htdocs
|
||||
- bb-data
|
||||
- bb-library
|
||||
- data
|
||||
- library
|
||||
- bb-module
|
||||
- **...**
|
||||
|
||||
@@ -101,8 +101,8 @@ You can either download the .zip file to your local computer and then upload it
|
||||
|
||||
Your web directory's structure should now look like this:
|
||||
- htdocs
|
||||
- bb-data
|
||||
- bb-library
|
||||
- data
|
||||
- library
|
||||
- bb-module
|
||||
- **...**
|
||||
|
||||
@@ -145,7 +145,7 @@ $ cd fossbilling
|
||||
|
||||
# If you would like to run Dockerized FOSSBilling on a different port,
|
||||
# Please note that FOSSBilling won't support SSL unless you use a proxy in front of it!
|
||||
# In that case, make sure to update ./src/bb-config.php and replace http://localhost/ with https://domain.com/
|
||||
# In that case, make sure to update ./src/config.php and replace http://localhost/ with https://domain.com/
|
||||
# Also update docker-compose.yaml - line 9
|
||||
# -3000:80 (For example, map port 80 to the port 3000)
|
||||
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
require_once dirname(__FILE__) . '/../src/bb-load.php';
|
||||
require_once dirname(__FILE__) . '/../src/load.php';
|
||||
|
||||
echo "Caching templates".PHP_EOL;
|
||||
$dirs = glob(BB_PATH_MODS.'/*/html_admin');
|
||||
$dirs = array_merge($dirs, glob(BB_PATH_MODS . '/*/html_client'));
|
||||
$dirs = array_merge($dirs, glob(BB_PATH_THEMES . '/*/html'));
|
||||
$dirs = glob(PATH_MODS.'/*/html_admin');
|
||||
$dirs = array_merge($dirs, glob(PATH_MODS . '/*/html_client'));
|
||||
$dirs = array_merge($dirs, glob(PATH_THEMES . '/*/html'));
|
||||
genCache($dirs, "/tmp/bb-translations/");
|
||||
|
||||
function genCache($dirs, $tmpDir)
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
BASEDIR=$(dirname $0)
|
||||
APPDIR=`cd $BASEDIR/.. ; pwd`
|
||||
BB_CACHE="/tmp/bb-translations/"
|
||||
BB_POT=$APPDIR/src/bb-locale/messages.pot
|
||||
BB_POT=$APPDIR/src/locale/messages.pot
|
||||
BB_POT_EXCLUDE=$APPDIR/bin/gettext_exclude.po
|
||||
BB_POT_INCLUDE=$APPDIR/bin/gettext_include.pot
|
||||
|
||||
|
||||
@@ -30,6 +30,6 @@ function prepend($string, $filename) {
|
||||
rename($tmpname, $filename);
|
||||
}
|
||||
|
||||
require_once dirname(__FILE__) . '/../src/bb-load.php';
|
||||
require_once dirname(__FILE__) . '/../src/load.php';
|
||||
|
||||
prepend(_writeHeader(), BB_PATH_LANGS.'/messages.pot');
|
||||
prepend(_writeHeader(), PATH_LANGS.'/messages.pot');
|
||||
+8
-8
@@ -70,21 +70,21 @@ function print_separator() {
|
||||
|
||||
# Create necessary directories if they don't exist
|
||||
function create_directories() {
|
||||
mkdir -p $PATH_PREFIX/src/bb-data/{cache,log,uploads}
|
||||
mkdir -p $PATH_PREFIX/src/data/{cache,log,uploads}
|
||||
}
|
||||
|
||||
# Change folder permissions
|
||||
function change_folder_permissions() {
|
||||
print_info "Changing folder permissions..."
|
||||
chmod -R 777 $PATH_PREFIX/src/bb-data/{cache,log,uploads}
|
||||
chmod -R 777 $PATH_PREFIX/src/bb-themes
|
||||
chmod -R 777 $PATH_PREFIX/src/data/{cache,log,uploads}
|
||||
chmod -R 777 $PATH_PREFIX/src/themes
|
||||
print_success "Folder permissions changed."
|
||||
}
|
||||
|
||||
# Create the configuration file
|
||||
function create_config() {
|
||||
print_info "Creating the configuration file..."
|
||||
cp $PATH_PREFIX/src/bb-config-sample.php $PATH_PREFIX/src/bb-config.php
|
||||
cp $PATH_PREFIX/src/config-sample.php $PATH_PREFIX/src/config.php
|
||||
print_success "Created the configuration file."
|
||||
print_separator
|
||||
}
|
||||
@@ -146,9 +146,9 @@ function remove_installation_leftovers() {
|
||||
|
||||
# Copy configuration for Huraga if it doesn't exist
|
||||
function copy_huraga_config() {
|
||||
if [ ! -f $PATH_PREFIX/src/bb-themes/huraga/config/settings_data.json ]; then
|
||||
if [ ! -f $PATH_PREFIX/src/themes/huraga/config/settings_data.json ]; then
|
||||
print_header "Copying Huraga configuration..."
|
||||
cp $PATH_PREFIX/src/bb-themes/huraga/config/settings_data.json.example $PATH_PREFIX/src/bb-themes/huraga/config/settings_data.json
|
||||
cp $PATH_PREFIX/src/themes/huraga/config/settings_data.json.example $PATH_PREFIX/src/themes/huraga/config/settings_data.json
|
||||
print_success "Successfully copied Huraga configuration."
|
||||
print_separator
|
||||
fi
|
||||
@@ -206,7 +206,7 @@ if [ ! -d "$PATH_PREFIX/src/install" ]; then
|
||||
fi
|
||||
|
||||
# Check and delete the config file if it already exists
|
||||
if [ -f "$PATH_PREFIX/src/bb-config.php" ]; then
|
||||
if [ -f "$PATH_PREFIX/src/config.php" ]; then
|
||||
print_warning "The config file already exists. If FOSSBilling is already installed and you ran the script as a mistake, answer no to the next prompt to quit safely."
|
||||
print_header "To continue, the installer will need to delete the existing configuration file first.\nKeep in mind that you will lose your existing configuration if you have an active installation."
|
||||
echo # new line
|
||||
@@ -219,7 +219,7 @@ if [ -f "$PATH_PREFIX/src/bb-config.php" ]; then
|
||||
|
||||
echo # new line
|
||||
|
||||
rm -f $PATH_PREFIX/src/bb-config.php
|
||||
rm -f $PATH_PREFIX/src/config.php
|
||||
print_success "The config file has been deleted."
|
||||
|
||||
print_separator
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
$pathApp = realpath(dirname(__FILE__) . '/..');
|
||||
$pathAppRoot = $pathApp . '/src';
|
||||
$pathAppInstall = $pathApp . '/src/install';
|
||||
$config = include $pathAppRoot . '/bb-config.php';
|
||||
$config = include $pathAppRoot . '/config.php';
|
||||
|
||||
$structureSql = '/sql/structure.sql';
|
||||
$contentSql = '/sql/content_test.sql';
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ mysql -u root boxbilling -e "INSERT INTO admin (role, name, email, pass, protect
|
||||
|
||||
cd /var/www/src
|
||||
cp htaccess.txt .htaccess
|
||||
cp bb-config-sample.php bb-config.php
|
||||
cp config-sample.php config.php
|
||||
|
||||
cd /var/www
|
||||
ln -s src public
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@ wget -O update.zip -q $UPDATE_URL
|
||||
unzip -o update.zip
|
||||
php foss-update.php
|
||||
rm -rf update.zip
|
||||
rm -rf bb-data/cache/*
|
||||
rm -rf data/cache/*
|
||||
@@ -14,46 +14,46 @@
|
||||
</fileset>
|
||||
|
||||
<fileset id="api-sources" dir="src" followsymlinks="false">
|
||||
<include name="bb-data/log"/>
|
||||
<include name="bb-data/cache/index.html"/>
|
||||
<include name="bb-data/uploads/index.html"/>
|
||||
<include name="bb-data/index.html"/>
|
||||
<include name="bb-data/.htaccess.txt"/>
|
||||
<include name="data/log"/>
|
||||
<include name="data/cache/index.html"/>
|
||||
<include name="data/uploads/index.html"/>
|
||||
<include name="data/index.html"/>
|
||||
<include name="data/.htaccess.txt"/>
|
||||
|
||||
<exclude name="bb-data/log/*"/>
|
||||
<exclude name="bb-data/cache/*"/>
|
||||
<exclude name="bb-data/uploads/*"/>
|
||||
<exclude name="data/log/*"/>
|
||||
<exclude name="data/cache/*"/>
|
||||
<exclude name="data/uploads/*"/>
|
||||
|
||||
<include name="vendor/**"/>
|
||||
<include name="bb-library/**"/>
|
||||
<include name="bb-modules/**"/>
|
||||
<include name="bb-locale/**"/>
|
||||
<include name="bb-themes/**"/>
|
||||
<include name="bb-uploads/**"/>
|
||||
<include name="library/**"/>
|
||||
<include name="modules/**"/>
|
||||
<include name="locale/**"/>
|
||||
<include name="themes/**"/>
|
||||
<include name="uploads/**"/>
|
||||
<include name="install/**"/>
|
||||
|
||||
<include name="bb-config-sample.php"/>
|
||||
<include name="bb-cron.php"/>
|
||||
<include name="bb-di.php"/>
|
||||
<include name="bb-ipn.php"/>
|
||||
<include name="bb-load.php"/>
|
||||
<include name="config-sample.php"/>
|
||||
<include name="cron.php"/>
|
||||
<include name="di.php"/>
|
||||
<include name="ipn.php"/>
|
||||
<include name="load.php"/>
|
||||
<include name="foss-update.php"/>
|
||||
<include name="rb.php"/>
|
||||
<include name="index.php"/>
|
||||
<include name="robots.txt"/>
|
||||
<include name=".htaccess"/>
|
||||
|
||||
<exclude name="bb-library/Server/Manager/Directadmin.php"/>
|
||||
<exclude name="bb-library/Server/Manager/Ispconfig3.php"/>
|
||||
<exclude name="bb-library/Server/Manager/Plesk.php"/>
|
||||
<exclude name="bb-library/Server/Manager/Virtualmin.php"/>
|
||||
<exclude name="library/Server/Manager/Directadmin.php"/>
|
||||
<exclude name="library/Server/Manager/Ispconfig3.php"/>
|
||||
<exclude name="library/Server/Manager/Plesk.php"/>
|
||||
<exclude name="library/Server/Manager/Virtualmin.php"/>
|
||||
|
||||
<exclude name="bb-library/Registrar/includes/**"/>
|
||||
<exclude name="library/Registrar/includes/**"/>
|
||||
</fileset>
|
||||
|
||||
<target name="clean" description="Clean up and create artifact directories">
|
||||
<delete dir="src/bb-data/cache"/>
|
||||
<mkdir dir="src/bb-data/cache"/>
|
||||
<delete dir="src/data/cache"/>
|
||||
<mkdir dir="src/data/cache"/>
|
||||
<delete dir="${build.dir}"/>
|
||||
|
||||
<mkdir dir="${build.dir}"/>
|
||||
@@ -84,15 +84,15 @@
|
||||
</target>
|
||||
|
||||
<target name="config" description="Create config file">
|
||||
<copy file="src/bb-config-sample.php" tofile="src/bb-config.php" overwrite="true"/>
|
||||
<copy file="src/config-sample.php" tofile="src/config.php" overwrite="true"/>
|
||||
</target>
|
||||
|
||||
<target name="test-unit">
|
||||
<exec executable="src/bb-vendor/bin/phpunit" failonerror="true">
|
||||
<arg line="tests/bb-library/" />
|
||||
<arg line="tests/library/" />
|
||||
</exec>
|
||||
<exec executable="src/bb-vendor/bin/phpunit" failonerror="true">
|
||||
<arg line="tests/bb-modules/" />
|
||||
<arg line="tests/modules/" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
<target name="test-modules">
|
||||
<exec executable="src/bb-vendor/bin/phpunit" failonerror="true">
|
||||
<arg line="src/bb-modules/" />
|
||||
<arg line="src/modules/" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
@@ -122,11 +122,11 @@
|
||||
<property environment="env"/>
|
||||
<echo message="Release TAG: ${env.TRAVIS_TAG}" />
|
||||
|
||||
<exec executable="sed" failonerror="true" output="${source}/bb-library/Box/Version2.php">
|
||||
<arg line="s/0.0.1/${env.TRAVIS_TAG}/ ${source}/bb-library/Box/Version.php" />
|
||||
<exec executable="sed" failonerror="true" output="${source}/library/Box/Version2.php">
|
||||
<arg line="s/0.0.1/${env.TRAVIS_TAG}/ ${source}/library/Box/Version.php" />
|
||||
</exec>
|
||||
<exec executable="mv" failonerror="true">
|
||||
<arg line="${source}/bb-library/Box/Version2.php ${source}/bb-library/Box/Version.php" />
|
||||
<arg line="${source}/library/Box/Version2.php ${source}/library/Box/Version.php" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
|
||||
+19
-19
@@ -305,37 +305,37 @@
|
||||
"ignorePaths": [
|
||||
"tests/**",
|
||||
"node_modules/**",
|
||||
"src/bb-themes/*/assets/**",
|
||||
"src/themes/*/assets/**",
|
||||
"src/install/assets/**",
|
||||
"src/install/sql/**",
|
||||
"src/rb.php",
|
||||
"src/bb-modules/*/assets/**",
|
||||
"src/modules/*/assets/**",
|
||||
"src/composer.json",
|
||||
"src/composer.lock",
|
||||
"src/bb-modules/Servicesolusvm/**",
|
||||
"src/modules/Servicesolusvm/**",
|
||||
"build.xml",
|
||||
"data/**",
|
||||
"Makefile",
|
||||
"phpunit.xml.dist",
|
||||
"bin/**",
|
||||
"src/bb-library/GeoLite2-Country.mmdb",
|
||||
"src/library/GeoLite2-Country.mmdb",
|
||||
"cspell.json",
|
||||
"package.json",
|
||||
"src/bb-library/Registrar/**",
|
||||
"src/bb-library/Server/Manager/**",
|
||||
"src/bb-library/Box/**",
|
||||
"src/bb-library/Payment/Adapter/**",
|
||||
"src/bb-library/php-gettext/**",
|
||||
"src/bb-locale/**",
|
||||
"src/bb-modules/System/Service.php",
|
||||
"src/bb-modules/Servicecentovacast/**",
|
||||
"src/bb-library/Server/Package.php",
|
||||
"src/bb-modules/Currency/Service.php",
|
||||
"src/bb-themes/admin_default/gulpfile.babel.js",
|
||||
"src/bb-modules/Seo/Service.php",
|
||||
"src/bb-modules/Orderbutton/html_client/mod_orderbutton_js.html.twig",
|
||||
"src/bb-modules/Massmailer/Api/Admin.php",
|
||||
"src/bb-modules/System/html_admin/mod_system_settings.html.twig",
|
||||
"src/library/Registrar/**",
|
||||
"src/library/Server/Manager/**",
|
||||
"src/library/Box/**",
|
||||
"src/library/Payment/Adapter/**",
|
||||
"src/library/php-gettext/**",
|
||||
"src/locale/**",
|
||||
"src/modules/System/Service.php",
|
||||
"src/modules/Servicecentovacast/**",
|
||||
"src/library/Server/Package.php",
|
||||
"src/modules/Currency/Service.php",
|
||||
"src/themes/admin_default/gulpfile.babel.js",
|
||||
"src/modules/Seo/Service.php",
|
||||
"src/modules/Orderbutton/html_client/mod_orderbutton_js.html.twig",
|
||||
"src/modules/Massmailer/Api/Admin.php",
|
||||
"src/modules/System/html_admin/mod_system_settings.html.twig",
|
||||
"gulpfile.babel.js",
|
||||
"htaccess.txt"
|
||||
]
|
||||
|
||||
@@ -27,13 +27,13 @@ http {
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Disable PHP execution in /bb-uploads
|
||||
location ~* /bb-uploads/.*\.php$ {
|
||||
# Disable PHP execution in /uploads
|
||||
location ~* /uploads/.*\.php$ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Deny access to /bb-data
|
||||
location ~* /bb-data/ {
|
||||
# Deny access to /data
|
||||
location ~* /data/ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
* * * * * php /var/www/html/src/bb-cron.php >> /var/www/html/src/bb-data/log/cron.log 2>&1
|
||||
* * * * * php /var/www/html/src/cron.php >> /var/www/html/src/data/log/cron.log 2>&1
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
$HTTP["host"] == "demo.example.com" {
|
||||
var.server_name = "demo.example.com"
|
||||
server.name = server_name
|
||||
$HTTP["url"] =~ "^/bb-data/" {
|
||||
$HTTP["url"] =~ "^/data/" {
|
||||
url.access-deny = ("")
|
||||
}
|
||||
url.rewrite-if-not-file = ( "" => "/index.php?_url=${url.path}${qsa}")
|
||||
|
||||
+4
-4
@@ -24,13 +24,13 @@ server {
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Disable PHP execution in /bb-uploads
|
||||
location ~* /bb-uploads/.*\.php$ {
|
||||
# Disable PHP execution in /uploads
|
||||
location ~* /uploads/.*\.php$ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Deny access to /bb-data
|
||||
location ~* /bb-data/ {
|
||||
# Deny access to /data
|
||||
location ~* /data/ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ const config = [
|
||||
];
|
||||
|
||||
export const buildThemeAdmin = function buildThemeAdmin() {
|
||||
return gulp.src('src/bb-themes/admin_default/gulpfile.babel.js', { read: false })
|
||||
return gulp.src('src/themes/admin_default/gulpfile.babel.js', { read: false })
|
||||
.pipe(chug({ args: config, tasks: 'build' }));
|
||||
}
|
||||
buildThemeAdmin.description = 'Build theme Admin assets.';
|
||||
|
||||
+10
-10
@@ -5,23 +5,23 @@
|
||||
<directory suffix=".php">src</directory>
|
||||
</include>
|
||||
<exclude>
|
||||
<directory>src/bb-data</directory>
|
||||
<directory>src/bb-library/Registrar/includes</directory>
|
||||
<directory>src/bb-library/Security/CSRF-Protector-PHP</directory>
|
||||
<directory>src/bb-library/php-gettext</directory>
|
||||
<directory>src/bb-modules/Servicecentovacast/ccapiclient</directory>
|
||||
<directory>src/bb-themes</directory>
|
||||
<directory>src/data</directory>
|
||||
<directory>src/library/Registrar/includes</directory>
|
||||
<directory>src/library/Security/CSRF-Protector-PHP</directory>
|
||||
<directory>src/library/php-gettext</directory>
|
||||
<directory>src/modules/Servicecentovacast/ccapiclient</directory>
|
||||
<directory>src/themes</directory>
|
||||
<directory>src/vendor</directory>
|
||||
<directory>src/install</directory>
|
||||
<file>src/bb-library/Box/Zip.php</file>
|
||||
<file>src/bb-library/PdoSessionHandler.php</file>
|
||||
<file>src/bb-modules/Spamchecker/akismet.curl.class.php</file>
|
||||
<file>src/library/Box/Zip.php</file>
|
||||
<file>src/library/PdoSessionHandler.php</file>
|
||||
<file>src/modules/Spamchecker/akismet.curl.class.php</file>
|
||||
<file>src/rb.php</file>
|
||||
</exclude>
|
||||
</coverage>
|
||||
<testsuites>
|
||||
<testsuite name="Library">
|
||||
<directory>tests/bb-library</directory>
|
||||
<directory>tests/library</directory>
|
||||
</testsuite>
|
||||
<testsuite name="Integration">
|
||||
<directory>tests/integration</directory>
|
||||
|
||||
+3
-3
@@ -46,10 +46,10 @@
|
||||
"ext-intl": "*"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {"": "bb-library"},
|
||||
"psr-4": {"Box\\Mod\\": "bb-modules"}
|
||||
"psr-0": {"": "library"},
|
||||
"psr-4": {"Box\\Mod\\": "modules"}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-0": { "": "../tests/bb-library" }
|
||||
"psr-0": { "": "../tests/library" }
|
||||
}
|
||||
}
|
||||
Executable → Regular
+4
-4
@@ -3,7 +3,7 @@
|
||||
* FOSSBilling configuration file example.
|
||||
*
|
||||
* If you are not using the web installer, you can rename this file
|
||||
* to "bb-config.php" and fill in the values.
|
||||
* to "config.php" and fill in the values.
|
||||
* Import /install/sql/structure.sql to your database
|
||||
* Import /install/sql/content.sql to your database
|
||||
* Open browser https://www.yourdomain.com/index.php?_url=/admin to create a new admin account.
|
||||
@@ -110,9 +110,9 @@ return [
|
||||
/*
|
||||
* Set location to store sensitive data.
|
||||
*/
|
||||
'path_data' => __DIR__ . '/bb-data',
|
||||
'path_data' => __DIR__ . '/data',
|
||||
|
||||
'path_logs' => __DIR__ . '/bb-data/log/application.log',
|
||||
'path_logs' => __DIR__ . '/data/log/application.log',
|
||||
|
||||
'log_to_db' => true,
|
||||
|
||||
@@ -151,7 +151,7 @@ return [
|
||||
'twig' => [
|
||||
'debug' => false,
|
||||
'auto_reload' => false,
|
||||
'cache' => __DIR__ . '/bb-data/cache',
|
||||
'cache' => __DIR__ . '/data/cache',
|
||||
],
|
||||
|
||||
'api' => [
|
||||
@@ -14,8 +14,8 @@
|
||||
* with this source code in the file LICENSE
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/bb-load.php';
|
||||
$di = include __DIR__ . '/bb-di.php';
|
||||
require_once __DIR__ . '/load.php';
|
||||
$di = include __DIR__ . '/di.php';
|
||||
|
||||
$di['translate']();
|
||||
|
||||
Executable → Regular
File renamed without changes.
Executable → Regular
File renamed without changes.
Executable → Regular
File renamed without changes.
Executable → Regular
File renamed without changes.
@@ -21,7 +21,7 @@ use RedBeanPHP\Facade;
|
||||
$di = new Box_Di();
|
||||
|
||||
$di['config'] = function () {
|
||||
$array = include BB_PATH_ROOT . '/bb-config.php';
|
||||
$array = include PATH_ROOT . '/config.php';
|
||||
|
||||
return new Box_Config($array);
|
||||
};
|
||||
@@ -394,7 +394,7 @@ $di['service_boxbilling'] = $di->protect(function ($config) {
|
||||
|
||||
$di['ftp'] = $di->protect(function ($params) { return new \Box_Ftp($params); });
|
||||
|
||||
$di['geoip'] = function () { return new \GeoIp2\Database\Reader(BB_PATH_LIBRARY . '/GeoLite2-Country.mmdb'); };
|
||||
$di['geoip'] = function () { return new \GeoIp2\Database\Reader(PATH_LIBRARY . '/GeoLite2-Country.mmdb'); };
|
||||
|
||||
$di['password'] = function () { return new Box_Password(); };
|
||||
|
||||
+2
-2
@@ -113,8 +113,8 @@ foreach (get_declared_classes() as $class) {
|
||||
}
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/bb-load.php';
|
||||
$di = include __DIR__ . '/bb-di.php';
|
||||
require_once __DIR__ . '/load.php';
|
||||
$di = include __DIR__ . '/di.php';
|
||||
|
||||
error_log('Executing FOSSBilling update script');
|
||||
natsort($patches);
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@
|
||||
* with this source code in the file LICENSE
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/bb-load.php';
|
||||
$di = include __DIR__ . '/bb-di.php';
|
||||
require_once __DIR__ . '/load.php';
|
||||
$di = include __DIR__ . '/di.php';
|
||||
$url = $di['request']->getQuery('_url');
|
||||
$admin_prefix = $di['config']['admin_area_prefix'];
|
||||
if (0 === strncasecmp($url, $admin_prefix, strlen($admin_prefix))) {
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<p>
|
||||
If you can not enable JavaScript for some reason you can follow these steps in
|
||||
order to setup FOSSBilling: <br/>
|
||||
* Rename "bb-config-sample.php" file to "bb-config.php", fill in the values and change this file permissions to read only (CHMOD 644).<br/>
|
||||
* Rename "config-sample.php" file to "config.php", fill in the values and change this file permissions to read only (CHMOD 644).<br/>
|
||||
* Import /install/sql/structure.sql to your database<br/>
|
||||
* Import /install/sql/content.sql to your database<br/>
|
||||
* Open browser <a href="{{constant('BB_URL')}}index.php?_url=/admin">{{constant("BB_URL")}}index.php?_url=/admin</a> to create new admin
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<body>
|
||||
<div id="header" class="wrapper">
|
||||
<div class="logo"><a href="{{ constant('BB_URL_INSTALL') }}" title="FOSSBilling"><img src="../bb-themes/huraga/assets/img/logo.svg" alt="FOSSBilling logo" height="50px" width="238"/></a></div>
|
||||
<div class="logo"><a href="{{ constant('BB_URL_INSTALL') }}" title="FOSSBilling"><img src="../themes/huraga/assets/img/logo.svg" alt="FOSSBilling logo" height="50px" width="238"/></a></div>
|
||||
<div class="middleNav">
|
||||
<ul>
|
||||
<li class="iForum"><a href="https://github.com/FOSSBilling/FOSSBilling/issues" target="_blank" title="Report a bug on GitHub"><span>Report a bug</span></a></li>
|
||||
|
||||
+34
-34
@@ -45,35 +45,35 @@ define('BB_URL', $root_url);
|
||||
const BB_URL_INSTALL = BB_URL . 'install/';
|
||||
const BB_URL_ADMIN = BB_URL . 'index.php?_url=/admin';
|
||||
|
||||
define('BB_PATH_ROOT', dirname(__DIR__));
|
||||
const BB_PATH_LIBRARY = BB_PATH_ROOT . '/bb-library';
|
||||
const BB_PATH_VENDOR = BB_PATH_ROOT . '/vendor';
|
||||
const BB_PATH_INSTALL_THEMES = BB_PATH_ROOT . '/install';
|
||||
const BB_PATH_THEMES = BB_PATH_ROOT . '/bb-themes';
|
||||
const BB_PATH_LICENSE = BB_PATH_ROOT . '/LICENSE';
|
||||
const BB_PATH_SQL = BB_PATH_ROOT . '/install/sql/structure.sql';
|
||||
const BB_PATH_SQL_DATA = BB_PATH_ROOT . '/install/sql/content.sql';
|
||||
const BB_PATH_INSTALL = BB_PATH_ROOT . '/install';
|
||||
const BB_PATH_CONFIG = BB_PATH_ROOT . '/bb-config.php';
|
||||
const BB_PATH_CRON = BB_PATH_ROOT . '/bb-cron.php';
|
||||
const BB_PATH_LANGS = BB_PATH_ROOT . '/bb-locale';
|
||||
define('PATH_ROOT', dirname(__DIR__));
|
||||
const PATH_LIBRARY = PATH_ROOT . '/library';
|
||||
const PATH_VENDOR = PATH_ROOT . '/vendor';
|
||||
const PATH_INSTALL_THEMES = PATH_ROOT . '/install';
|
||||
const PATH_THEMES = PATH_ROOT . '/themes';
|
||||
const PATH_LICENSE = PATH_ROOT . '/LICENSE';
|
||||
const PATH_SQL = PATH_ROOT . '/install/sql/structure.sql';
|
||||
const PATH_SQL_DATA = PATH_ROOT . '/install/sql/content.sql';
|
||||
const PATH_INSTALL = PATH_ROOT . '/install';
|
||||
const PATH_CONFIG = PATH_ROOT . '/config.php';
|
||||
const PATH_CRON = PATH_ROOT . '/cron.php';
|
||||
const PATH_LANGS = PATH_ROOT . '/locale';
|
||||
|
||||
/*
|
||||
Config paths & templates
|
||||
*/
|
||||
const BB_PATH_HTACCESS = BB_PATH_ROOT . '/.htaccess';
|
||||
const BB_PATH_HTACCESS_TEMPLATE = BB_PATH_ROOT . '/htaccess.txt';
|
||||
const PATH_HTACCESS = PATH_ROOT . '/.htaccess';
|
||||
const PATH_HTACCESS_TEMPLATE = PATH_ROOT . '/htaccess.txt';
|
||||
|
||||
const BB_HURAGA_CONFIG = BB_PATH_THEMES . '/huraga/config/settings_data.json';
|
||||
const BB_HURAGA_CONFIG_TEMPLATE = BB_PATH_THEMES . '/huraga/config/settings_data.json.example';
|
||||
const BB_HURAGA_CONFIG = PATH_THEMES . '/huraga/config/settings_data.json';
|
||||
const BB_HURAGA_CONFIG_TEMPLATE = PATH_THEMES . '/huraga/config/settings_data.json.example';
|
||||
|
||||
// Ensure library/ is on include_path
|
||||
set_include_path(implode(PATH_SEPARATOR, [
|
||||
BB_PATH_LIBRARY,
|
||||
PATH_LIBRARY,
|
||||
get_include_path(),
|
||||
]));
|
||||
|
||||
require BB_PATH_VENDOR . '/autoload.php';
|
||||
require PATH_VENDOR . '/autoload.php';
|
||||
|
||||
final class Box_Installer
|
||||
{
|
||||
@@ -205,9 +205,9 @@ final class Box_Installer
|
||||
'license' => $this->session->get('license'),
|
||||
'agree' => $this->session->get('agree'),
|
||||
|
||||
'install_module_path' => BB_PATH_INSTALL,
|
||||
'cron_path' => BB_PATH_CRON,
|
||||
'config_file_path' => BB_PATH_CONFIG,
|
||||
'install_module_path' => PATH_INSTALL,
|
||||
'cron_path' => PATH_CRON,
|
||||
'config_file_path' => PATH_CONFIG,
|
||||
'live_site' => BB_URL,
|
||||
'admin_site' => BB_URL_ADMIN,
|
||||
|
||||
@@ -221,7 +221,7 @@ final class Box_Installer
|
||||
private function render($name, $vars = []): string
|
||||
{
|
||||
$options = [
|
||||
'paths' => [BB_PATH_INSTALL_THEMES],
|
||||
'paths' => [PATH_INSTALL_THEMES],
|
||||
'debug' => true,
|
||||
'charset' => 'utf-8',
|
||||
'optimizations' => 1,
|
||||
@@ -240,7 +240,7 @@ final class Box_Installer
|
||||
|
||||
private function getLicense(): bool|string
|
||||
{
|
||||
$path = BB_PATH_LICENSE;
|
||||
$path = PATH_LICENSE;
|
||||
if (!file_exists($path)) {
|
||||
return 'FOSSBilling is licensed under the Apache License, Version 2.0.' . PHP_EOL . 'Please visit https://github.com/FOSSBilling/FOSSBilling/blob/master/LICENSE for full license text.';
|
||||
}
|
||||
@@ -329,8 +329,8 @@ final class Box_Installer
|
||||
|
||||
$pdo = $this->getPdo($ns->get('db_host').';'.$ns->get('db_port'), $ns->get('db_name'), $ns->get('db_user'), $ns->get('db_pass'));
|
||||
|
||||
$sql = file_get_contents(BB_PATH_SQL);
|
||||
$sql_content = file_get_contents(BB_PATH_SQL_DATA);
|
||||
$sql = file_get_contents(PATH_SQL);
|
||||
$sql_content = file_get_contents(PATH_SQL_DATA);
|
||||
|
||||
if (!$sql || !$sql_content) {
|
||||
throw new Exception('Could not read structure.sql file');
|
||||
@@ -366,8 +366,8 @@ final class Box_Installer
|
||||
/*
|
||||
Copy config templates when applicable
|
||||
*/
|
||||
if (!file_exists(BB_PATH_HTACCESS) && file_exists(BB_PATH_HTACCESS_TEMPLATE)) {
|
||||
rename(BB_PATH_HTACCESS_TEMPLATE, BB_PATH_HTACCESS);
|
||||
if (!file_exists(PATH_HTACCESS) && file_exists(PATH_HTACCESS_TEMPLATE)) {
|
||||
rename(PATH_HTACCESS_TEMPLATE, PATH_HTACCESS);
|
||||
}
|
||||
|
||||
if (!file_exists(BB_HURAGA_CONFIG) && file_exists(BB_HURAGA_CONFIG_TEMPLATE)) {
|
||||
@@ -401,8 +401,8 @@ final class Box_Installer
|
||||
private function _createConfigurationFile($data): void
|
||||
{
|
||||
$output = $this->_getConfigOutput($data);
|
||||
if (!@file_put_contents(BB_PATH_CONFIG, $output)) {
|
||||
throw new Exception('Configuration file is not writable or does not exist. Please create the file at ' . BB_PATH_CONFIG . ' and make it writable', 101);
|
||||
if (!@file_put_contents(PATH_CONFIG, $output)) {
|
||||
throw new Exception('Configuration file is not writable or does not exist. Please create the file at ' . PATH_CONFIG . ' and make it writable', 101);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -434,8 +434,8 @@ final class Box_Installer
|
||||
'locale' => 'en_US',
|
||||
'locale_date_format' => 'l, d F o',
|
||||
'locale_time_format' => ' G:i:s',
|
||||
'path_data' => BB_PATH_ROOT . '/bb-data',
|
||||
'path_logs' => BB_PATH_ROOT . '/bb-data/log/application.log',
|
||||
'path_data' => PATH_ROOT . '/data',
|
||||
'path_logs' => PATH_ROOT . '/data/log/application.log',
|
||||
|
||||
'log_to_db' => true,
|
||||
|
||||
@@ -451,7 +451,7 @@ final class Box_Installer
|
||||
'twig' => [
|
||||
'debug' => true,
|
||||
'auto_reload' => true,
|
||||
'cache' => BB_PATH_ROOT . '/bb-data/cache',
|
||||
'cache' => PATH_ROOT . '/data/cache',
|
||||
],
|
||||
|
||||
'api' => [
|
||||
@@ -488,10 +488,10 @@ final class Box_Installer
|
||||
|
||||
private function generateEmailTemplates(): bool
|
||||
{
|
||||
define('BB_PATH_MODS', BB_PATH_ROOT . '/bb-modules');
|
||||
define('PATH_MODS', PATH_ROOT . '/modules');
|
||||
|
||||
$emailService = new Service();
|
||||
$di = include BB_PATH_ROOT . '/bb-di.php';
|
||||
$di = include PATH_ROOT . '/di.php';
|
||||
$di['translate']();
|
||||
$emailService->setDi($di);
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ VALUES
|
||||
(2,'mod','news','installed','1.0.0','{\"id\":\"news\",\"type\":\"mod\",\"name\":\"News\",\"description\":\"News module for FOSSBilling\",\"homepage_url\":\"https:\\/\\/github.com\\/FOSSBilling\\/\",\"author\":\"FOSSBilling\",\"author_url\":\"https:\\/\\/fossbilling.org\\/\",\"license\":\"https:\\/\\/www.fossbilling.org\\/license.txt\",\"version\":\"1.0.0\",\"icon_url\":null,\"download_url\":null,\"project_url\":\"https:\\/\\/fossbilling.org\\/\",\"minimum_boxbilling_version\":null,\"maximum_boxbilling_version\":null}\n'),
|
||||
(3,'mod','branding','installed','1.0.0','{\"id\":\"branding\",\"type\":\"mod\",\"name\":\"Branding\",\"description\":\"FOSSBilling branding module.\",\"homepage_url\":\"https:\\/\\/github.com\\/FOSSBilling\\/\",\"author\":\"FOSSBilling\",\"author_url\":\"https:\\/\\/fossbilling.org\\/\",\"license\":\"https:\\/\\/www.fossbilling.org\\/license.txt\",\"version\":\"1.0.0\",\"icon_url\":null,\"download_url\":null,\"project_url\":\"https:\\/\\/fossbilling.org\\/\",\"minimum_boxbilling_version\":null,\"maximum_boxbilling_version\":null}\n'),
|
||||
(4,'mod','redirect','installed','1.0.0','{\"id\":\"redirect\",\"type\":\"mod\",\"name\":\"Redirect\",\"description\":\"Manage redirects\",\"homepage_url\":\"https:\\/\\/github.com\\/FOSSBilling\\/\",\"author\":\"FOSSBilling\",\"author_url\":\"https:\\/\\/www.fossbilling.org\",\"license\":\"GPL version 2 or later - https:\\/\\/www.gnu.org\\/licenses\\/old-licenses\\/gpl-2.0.html\",\"version\":\"1.0.0\",\"icon_url\":null,\"download_url\":null,\"project_url\":\"https:\\/\\/fossbilling.org\\/\",\"minimum_boxbilling_version\":null,\"maximum_boxbilling_version\":null}\n'),
|
||||
(5,'mod','wysiwyg','installed','4.22','{\"id\":\"wysiwyg\",\"type\":\"mod\",\"name\":\"WYSIWYG\",\"description\":\"Integrates a What You See Is What You Get (WYSIWYG) editor to your admin panel.\",\"homepage_url\":\"https:\/\/github.com\/FOSSBilling\/\",\"author\":\"FOSSBilling\",\"author_url\":\"https:\/\/fossbilling.org\/\",\"license\":\"GPL version 2 or later - https:\/\/www.gnu.org\/licenses\/old-licenses\/gpl-2.0.html\",\"version\":\"4.22\",\"icon_url\":\"\/bb-modules\/Wysiwyg\/icon.png\",\"download_url\":null,\"project_url\":\"https:\/\/fossbilling.org\/\",\"minimum_boxbilling_version\":null,\"maximum_boxbilling_version\":null}');
|
||||
(5,'mod','wysiwyg','installed','4.22','{\"id\":\"wysiwyg\",\"type\":\"mod\",\"name\":\"WYSIWYG\",\"description\":\"Integrates a What You See Is What You Get (WYSIWYG) editor to your admin panel.\",\"homepage_url\":\"https:\/\/github.com\/FOSSBilling\/\",\"author\":\"FOSSBilling\",\"author_url\":\"https:\/\/fossbilling.org\/\",\"license\":\"GPL version 2 or later - https:\/\/www.gnu.org\/licenses\/old-licenses\/gpl-2.0.html\",\"version\":\"4.22\",\"icon_url\":\"\/modules\/Wysiwyg\/icon.png\",\"download_url\":null,\"project_url\":\"https:\/\/fossbilling.org\/\",\"minimum_boxbilling_version\":null,\"maximum_boxbilling_version\":null}');
|
||||
|
||||
/*!40000 ALTER TABLE `extension` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
@@ -320,7 +320,7 @@ VALUES
|
||||
(2,'company_name','Company Name',0,NULL,NULL,'2021-01-01 12:00:00','2021-01-01 12:00:00'),
|
||||
(3,'company_email','company@email.com',0,NULL,NULL,'2021-01-01 12:00:00','2021-01-01 12:00:00'),
|
||||
(4,'company_signature','FOSSBilling.org - Client Management, Invoice and Support Software',0,NULL,NULL,'2021-01-01 12:00:00','2021-01-01 12:00:00'),
|
||||
(5,'company_logo','bb-themes/huraga/assets/img/logo.svg',0,NULL,NULL,'2021-01-01 12:00:00','2021-01-01 12:00:00'),
|
||||
(5,'company_logo','themes/huraga/assets/img/logo.svg',0,NULL,NULL,'2021-01-01 12:00:00','2021-01-01 12:00:00'),
|
||||
(6,'company_address_1','Demo address line 1',0,NULL,NULL,'2021-01-01 12:00:00','2021-01-01 12:00:00'),
|
||||
(7,'company_address_2','Demo address line 2',0,NULL,NULL,'2021-01-01 12:00:00','2021-01-01 12:00:00'),
|
||||
(8,'company_address_3','Demo address line 3',0,NULL,NULL,'2021-01-01 12:00:00','2021-01-01 12:00:00'),
|
||||
|
||||
@@ -166,7 +166,7 @@ VALUES
|
||||
(2,'mod','news','installed','1.0.0','{\"id\":\"news\",\"type\":\"mod\",\"name\":\"News\",\"description\":\"News module for FOSSBilling\",\"homepage_url\":\"https:\\/\\/github.com\\/FOSSBilling\\/\",\"author\":\"FOSSBilling\",\"author_url\":\"https:\\/\\/fossbilling.org\\/\",\"license\":\"https:\\/\\/www.fossbilling.org\\/license.txt\",\"version\":\"1.0.0\",\"icon_url\":null,\"download_url\":null,\"project_url\":\"https:\\/\\/fossbilling.org\\/\",\"minimum_boxbilling_version\":null,\"maximum_boxbilling_version\":null}\n'),
|
||||
(3,'mod','branding','installed','1.0.0','{\"id\":\"branding\",\"type\":\"mod\",\"name\":\"Branding\",\"description\":\"FOSSBilling branding module. Can be deactivated.\",\"homepage_url\":\"https:\\/\\/github.com\\/FOSSBilling\\/\",\"author\":\"FOSSBilling\",\"author_url\":\"https:\\/\\/fossbilling.org\\/\",\"license\":\"https:\\/\\/www.fossbilling.org\\/license.txt\",\"version\":\"1.0.0\",\"icon_url\":null,\"download_url\":null,\"project_url\":\"https:\\/\\/fossbilling.org\\/\",\"minimum_boxbilling_version\":null,\"maximum_boxbilling_version\":null}\n'),
|
||||
(4,'mod','redirect','installed','1.0.0','{\"id\":\"redirect\",\"type\":\"mod\",\"name\":\"Redirect\",\"description\":\"Manage redirects\",\"homepage_url\":\"https:\\/\\/github.com\\/FOSSBilling\\/\",\"author\":\"FOSSBilling\",\"author_url\":\"https:\\/\\/www.fossbilling.org\",\"license\":\"GPL version 2 or later - https:\\/\\/www.gnu.org\\/licenses\\/old-licenses\\/gpl-2.0.html\",\"version\":\"1.0.0\",\"icon_url\":null,\"download_url\":null,\"project_url\":\"https:\\/\\/fossbilling.org\\/\",\"minimum_boxbilling_version\":null,\"maximum_boxbilling_version\":null}\n'),
|
||||
(5,'mod','wysiwyg','installed','4.22','{\"id\":\"wysiwyg\",\"type\":\"mod\",\"name\":\"Wysiwyg\",\"description\":\"Integrates a What You See Is What You Get (WYSIWYG) editor to your admin panel.\",\"homepage_url\":\"https:\/\/github.com\/FOSSBilling\/\",\"author\":\"FOSSBilling\",\"author_url\":\"https:\/\/fossbilling.org\/\",\"license\":\"GPL version 2 or later - https:\/\/www.gnu.org\/licenses\/old-licenses\/gpl-2.0.html\",\"version\":\"4.22\",\"icon_url\":\"\/bb-modules\/Wysiwyg\/icon.png\",\"download_url\":null,\"project_url\":\"https:\/\/fossbilling.org\/\",\"minimum_boxbilling_version\":null,\"maximum_boxbilling_version\":null}');
|
||||
(5,'mod','wysiwyg','installed','4.22','{\"id\":\"wysiwyg\",\"type\":\"mod\",\"name\":\"Wysiwyg\",\"description\":\"Integrates a What You See Is What You Get (WYSIWYG) editor to your admin panel.\",\"homepage_url\":\"https:\/\/github.com\/FOSSBilling\/\",\"author\":\"FOSSBilling\",\"author_url\":\"https:\/\/fossbilling.org\/\",\"license\":\"GPL version 2 or later - https:\/\/www.gnu.org\/licenses\/old-licenses\/gpl-2.0.html\",\"version\":\"4.22\",\"icon_url\":\"\/modules\/Wysiwyg\/icon.png\",\"download_url\":null,\"project_url\":\"https:\/\/fossbilling.org\/\",\"minimum_boxbilling_version\":null,\"maximum_boxbilling_version\":null}');
|
||||
|
||||
/*!40000 ALTER TABLE `extension` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
@@ -485,7 +485,7 @@ VALUES
|
||||
(2,'company_name','FOSSBilling demo',0,NULL,NULL,'2022-01-01 12:00:00','2022-01-01 12:00:00'),
|
||||
(3,'company_email','demo@fossbilling.org',0,NULL,NULL,'2022-01-01 12:00:00','2022-01-01 12:00:00'),
|
||||
(4,'company_signature','FOSSBilling.org - Client Management, Invoice and Support Software',0,NULL,NULL,'2022-01-01 12:00:00','2022-01-01 12:00:00'),
|
||||
(5,'company_logo','bb-themes/huraga/assets/img/logo.svg',0,NULL,NULL,'2022-01-01 12:00:00','2022-01-01 12:00:00'),
|
||||
(5,'company_logo','themes/huraga/assets/img/logo.svg',0,NULL,NULL,'2022-01-01 12:00:00','2022-01-01 12:00:00'),
|
||||
(6,'company_address_1','Demo address line 1',0,NULL,NULL,'2022-01-01 12:00:00','2022-01-01 12:00:00'),
|
||||
(7,'company_address_2','Demo address line 2',0,NULL,NULL,'2022-01-01 12:00:00','2022-01-01 12:00:00'),
|
||||
(8,'company_address_3','Demo address line 3',0,NULL,NULL,'2022-01-01 12:00:00','2022-01-01 12:00:00'),
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* with this source code in the file LICENSE
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/bb-load.php';
|
||||
$di = include __DIR__ . '/bb-di.php';
|
||||
require_once __DIR__ . '/load.php';
|
||||
$di = include __DIR__ . '/di.php';
|
||||
$di['translate']();
|
||||
|
||||
$bb_invoice_id = $_POST['bb_invoice_id'] ?? $_GET['bb_invoice_id'] ?? null;
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -44,8 +44,8 @@ class Box_AppAdmin extends Box_App
|
||||
$theme = $service->getCurrentAdminAreaTheme();
|
||||
|
||||
$loader = new Box_TwigLoader([
|
||||
'mods' => BB_PATH_MODS,
|
||||
'theme' => BB_PATH_THEMES . DIRECTORY_SEPARATOR . $theme['code'],
|
||||
'mods' => PATH_MODS,
|
||||
'theme' => PATH_THEMES . DIRECTORY_SEPARATOR . $theme['code'],
|
||||
'type' => 'admin',
|
||||
]
|
||||
);
|
||||
@@ -92,8 +92,8 @@ class Box_AppClient extends Box_App
|
||||
$settings = $service->getThemeSettings($theme);
|
||||
|
||||
$loader = new Box_TwigLoader([
|
||||
'mods' => BB_PATH_MODS,
|
||||
'theme' => BB_PATH_THEMES . DIRECTORY_SEPARATOR . $code,
|
||||
'mods' => PATH_MODS,
|
||||
'theme' => PATH_THEMES . DIRECTORY_SEPARATOR . $code,
|
||||
'type' => 'client',
|
||||
]
|
||||
);
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -71,7 +71,7 @@ class Box_Curl {
|
||||
$this->_includeHeader = $includeHeader;
|
||||
$this->_binaryTransfer = $binaryTransfer;
|
||||
|
||||
$this->_cookieFileLocation = BB_PATH_CACHE . '/c.txt';
|
||||
$this->_cookieFileLocation = PATH_CACHE . '/c.txt';
|
||||
}
|
||||
|
||||
public function useAuth($use) {
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -22,7 +22,7 @@ class Box_Exception extends Exception
|
||||
*/
|
||||
public function __construct($message, array $variables = NULL, $code = 0)
|
||||
{
|
||||
$config = include BB_PATH_ROOT.'/bb-config.php';
|
||||
$config = include PATH_ROOT.'/config.php';
|
||||
$debug = (isset($config['debug'])) ? isset($config['debug']) : false;
|
||||
$logStack = (isset($config['log_stacktrace'])) ? isset($config['log_stacktrace']) : true;
|
||||
$stackLength = (isset($config['stacktrace_length'])) ? isset($config['stacktrace_length']) : 25;
|
||||
@@ -67,7 +67,7 @@ class Box_Exception extends Exception
|
||||
|
||||
$entry_file = 'NO_FILE';
|
||||
if (array_key_exists('file', $entry)) {
|
||||
$entry_file = str_replace(BB_PATH_ROOT, '' , $entry['file']);
|
||||
$entry_file = str_replace(PATH_ROOT, '' , $entry['file']);
|
||||
}
|
||||
$entry_line = 'NO_LINE';
|
||||
if (array_key_exists('line', $entry)) {
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -108,7 +108,7 @@ class Box_Mod
|
||||
$info['type'] = 'mod';
|
||||
|
||||
if(!empty($info['icon_url'])) {
|
||||
$info['icon_url'] = '/bb-modules/'.ucfirst($this->mod).'/'.$info['icon_url'];
|
||||
$info['icon_url'] = '/modules/'.ucfirst($this->mod).'/'.$info['icon_url'];
|
||||
}
|
||||
|
||||
return $info;
|
||||
@@ -301,6 +301,6 @@ class Box_Mod
|
||||
|
||||
private function _getModPath()
|
||||
{
|
||||
return BB_PATH_MODS . DIRECTORY_SEPARATOR . ucfirst($this->mod) . DIRECTORY_SEPARATOR;
|
||||
return PATH_MODS . DIRECTORY_SEPARATOR . ucfirst($this->mod) . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -28,7 +28,7 @@ class Box_Requirements implements \Box\InjectionAwareInterface
|
||||
}
|
||||
|
||||
private $_all_ok = true;
|
||||
private $_app_path = BB_PATH_ROOT;
|
||||
private $_app_path = PATH_ROOT;
|
||||
private $_options = array();
|
||||
|
||||
public function __construct()
|
||||
@@ -48,12 +48,12 @@ class Box_Requirements implements \Box\InjectionAwareInterface
|
||||
'safe_mode' => ini_get('safe_mode'),
|
||||
),
|
||||
'writable_folders' => array(
|
||||
$this->_app_path . '/bb-data/cache',
|
||||
$this->_app_path . '/bb-data/log',
|
||||
$this->_app_path . '/bb-data/uploads',
|
||||
$this->_app_path . '/data/cache',
|
||||
$this->_app_path . '/data/log',
|
||||
$this->_app_path . '/data/uploads',
|
||||
),
|
||||
'writable_files' => array(
|
||||
$this->_app_path . '/bb-config.php',
|
||||
$this->_app_path . '/config.php',
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -83,10 +83,10 @@ class Box_Requirements implements \Box\InjectionAwareInterface
|
||||
);
|
||||
|
||||
$data['permissions'] = array(
|
||||
BB_PATH_UPLOADS => substr(sprintf('%o', fileperms(BB_PATH_UPLOADS)), -4),
|
||||
BB_PATH_DATA => substr(sprintf('%o', fileperms(BB_PATH_DATA)), -4),
|
||||
BB_PATH_CACHE => substr(sprintf('%o', fileperms(BB_PATH_CACHE)), -4),
|
||||
BB_PATH_LOG => substr(sprintf('%o', fileperms(BB_PATH_LOG)), -4),
|
||||
PATH_UPLOADS => substr(sprintf('%o', fileperms(PATH_UPLOADS)), -4),
|
||||
PATH_DATA => substr(sprintf('%o', fileperms(PATH_DATA)), -4),
|
||||
PATH_CACHE => substr(sprintf('%o', fileperms(PATH_CACHE)), -4),
|
||||
PATH_LOG => substr(sprintf('%o', fileperms(PATH_LOG)), -4),
|
||||
);
|
||||
|
||||
$data['extensions'] = array(
|
||||
File renamed without changes.
File renamed without changes.
@@ -104,14 +104,14 @@ class Box_Tools
|
||||
|
||||
public function hasService($type)
|
||||
{
|
||||
$file = BB_PATH_MODS . '/mod_'.$type.'/Service.php';
|
||||
$file = PATH_MODS . '/mod_'.$type.'/Service.php';
|
||||
return file_exists($file);
|
||||
}
|
||||
|
||||
public function getService($type)
|
||||
{
|
||||
$class = 'Box_Mod_'.ucfirst($type).'_Service';
|
||||
$file = BB_PATH_MODS . '/mod_'.$type.'/Service.php';
|
||||
$file = PATH_MODS . '/mod_'.$type.'/Service.php';
|
||||
if(!file_exists($file)){
|
||||
throw new \Box_Exception('Service class :class was not found in :path', array(':class'=>$class,':path'=>$file));
|
||||
}
|
||||
@@ -380,7 +380,7 @@ class Box_Tools
|
||||
$cacheKey = $buildCallback . ':' . implode(':', $args);
|
||||
}
|
||||
$cacheKey .= ':' . implode(':', $args);
|
||||
$file_path = BB_PATH_CACHE .DIRECTORY_SEPARATOR. md5($cacheKey);
|
||||
$file_path = PATH_CACHE .DIRECTORY_SEPARATOR. md5($cacheKey);
|
||||
|
||||
// If the file hasn't yet been created or is out of date then call the require function and store it's result.
|
||||
if(!file_exists($file_path) || filemtime($file_path) < (time() - $timeoutSeconds)){
|
||||
@@ -447,7 +447,7 @@ class Box_Tools
|
||||
public function getTable($type)
|
||||
{
|
||||
$class = 'Model_'.ucfirst($type).'Table';
|
||||
$file = BB_PATH_LIBRARY . '/Model/'.$type.'Table.php';
|
||||
$file = PATH_LIBRARY . '/Model/'.$type.'Table.php';
|
||||
if(!file_exists($file)){
|
||||
throw new \Box_Exception('Service class :class was not found in :path', array(':class'=>$class,':path'=>$file));
|
||||
}
|
||||
@@ -474,7 +474,7 @@ class Box_Tools
|
||||
}
|
||||
|
||||
public function updateConfig(){
|
||||
$configPath = BB_PATH_ROOT.'/bb-config.php';
|
||||
$configPath = PATH_ROOT.'/config.php';
|
||||
$currentConfig = include $configPath;
|
||||
|
||||
if(!is_array($currentConfig)){
|
||||
@@ -63,10 +63,10 @@ class Box_Translate implements \Box\InjectionAwareInterface
|
||||
$locale = $this->getLocale();
|
||||
$codeset = "UTF-8";
|
||||
if(!function_exists('gettext')) {
|
||||
require_once BB_PATH_LIBRARY . '/php-gettext/gettext.inc';
|
||||
require_once PATH_LIBRARY . '/php-gettext/gettext.inc';
|
||||
T_setlocale(LC_MESSAGES, $locale.'.'.$codeset);
|
||||
T_setlocale(LC_TIME, $locale.'.'.$codeset);
|
||||
T_bindtextdomain($this->domain, BB_PATH_LANGS);
|
||||
T_bindtextdomain($this->domain, PATH_LANGS);
|
||||
T_bind_textdomain_codeset($this->domain, $codeset);
|
||||
T_textdomain($this->domain);
|
||||
} else {
|
||||
@@ -81,7 +81,7 @@ class Box_Translate implements \Box\InjectionAwareInterface
|
||||
}
|
||||
setlocale(LC_MESSAGES, $locale.'.'.$codeset);
|
||||
setlocale(LC_TIME, $locale.'.'.$codeset);
|
||||
bindtextdomain($this->domain, BB_PATH_LANGS);
|
||||
bindtextdomain($this->domain, PATH_LANGS);
|
||||
if(function_exists('bind_textdomain_codeset')) bind_textdomain_codeset($this->domain, $codeset);
|
||||
textdomain($this->domain);
|
||||
|
||||
@@ -190,14 +190,14 @@ function twig_money_without_currency(Twig\Environment $env, $price, $currency =
|
||||
|
||||
function twig_mod_asset_url($asset, $mod)
|
||||
{
|
||||
return BB_URL.'bb-modules/'.ucfirst($mod).'/assets/'.$asset;
|
||||
return BB_URL.'modules/'.ucfirst($mod).'/assets/'.$asset;
|
||||
}
|
||||
|
||||
function twig_asset_url(Twig\Environment $env, $asset)
|
||||
{
|
||||
$globals = $env->getGlobals();
|
||||
|
||||
return BB_URL.'bb-themes/'.$globals['current_theme'].'/assets/'.$asset;
|
||||
return BB_URL.'themes/'.$globals['current_theme'].'/assets/'.$asset;
|
||||
}
|
||||
|
||||
function twig_img_tag($path, $alt = null)
|
||||
File renamed without changes.
@@ -163,7 +163,7 @@ class Box_Update
|
||||
|
||||
error_log('Started FOSSBilling auto-update script');
|
||||
$latest_version = $this->getLatestVersion();
|
||||
$latest_version_archive = BB_PATH_CACHE.DIRECTORY_SEPARATOR.$latest_version.'.zip';
|
||||
$latest_version_archive = PATH_CACHE.DIRECTORY_SEPARATOR.$latest_version.'.zip';
|
||||
|
||||
// download latest archive from link
|
||||
$content = $this->di['tools']->file_get_contents($this->getLatestVersionDownloadLink(), false, null, null, false);
|
||||
@@ -175,9 +175,9 @@ class Box_Update
|
||||
|
||||
// Extract latest archive on top of current version
|
||||
$ff = new Box_Zip($latest_version_archive);
|
||||
$ff->decompress(BB_PATH_ROOT);
|
||||
$ff->decompress(PATH_ROOT);
|
||||
|
||||
if(file_exists(BB_PATH_ROOT.'/foss-update.php')) {
|
||||
if(file_exists(PATH_ROOT.'/foss-update.php')) {
|
||||
error_log('Calling foss-update.php script from auto-updater');
|
||||
$this->di['tools']->file_get_contents(BB_URL.'foss-update.php');
|
||||
}
|
||||
@@ -186,9 +186,9 @@ class Box_Update
|
||||
$this->performConfigUpdate();
|
||||
|
||||
// clean up things
|
||||
$this->di['tools']->emptyFolder(BB_PATH_CACHE);
|
||||
$this->di['tools']->emptyFolder(BB_PATH_ROOT.'/install');
|
||||
rmdir(BB_PATH_ROOT.'/install');
|
||||
$this->di['tools']->emptyFolder(PATH_CACHE);
|
||||
$this->di['tools']->emptyFolder(PATH_ROOT.'/install');
|
||||
rmdir(PATH_ROOT.'/install');
|
||||
return true;
|
||||
}
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -23,7 +23,7 @@ class FileCache
|
||||
public function __construct($cacheDir = null)
|
||||
{
|
||||
if(is_null($cacheDir)) {
|
||||
$cacheDir = BB_PATH_CACHE;
|
||||
$cacheDir = PATH_CACHE;
|
||||
}
|
||||
|
||||
if ($cacheDir) {
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 1485 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user