Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Patriboom committed Sep 8, 2022
2 parents 3ddeb91 + e432065 commit f6f1c46
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 181 deletions.
61 changes: 33 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ If your version is older than september 2018
## Requirements:

- Tested on: Apache, IIS;
- PHP 7.4+; (since 2022/05/05, PHP 7.3 and lower are no longer supported)
- PHP 7.4+, 8.0, 8.1;
- since July 2022: PHP 7.3 and lower are no longer supported
- since Sept 2022: PHP 8.1 tested and approved, 8.2 not tested but should work
- MySQL 5+;
- PDO Extension for PHP (MySQL);
- MCrypt Extension for PHP : soon MCrypt will be removed from Bugs project;
- Javascript Enabled - Bugs also heavily uses Javascript.
- PHP rewrite module

Expand All @@ -64,28 +65,16 @@ Then, push your modifications through a new branch. NEVER push on master.

# Changelog
- v.1.9 : Calendar for user`s tasks (started on July 2022)
- Sep 2022: install process totaly rebuilt
- Sep 2022: tags shown with the user`s language
- Sep 2022: ready for PHP 8.1
- Jul 2022: MCrypt Extension for PHP removed from Bugs project --- files are still present ... in case.
- v.1.8 : Responsive template. Now matches the window size wherever you use BUG ( tablet, phone, computer )
- built during summer 2019, first release on Sept 29th
- includes the very first searching tools which scan all projects and all issues for regular expression
- Nov 2019: attach files form the issue creating menu
- Nov 2019: wysiwyg editor problems fixed; it could work on every comment
- Nov 2019: you can move issue from project A to project B if you have access to both projects
- Jan 2021 : no more reference to FlashPlayer (rev 2).
- Feb 2021: One can move ticket from project A to project B and assigns the ticket to a B's member (rev 3).
- Mar 2021: Owner can change the Ticket's status when he comments it (rev 3).
- Mar 2021: Reader can no longer edit ticket, nor watch stats (rev 3).
- Mar 2021: Search field now will search also into comments' content ( not only title or projects' name (rev 3).
- Mar 2021: Comment and close at once - new button added (rev 3).
- Arp 2021: User can follow project / ticket and receive email when something appends (rev 4).
- May 2021: Admin may change some options and edit texts sent when activity occurs in issue or project (rev 5).
- Aug 2021: BUGS can no more work under PHP 7.0; PHP 7.3 is now minimal requirement
- Sep 2021: install process now includes creation of first project and first ticket
- Oct 2021: Admin may manage many more options, even the way BUGS shows error on screen or by email; ready for PHP 8 (rev 6)
- Nov 2021: Project member may ask BUGS to count his worktime spent on specific ticket ( punch in, punch out ) so your company may charge accordingly the client (rev 7)
- Dec 2021: Acitivites report - what every single user have done (rev 7)
- Dec 2021: Dark templates B-> with touch of blue G-> with touche of green R-> with touch of red/orange (rev 7)
- Feb 2022: While install, you'll skip some (apparently) useless steps
- Feb 2022: Ending the install: the new issue you'll create will now show among the « open issues » list
- May 2022: final release released: all is working good
- Apr 2022: backcolor of tickets and projects reacts to your mouse movements
- Apr 2022: entire access to project history
- Mar 2022: lot more informations logged ( tracability of activities as well as bugs)
- Mar 2022: Recover forgotten password
- Feb 2022: Default creator_id forced onto new issue
- Feb 2022: Connection notice sent to whichever admin who asked it.
- Feb 2022: Pop-up when adding or supressing tags on issue does now dispear properly
Expand All @@ -94,11 +83,27 @@ Then, push your modifications through a new branch. NEVER push on master.
- Feb 2022: User's role managed from project window
- Feb 2022: User's roles managed in user's window
- Feb 2022: The admin may now define a password when he creates a new user
- Mar 2022: lot more informations logged ( tracability of activities as well as bugs)
- Mar 2022: Recover forgotten password
- Apr 2022: backcolor of tickets and projects reacts to your mouse movements
- Apr 2022: entire access to project history
- May 2022: final release released: all is working good
- Feb 2022: Ending the install: the new issue you'll create will now show among the « open issues » list
- Feb 2022: While install, you'll skip some (apparently) useless steps
- Dec 2021: Dark templates B-> with touch of blue G-> with touche of green R-> with touch of red/orange (rev 7)
- Dec 2021: Acitivites report - what every single user have done (rev 7)
- Nov 2021: Project member may ask BUGS to count his worktime spent on specific ticket ( punch in, punch out ) so your company may charge accordingly the client (rev 7)
- Oct 2021: Admin may manage many more options, even the way BUGS shows error on screen or by email; ready for PHP 8 (rev 6)
- Sep 2021: install process now includes creation of first project and first ticket
- Aug 2021: BUGS can no more work under PHP 7.0; PHP 7.3 is now minimal requirement
- May 2021: Admin may change some options and edit texts sent when activity occurs in issue or project (rev 5).
- Arp 2021: User can follow project / ticket and receive email when something appends (rev 4).
- Mar 2021: Comment and close at once - new button added (rev 3).
- Mar 2021: Search field now will search also into comments' content ( not only title or projects' name (rev 3).
- Mar 2021: Reader can no longer edit ticket, nor watch stats (rev 3).
- Mar 2021: Owner can change the Ticket's status when he comments it (rev 3).
- Feb 2021: One can move ticket from project A to project B and assigns the ticket to a B's member (rev 3).
- Jan 2021 : no more reference to FlashPlayer (rev 2).
- Nov 2019: you can move issue from project A to project B if you have access to both projects
- Nov 2019: wysiwyg editor problems fixed; it could work on every comment
- Nov 2019: attach files form the issue creating menu
- includes the very first searching tools which scan all projects and all issues for regular expression
- built during summer 2019, first release on Sept 29th
- v.1.7 : July 2019
- reports are now totally integrated to BUGS which produces pdf files
- v.1.6 : February 2019
Expand Down
4 changes: 2 additions & 2 deletions app/application/config/tinyissue.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
return array(
'release_date' => '05-09-2022',
'release_date' => '08-09-2022',
'version' => '1.9',
'release' => '1d'
'release' => '1f'
);
25 changes: 14 additions & 11 deletions app/application/views/layouts/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,32 @@
include $prefixe."app/application/language/all.php";
$lng = in_array(strtolower(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2)), array_flip($Language)) ? strtolower(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2)) : "en";
if (file_exists($prefixe."install/config-setup.php")) { unlink ($prefixe."install/config-setup.php"); }

//Auto-update the database if conditions are fullfilled
if (isset($_SERVER ["REDIRECT_SCRIPT_URL"]) && isset($_GET["MAJsql"])) {
if (substr($_SERVER ["REDIRECT_SCRIPT_URL"], 0, -5) == substr($_SERVER["PHP_SELF"], 0, -9) && substr($_SERVER ["REDIRECT_SCRIPT_URL"], -5) == 'login' && trim($_GET["MAJsql"]) != '' && substr($_GET["MAJsql"], 0, 7) == 'update_' && substr($_GET["MAJsql"], -4) == '.sql') {
\Administration::AjourStructureBase("login");
}
}

//Vérification de la présence de toutes les tables
$files = scandir("../install");
$LaDate = date("Y-m-d H:i:s");
foreach ($files as $i => $file) {
if (is_dir("../install".$file)) { continue; }
elseif (substr($file, 0, 10) != 'DB_Schema_') { continue; }
elseif (substr($file, 0, 10) == 'DB_Schema_' && substr($file, -4) == '.php') {
elseif (substr($file, 0, 10) == 'DB_Schema_' && substr($file, -4) == '.php') {
$nameTable = substr($file, 10);
$ceci = substr($nameTable, 0, -4);
if (!\DB::table($ceci)) {
include "../install".$file;
}
try {
\DB::table($ceci)->select(array("test" => "Patate"))->first();
} catch (Exception $ex) {
echo 'Il faut créer manuellement la table '.$ceci.'<br />';
}
unset($ceci, $nameTable);
} else { continue; }
}

//Auto-update the database if conditions are fullfilled
if (isset($_SERVER ["REDIRECT_SCRIPT_URL"]) && isset($_GET["MAJsql"])) {
if (substr($_SERVER ["REDIRECT_SCRIPT_URL"], 0, -5) == substr($_SERVER["PHP_SELF"], 0, -9) && substr($_SERVER ["REDIRECT_SCRIPT_URL"], -5) == 'login' && trim($_GET["MAJsql"]) != '' && substr($_GET["MAJsql"], 0, 7) == 'update_' && substr($_GET["MAJsql"], -4) == '.sql') {
\Administration::AjourStructureBase("login");
}
}

?>
<!DOCTYPE html>
<html>
Expand Down
42 changes: 13 additions & 29 deletions app/laravel/crypterMcrypt.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ class Crypter {
* @param string $value
* @return string
*/
public static function encrypt($value)
{
public static function encrypt($value) {
$iv = mcrypt_create_iv(static::iv_size(), static::randomizer());

$value = static::pad($value);
Expand All @@ -48,8 +47,7 @@ public static function encrypt($value)
* @param string $value
* @return string
*/
public static function decrypt($value)
{
public static function decrypt($value) {
$value = base64_decode($value);

// To decrypt the value, we first need to extract the input vector and
Expand All @@ -74,26 +72,20 @@ public static function decrypt($value)
*
* @return int
*/
public static function randomizer()
{
public static function randomizer() {
// There are various sources from which we can get random numbers
// but some are more random than others. We'll choose the most
// random source we can for this server environment.
if (defined('MCRYPT_DEV_URANDOM'))
{
if (defined('MCRYPT_DEV_URANDOM')) {
return MCRYPT_DEV_URANDOM;
}
elseif (defined('MCRYPT_DEV_RANDOM'))
{
} elseif (defined('MCRYPT_DEV_RANDOM')) {
return MCRYPT_DEV_RANDOM;
}
// When using the default random number generator, we'll seed
// the generator on each call to ensure the results are as
// random as we can possibly get them.
else
{
else {
mt_srand();

return MCRYPT_RAND;
}
}
Expand All @@ -103,8 +95,7 @@ public static function randomizer()
*
* @return int
*/
protected static function iv_size()
{
protected static function iv_size() {
return mcrypt_get_iv_size(static::$cipher, static::$mode);
}

Expand All @@ -114,10 +105,8 @@ protected static function iv_size()
* @param string $value
* @return string
*/
protected static function pad($value)
{
protected static function pad($value) {
$pad = static::$block - (Str::length($value) % static::$block);

return $value .= str_repeat(chr($pad), $pad);
}

Expand All @@ -127,25 +116,21 @@ protected static function pad($value)
* @param string $value
* @return string
*/
protected static function unpad($value)
{
protected static function unpad($value) {
$pad = ord($value[($length = Str::length($value)) - 1]);

if ($pad and $pad < static::$block)
{
if ($pad and $pad < static::$block) {
// If the correct padding is present on the string, we will remove
// it and return the value. Otherwise, we'll throw an exception
// as the padding appears to have been changed.
if (preg_match('/'.chr($pad).'{'.$pad.'}$/', $value))
{
if (preg_match('/'.chr($pad).'{'.$pad.'}$/', $value)) {
return substr($value, 0, $length - $pad);
}

// If the padding characters do not match the expected padding
// for the value we'll bomb out with an exception since the
// encrypted value seems to have been changed.
else
{
else {
throw new \Exception("Decryption error. Padding is invalid.");
}
}
Expand All @@ -158,8 +143,7 @@ protected static function unpad($value)
*
* @return string
*/
protected static function key()
{
protected static function key() {
return Config::get('application.key');
}

Expand Down
28 changes: 9 additions & 19 deletions app/laravel/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ class Database {
* @param string $connection
* @return Database\Connection
*/
public static function connection($connection = null)
{
public static function connection($connection = null) {
if (is_null($connection)) $connection = Config::get('database.default');

if ( ! isset(static::$connections[$connection]))
Expand All @@ -61,8 +60,7 @@ public static function connection($connection = null)
* @param array $config
* @return PDO
*/
protected static function connect($config)
{
protected static function connect($config) {
return static::connector($config['driver'])->connect($config);
}

Expand All @@ -72,8 +70,7 @@ protected static function connect($config)
* @param string $driver
* @return Database\Connectors\Connector
*/
protected static function connector($driver)
{
protected static function connector($driver) {
if (isset(static::$registrar[$driver]))
{
$resolver = static::$registrar[$driver]['connector'];
Expand Down Expand Up @@ -107,8 +104,7 @@ protected static function connector($driver)
* @param string $connection
* @return Database\Query
*/
public static function table($table, $connection = null)
{
public static function table($table, $connection = null) {
return static::connection($connection)->table($table);
}

Expand All @@ -120,8 +116,7 @@ public static function table($table, $connection = null)
* @param string $value
* @return Expression
*/
public static function raw($value)
{
public static function raw($value) {
return new Expression($value);
}

Expand All @@ -130,8 +125,7 @@ public static function raw($value)
*
* @return array
*/
public static function profile()
{
public static function profile() {
return Database\Connection::$queries;
}

Expand All @@ -142,8 +136,7 @@ public static function profile()
*
* @return string
*/
public static function last_query()
{
public static function last_query() {
return end(Database\Connection::$queries);
}

Expand All @@ -156,10 +149,8 @@ public static function last_query()
* @param Closure $schema
* @return void
*/
public static function extend($name, Closure $connector, $query = null, $schema = null)
{
public static function extend($name, Closure $connector, $query = null, $schema = null) {
if (is_null($query)) $query = '\Laravel\Database\Query\Grammars\Grammar';

static::$registrar[$name] = compact('connector', 'query', 'schema');
}

Expand All @@ -174,8 +165,7 @@ public static function extend($name, Closure $connector, $query = null, $schema
* $users = DB::table('users')->get();
* </code>
*/
public static function __callStatic($method, $parameters)
{
public static function __callStatic($method, $parameters) {
return call_user_func_array(array(static::connection(), $method), $parameters);
}

Expand Down
22 changes: 17 additions & 5 deletions app/laravel/database/connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,18 +226,30 @@ protected function execute($sql, $bindings = array()) {
// set the message to include the SQL and query bindings.
try {
$statement = $this->pdo->prepare($sql);

$start = microtime(true);

$result = $statement->execute($bindings);
}
// If an exception occurs, we'll pass it into our custom exception
// and set the message to include the SQL and query bindings so
// debugging is much easier on the developer.
catch (\Exception $exception) {
$exception = new Exception($sql, $bindings, $exception);

throw $exception;
$posi = strpos($exception, "Base table or view not found").'<br />';
if ($posi > 0 && substr($sql, 0, 15) == 'SELECT `Patate`') {
$LaTable = substr($sql, 22, strpos($sql, "LIMIT")-24);
include "../install/DB_Schema_".$LaTable.".php";
echo 'Nous avons créé la table <b>'.$LaTable.'</b><br />';
$statement = $this->pdo->prepare("SELECT * FROM ".$LaTable);
$start = microtime(true);
$result = $statement->execute($bindings);
} elseif (strpos($exception, "Column not found: 1054 Unknown column 'Patate'") > 0) {
$LaTable = substr($sql, 22, strpos($sql, "LIMIT")-24);
$statement = $this->pdo->prepare("SELECT * FROM ".$LaTable);
$start = microtime(true);
$result = $statement->execute($bindings);
} else {
$exception = new Exception($sql, $bindings, $exception);
throw $exception;
}
}

// Once we have executed the query, we log the SQL, bindings, and
Expand Down
Loading

0 comments on commit f6f1c46

Please sign in to comment.