Skip to content

Commit

Permalink
Merge branch '3.0'
Browse files Browse the repository at this point in the history
* 3.0:
  Fixed correct path to web font files
  Added some new lines
  Fixed possible errors when creating a SQLite database
  Wording
  chore(package): update lockfile yarn.lock
  chore(package): update husky to version 4.0.2
  • Loading branch information
thorsten committed Jan 11, 2020
2 parents 61e0120 + 983051e commit 54c63dc
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 113 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ information.

## Installation

### phpMyFAQ package for end-users
### phpMyFAQ installation package for end-users

The best way to install phpMyFAQ is to download it on [phpmyfaq.de](https://www.phpmyfaq.de/download),
unzip the package and open http://www.example.org/phpmyfaq/setup/index.php
in your browser.

### phpMyFAQ with Docker
### phpMyFAQ installation with Docker

#### Dockerfile

Expand Down Expand Up @@ -116,7 +116,7 @@ The vm.max_map_count setting must be set via docker-machine:
$ docker-machine ssh
$ sudo sysctl -w vm.max_map_count=262144

### Git for developers
### phpMyFAQ installation from Github

$ git clone git://github.com/thorsten/phpMyFAQ.git
$ cd phpMyFAQ
Expand All @@ -131,9 +131,11 @@ Then just open http://www.example.org/phpmyfaq/setup/index.php in your browser.

## Testing

To run our unit tests via PHPUnit v5.x, just execute this command on your CLI
To run our unit tests via PHPUnit v8.x, just execute this command on your CLI

$ ./bin/phpunit
$ curl -s https://getcomposer.org/installer | php
$ php composer.phar install
$ ./vendor/bin/phpunit

Please note that phpMyFAQ needs to be installed via Composer.

Expand Down Expand Up @@ -167,7 +169,7 @@ Please check out our page about contributing on [phpmyfaq.de](https://www.phpmyf

You can find the full documentation on [phpmyfaq.de](https://www.phpmyfaq.de/documentation).

## API
## REST API v2

The REST API v2 documentation is located [here in this repository](API.md) and also on
[phpmyfaq.de](https://www.phpmyfaq.de/documentation).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"copy-webpack-plugin": "^5.1.1",
"css-loader": "^3.4.0",
"file-loader": "^5.0.2",
"husky": "^3.1.0",
"husky": "^4.0.2",
"mini-css-extract-plugin": "^0.9.0",
"node-sass": "^4.13.0",
"prettier": "1.19.1",
Expand Down
7 changes: 7 additions & 0 deletions phpmyfaq/setup/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,29 @@
use phpMyFAQ\Installer;
use phpMyFAQ\Strings;
use phpMyFAQ\System;

define('COPYRIGHT', '&copy; 2001-2019 <a href="https://www.phpmyfaq.de/">phpMyFAQ Team</a> | Follow us on <a href="http://twitter.com/phpMyFAQ">Twitter</a> ');
define('PMF_ROOT_DIR', dirname(dirname(__FILE__)));
define('PMF_SRC_DIR', PMF_ROOT_DIR.'/src');
define('IS_VALID_PHPMYFAQ', null);

if (version_compare(PHP_VERSION, '7.2.0') < 0) {
die('Sorry, but you need PHP 7.2.0 or later!');
}

set_time_limit(0);

if (!defined('DEBUG')) {
define('DEBUG', true);
}

session_name('phpmyfaq-setup');
session_start();

require PMF_ROOT_DIR.'/src/libs/autoload.php';
require PMF_ROOT_DIR.'/config/constants.php';
require PMF_ROOT_DIR.'/config/constants_elasticsearch.php';

$loader = new ClassLoader();
$loader->add('phpMyFAQ', PMF_SRC_DIR);
$loader->register()
Expand Down
4 changes: 2 additions & 2 deletions phpmyfaq/src/phpMyFAQ/Database/Sqlite3.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ class Sqlite3 implements DatabaseDriver
* @param int|null $port
* @return null|bool
*/
public function connect($host, $user, $passwd, $db = '', $port = null)
public function connect($host, $user = '', $passwd = '', $db = '', $port = null)
{
$this->conn = new \SQLite3($host);
$this->conn = new \Sqlite3($host);

if (!$this->conn) {
Database::errorPage($this->conn->lastErrorMsg());
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ module.exports = {
options: {
name: '[name].[ext]',
outputPath: 'fonts/',
publicPath: './fonts/',
},
},
],
Expand Down

0 comments on commit 54c63dc

Please sign in to comment.