namespace wcf\system\package\plugin;
use wcf\data\option\Option;
use wcf\data\option\OptionEditor;
+use wcf\data\package\Package;
use wcf\system\exception\SystemException;
use wcf\system\WCF;
// result was 'false' thus create a new item
if (!$row) {
+ // set the value of 'app_install_date' to the current timestamp
+ if ($hidden && $optionType == 'integer' && $this->installation->getPackage()->isApplication) {
+ $abbreviation = Package::getAbbreviation($this->installation->getPackage()->package);
+ if ($optionName == $abbreviation.'_install_date') {
+ $defaultValue = TIME_NOW;
+ }
+ }
+
$data['optionName'] = $optionName;
$data['packageID'] = $this->installation->getPackageID();
$data['optionValue'] = $defaultValue;