Skip to content

Commit

Permalink
Sync with Slawkens master branch (v0.8.16) (slawkens#11)
Browse files Browse the repository at this point in the history
* Update common.php

* Create SECURITY.md

* Adding .env support (slawkens#1)

* - adding composer

* - adding .env support

* Revert "Adding .env support (slawkens#1)"

This reverts commit 79c570c.

* Cleanup install folder (slawkens#7)

* Adding .env support  (slawkens#2)

* - adding composer

* - adding .env support

* Improve DotEnv and fix e-mail settings  (slawkens#3)

* - revert changes on config.php, add config.local.php

* - adding missing account e-mails settings

* - adding check before flush buffer (slawkens#4)

* - raw import myaac-gesior-shop-system-v5.0-beta.2

* Fresh install (slawkens#5)

* - adding hidden ids

* - hiding template

* - removing katherine template

* - moving game server files to a specific folder

* Revert "Cleanup install folder (slawkens#7)"

This reverts commit e8693bc.

* Silently ignore if the hook does not exist

* - adding check before flush buffer (slawkens#245)

* Fix installation

* Remove 31.php migration -> was for develop branch

* Seems that this is better solution to the slawkens#245 (output buffering)

This works for both, when output_buffering is enabled, and disabled

* Fix broken installation I introduced in 0.8.15

* Revert "Fix installation"

This reverts commit 9c318f9.

* Release v0.8.16

* Fix date

---------

Co-authored-by: slawkens <slawkens@gmail.com>
  • Loading branch information
danilopucci and slawkens authored Feb 14, 2024
1 parent 4df5c40 commit 58a7180
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 19 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.8.16 - 12.02.2024]

### Fixed
* broken installation
* database and finish step warnings/errors (https://github.com/slawkens/myaac/pull/245, @danilopucci)
* silently ignore if the hook does not exist

## [0.8.15 - 09.12.2023]

More security fixes, especially in bugtracker.
Expand Down
16 changes: 16 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Security Policy

## Supported Versions

| Version | Supported |
| ------- | ------------------ |
| 1.x.y | :white_check_mark: |
| 0.9.x | :x: |
| 0.8.x | :white_check_mark: |
| < 0.7 | :x: |

## Reporting a Vulnerability

If you found a security vulnerability, please write an email to security@my-aac.org

All reports will be taken very seriously, and a fix will be posted as soon as possible.
4 changes: 2 additions & 2 deletions common.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
if (version_compare(phpversion(), '7.2.5', '<')) die('PHP version 7.2.5 or higher is required.');

define('MYAAC', true);
define('MYAAC_VERSION', '0.8.15');
define('MYAAC_VERSION', '0.8.16');
define('DATABASE_VERSION', 33);
define('TABLE_PREFIX', 'myaac_');
define('START_TIME', microtime(true));
Expand Down Expand Up @@ -100,7 +100,7 @@
$basedir = str_replace(array('/admin', '/install', '/tools'), '', $basedir);
define('BASE_DIR', $basedir);

if (file_exists(BASE . 'config.local.php')) {
if (file_exists(BASE . 'config.local.php') && !defined('MYAAC_INSTALL')) {
require BASE . 'config.local.php';
}

Expand Down
17 changes: 1 addition & 16 deletions system/migrations/31.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
<?php

if(!$db->hasColumn(TABLE_PREFIX . 'monsters', 'elements')) {
$db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `elements` TEXT NOT NULL AFTER `immunities`;");
$db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `pushable` TINYINT(1) NOT NULL DEFAULT '0' AFTER `convinceable`;");
$db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `canpushitems` TINYINT(1) NOT NULL DEFAULT '0' AFTER `pushable`;");
$db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `canpushcreatures` TINYINT(1) NOT NULL DEFAULT '0' AFTER `canpushitems`;");
$db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `canwalkonenergy` TINYINT(1) NOT NULL DEFAULT '0' AFTER `canpushitems`;");
$db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `canwalkonpoison` TINYINT(1) NOT NULL DEFAULT '0' AFTER `canwalkonenergy`;");
$db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `canwalkonfire` TINYINT(1) NOT NULL DEFAULT '0' AFTER `canwalkonpoison`;");
$db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `runonhealth` TINYINT(1) NOT NULL DEFAULT '0' AFTER `canwalkonfire`;");
$db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `hostile` TINYINT(1) NOT NULL DEFAULT '0' AFTER `runonhealth`;");
$db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `attackable` TINYINT(1) NOT NULL DEFAULT '0' AFTER `hostile`;");
$db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `rewardboss` TINYINT(1) NOT NULL DEFAULT '0' AFTER `attackable`;");
$db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `defense` INT(11) NOT NULL DEFAULT '0' AFTER `rewardboss`;");
$db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `armor` INT(11) NOT NULL DEFAULT '0' AFTER `defense`;");
$db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `summons` TEXT NOT NULL AFTER `loot`;");
}
// removed, but kept for compatibility
9 changes: 8 additions & 1 deletion system/twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@
global $hooks;

if(is_string($hook)) {
$hook = constant($hook);
if (defined($hook)) {
$hook = constant($hook);
}
else {
// plugin/template has a hook that this version of myaac does not support
// just silently return
return;
}
}

$params['context'] = $context;
Expand Down

0 comments on commit 58a7180

Please sign in to comment.