Skip to content

Commit

Permalink
Merge pull request #100 from Shirisu/bugfix-deckupload
Browse files Browse the repository at this point in the history
bugfix - card deck upload with more than 20 cards
  • Loading branch information
Shirisu authored May 2, 2021
2 parents 9f984c5 + 13667ab commit dd49176
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Push every request to index.php
RewriteRule . index.php [QSA,L]
RewriteRule . index.php [QSA,L]

php_value max_file_uploads 50
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ It's written in PHP and uses jQuery and plain CSS.

It's based on the concept and script of "Tasty TCG" from 2016 but it's almost completely reworked.

Current version: 2.5.0
Current version: 2.5.1

[Documentation - how to use autoPetiteTCGScript](https://github.com/Shirisu/autoPetiteTCGScript/blob/master/DOCUMENTATION.md)

Expand Down
4 changes: 2 additions & 2 deletions admin/carddeck_add.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
move_uploaded_file($file['tmp_name'], $card_folder."/".$carddeck_name."/".$carddeck_name."master.".TCG_CARDS_FILE_TYPE);
chmod($card_folder."/".$carddeck_name."/".$carddeck_name."master.".TCG_CARDS_FILE_TYPE, 0665);
}
for ($i = 1; $i <= TCG_CARDDECK_MAX_CARDS ; $i++) {
for ($i = 1; $i <= TCG_CARDDECK_MAX_CARDS; $i++) {
$file = $_FILES['cardFile' . $i];
if (!empty($file['name'])) {
move_uploaded_file($file['tmp_name'], $card_folder . "/" . $carddeck_name . "/" . $carddeck_name . sprintf("%'.02d", $i) . "." . TCG_CARDS_FILE_TYPE);
Expand Down Expand Up @@ -209,7 +209,7 @@
</div>
</div>
<?php
for ($i = 1; $i <= TCG_CARDDECK_MAX_CARDS ; $i++) {
for ($i = 1; $i <= TCG_CARDDECK_MAX_CARDS; $i++) {
?>
<div class="form-group col col-12 col-md-6 mb-2">
<div class="input-group">
Expand Down
4 changes: 2 additions & 2 deletions admin/carddeck_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
</div>
<input type="text" class="form-control" id="carddeck_series" name="carddeck_series"
aria-describedby="ariaDescribedbySeries" maxlength="255"
value="<?php echo $carddeck_series; ?>" required/>
value="<?php echo stripslashes($carddeck_series); ?>" required/>
</div>
</div>
<div class="form-group col col-12 col-md-6 mb-2">
Expand Down Expand Up @@ -354,7 +354,7 @@ class="btn btn-primary"><?php echo TRANSLATIONS[$GLOBALS['language']]['general']
FROM carddeck
JOIN carddeck_cat ON carddeck_cat = carddeck_cat_id
JOIN carddeck_sub_cat ON carddeck_sub_cat = carddeck_sub_cat_id
ORDER BY carddeck_name";
ORDER BY carddeck_id DESC";
$result = mysqli_query($link, $sql) OR die(mysqli_error($link));
$count = mysqli_num_rows($result);
if ($count) {
Expand Down
2 changes: 1 addition & 1 deletion inc/translations/de.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
'text_inactive' => 'inaktiv',
'text_language' => 'Sprache',
'text_language_de' => 'deutsch',
'text_language_en' => 'english',
'text_language_en' => 'englisch',
'text_lastactive' => 'Letzte Aktivit&auml;t',
'text_lastlogin' => 'Letzte Anmeldung',
'text_level_overview' => 'Level&uuml;bersicht',
Expand Down

0 comments on commit dd49176

Please sign in to comment.