Skip to content
Permalink
Browse files

Removal of data directory

  • Loading branch information...
Thoulah committed Mar 10, 2019
1 parent 96d03b0 commit cf0e8c5f256ab476b52a8140cb2a734ec4e72634
@@ -3,10 +3,10 @@ $("#pwdToggle button").on('click', function(event) {
this.status = 3;
});
event.preventDefault();
if ($('#pwdToggle input').attr('type') == 'text') {
if ($('#pwdToggle input').attr('type') === 'text') {
$('#pwdToggle input').attr('type', 'password');
$(this).prop('title', togglePassword.lang.show);
} else if($('#pwdToggle input').attr('type') == 'password') {
} else if($('#pwdToggle input').attr('type') === 'password') {
$('#pwdToggle input').attr('type', 'text');
$(this).prop('title', togglePassword.lang.hide);
}
@@ -1,6 +1,6 @@
<?php
$secrets = require(__DIR__.'/secrets.php');
$params = require(__DIR__.'/params.php');
$secrets = require __DIR__.'/secrets.php';
$params = require __DIR__.'/params.php';
return [
'aliases' => [
@@ -50,7 +50,7 @@
'charset' => 'utf8',
'tablePrefix' => 'mister42_',
'attributes' => [
PDO::MYSQL_ATTR_LOCAL_INFILE => true,
\PDO::MYSQL_ATTR_LOCAL_INFILE => true,
],
'enableSchemaCache' => true,
'schemaCache' => 'fileCache',
@@ -132,7 +132,7 @@
],
'language' => 'en',
'name' => 'Mr.42',
'params' => require(__DIR__.'/params.php'),
'params' => $params,
'runtimePath' => __DIR__.'/../../../.cache/yii/mister42',
'timeZone' => 'Europe/Berlin',
'vendorPath' => __DIR__.'/../../vendor',

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -67,8 +67,43 @@ public function generate(): bool {
}
public static function getTypes(bool $rules = false): array {
foreach (require(Yii::getAlias('@app/data/barcodeTypes.php')) as $name => $value)
$barcodes = [
'ISBN / ISSN / EAN 13' => 'EAN13',
'UPC-A' => 'UPCA',
'UPC-E' => 'UPCE',
'2-Digits UPC-Based Extention' => 'EAN2',
'5-Digits UPC-Based Extention' => 'EAN5',
'EAN 8' => 'EAN8',
'IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200' => 'IMB',
'RM4SCC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code)' => 'RM4SCC',
'KIX (Klant index - Customer index)' => 'KIX',
'POSTNET' => 'POSTNET',
'PLANET' => 'PLANET',
'CODE 93 - USS-93' => 'C93',
'CODE 11' => 'CODE11',
'MSI (Variation of Plessey code)' => 'MSI',
'MSI with Checksum (modulo 11)' => 'MSI+',
'CODABAR' => 'CODABAR',
'CODE 128 A' => 'C128A',
'CODE 128 B' => 'C128B',
'CODE 128 C' => 'C128C',
'EAN 128 A' => 'EAN128A',
'EAN 128 B' => 'EAN128B',
'EAN 128 C' => 'EAN128C',
'CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.' => 'C39',
'CODE 39 with Checksum' => 'C39+',
'CODE 39 Extended' => 'C39E',
'CODE 39 Extended with Checksum' => 'C39E+',
'Standard 2 of 5' => 'S25',
'Standard 2 of 5 with Checksum' => 'S25+',
'Interleaved 2 of 5' => 'I25',
'Interleaved 2 of 5 with Checksum' => 'I25+',
'Interleaved 2 of 5 with Bearer Bars' => 'I25B',
'Interleaved 2 of 5 with Bearer Bars and Checksum' => 'I25B+',
];
foreach ($barcodes as $name => $value)
$list[$value] = $rules ? $value : $name;
return $list ?? [];
return $list;
}
}
@@ -94,18 +94,34 @@ public static function getWifiAuthentication(bool $rules = false): array {
}
public static function getTypes(bool $rules = false): array {
$qrCodes = [
'Bitcoin' => Yii::t('mr42', 'Bitcoin'),
'Bookmark' => Yii::t('mr42', 'Bookmark'),
'EmailMessage' => Yii::t('mr42', 'Email Message'),
'FreeInput' => Yii::t('mr42', 'Free Input'),
'Geographic' => Yii::t('mr42', 'Geographic'),
'Ical' => Yii::t('mr42', 'iCal'),
'MailTo' => Yii::t('mr42', 'Mail To'),
'MeCard' => Yii::t('mr42', 'MeCard'),
'MMS' => Yii::t('mr42', 'MMS'),
'Phone' => Yii::t('mr42', 'Phone'),
'SMS' => Yii::t('mr42', 'SMS'),
'Vcard' => Yii::t('mr42', 'vCard'),
'WiFi' => Yii::t('mr42', 'WiFi'),
'YouTube' => Yii::t('mr42', 'YouTube'),
];
$dir = Yii::getAlias('@app/models/tools/qr');
$rename = require(Yii::getAlias('@app/data/qrTypes.php'));
foreach (FileHelper::findFiles($dir, ['only' => ['*.php']]) as $file)
$typeList[basename($file, '.php')] = $rules ? basename($file, '.php') : strtr(basename($file, '.php'), $rename);
$typeList[basename($file, '.php')] = $rules ? basename($file, '.php') : strtr(basename($file, '.php'), $qrCodes);
natcasesort($typeList);
return $typeList;
}
public function getDataOrOmit(string $label, string $value, string $glue = '') {
public function getDataOrOmit(string $label, string $value, string $glue = ''): ?string {
if ($value)
return $label.$value.$glue;
return false;
return null;
}
}
@@ -1,5 +1,5 @@
<?php
$secrets = require(__DIR__.'/secrets.php');
$secrets = require __DIR__.'/secrets.php';
$config = [
'id' => 'mister42',
@@ -9,8 +9,8 @@ public function __construct(bool $debug = false) {
endif;
header_remove("X-Powered-By");
require(__DIR__.'/../../vendor/autoload.php');
require(__DIR__.'/../../vendor/yiisoft/yii2/Yii.php');
require __DIR__.'/../../vendor/autoload.php';
require __DIR__.'/../../vendor/yiisoft/yii2/Yii.php';
$app = new \yii\web\Application($this->getConfig());
$app->run();
@@ -28,8 +28,8 @@ private function getConfig(): array {
private function loadConfig(array $dir): array {
$webConfig = $dir[1] ?? $dir[0];
return \yii\helpers\ArrayHelper::merge(
require(__DIR__.'/../'.$dir[0].'/common.php'),
require(__DIR__.'/../'.$webConfig.'/web.php')
require __DIR__.'/../'.$dir[0].'/common.php',
require __DIR__.'/../'.$webConfig.'/web.php'
);
}
}

0 comments on commit cf0e8c5

Please sign in to comment.
You can’t perform that action at this time.