Skip to content

Commit

Permalink
V1.8.2
Browse files Browse the repository at this point in the history
Captcha Fehler behoben
Neue Einträge (Backend) automatisch Freigeben
  • Loading branch information
hhunderter committed Sep 6, 2023
1 parent 036bb50 commit da2962a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 33 deletions.
11 changes: 9 additions & 2 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Config extends \Ilch\Config\Install
{
public $config = [
'key' => 'radiohoerercharts',
'version' => '1.8.1',
'version' => '1.8.2',
'icon_small' => 'fa-solid fa-list-ol',
'author' => 'Reilard, Dennis alias hhunderter',
'link' => 'https://github.com/hhunderter/radiohoerercharts',
Expand Down Expand Up @@ -351,11 +351,18 @@ public function getUpdate(string $installedVersion): string
}
// no break
case "1.8.1":
// update zu 1.8.2
/*
* Captcha Fehler behoben
* Neue einträge (Backend) automatisch Freigeben
*/
// no break
case "1.8.2":
// update zu 1.?.?
/*
*/
// no break
}
return 'Update function executed.';
return '"' . $this->config['key'] . '" Update-function executed.';
}
}
4 changes: 1 addition & 3 deletions controllers/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ public function treatAction()
->setVotes(0)
->setDateCreate($datenow);

$id = $hoererchartssuggestionMapper->save($hoererchartsModel);

$this->addMessage($id);
$hoererchartssuggestionMapper->save($hoererchartsModel);

$this->redirect()
->withMessage('saveSuccess')
Expand Down
2 changes: 0 additions & 2 deletions controllers/admin/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ public function indexAction()
foreach ($this->getRequest()->getPost('check_entries') as $entryId) {
$hoererchartsModel = $hoererchartssuggestionMapper->getEntryById($entryId);
$hoererchartsModel->setId(0);
$hoererchartsModel->setSetFree(0);
$hoererchartsMapper->save($hoererchartsModel);
$hoererchartssuggestionMapper->delete($entryId);
}
Expand Down Expand Up @@ -347,7 +346,6 @@ public function suggestionenableAction()
if ($this->getRequest()->isSecure()) {
$hoererchartsModel = $hoererchartssuggestionMapper->getEntryById($this->getRequest()->getParam('id'));
$hoererchartsModel->setId(0);
$hoererchartsModel->setSetFree(0);
$hoererchartsMapper->save($hoererchartsModel);
$hoererchartssuggestionMapper->delete($this->getRequest()->getParam('id'));

Expand Down
2 changes: 1 addition & 1 deletion models/HoererCharts.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class HoererCharts extends \Ilch\Model
*
* @var bool
*/
protected $setfree = false;
protected $setfree = true;

/**
* The Interpret.
Expand Down
40 changes: 15 additions & 25 deletions views/index/treat.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,23 @@
value="<?=$this->escape($this->originalInput('songtitel')) ?>" />
</div>
</div>
<?php if ($captchaNeeded) { ?>
<div class="form-group <?=$this->validation()->hasError('captcha') ? 'has-error' : '' ?>">
<label class="col-lg-2 control-label">
<?=$this->getTrans('captcha') ?>
</label>
<div class="col-lg-8">
<?=$this->getCaptchaField() ?>
</div>
</div>
<?php if ($captchaNeeded && $defaultcaptcha) : ?>
<?=$defaultcaptcha->getCaptcha($this) ?>
<?php endif; ?>
<div class="form-group <?=$this->validation()->hasError('captcha') ? 'has-error' : '' ?>">
<div class="col-lg-offset-2 col-lg-8">
<?php
if ($captchaNeeded) {
if ($googlecaptcha) {
echo $googlecaptcha->setForm('rhcForm')->getCaptcha($this, 'addButton');
} else {
echo $this->getSaveBar('addButton');
}

<?php if ($captchaNeeded && $this->get('defaultcaptcha')) : ?>
<?=$defaultcaptcha->getCaptcha($this) ?>
<?php endif; ?>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-8">
<?php
if ($captchaNeeded) {
if ($googlecaptcha) {
echo $googlecaptcha->setForm('rhcForm')->getCaptcha($this, 'addButton');
} else {
echo $this->getSaveBar('addButton');
}
?>
</div>
} else {
echo $this->getSaveBar('addButton');
}
?>
</div>
<?php } ?>
<?=$this->getSaveBar('addButton') ?>
</div>
</form>

0 comments on commit da2962a

Please sign in to comment.