Skip to content

Commit

Permalink
Merge pull request #33 from nebojsatomic/new-default-templates
Browse files Browse the repository at this point in the history
New default responsive templates updated
  • Loading branch information
nebojsatomic authored Jun 28, 2024
2 parents 8f798b6 + 08f03d7 commit 0530ec7
Show file tree
Hide file tree
Showing 42 changed files with 1,124 additions and 1,325 deletions.
Binary file modified data/cms_ide/contacts.MYI
Binary file not shown.
Binary file modified data/cms_ide/menu_items.MYD
Binary file not shown.
Binary file modified data/cms_ide/menu_items.MYI
Binary file not shown.
Binary file modified data/cms_ide/mod_forms.MYD
Binary file not shown.
Binary file modified data/cms_ide/mod_forms.MYI
Binary file not shown.
Binary file modified data/cms_ide/mod_forms_fields.MYD
Binary file not shown.
Binary file modified data/cms_ide/mod_forms_fields.MYI
Binary file not shown.
Binary file modified data/cms_ide/pages_en.MYD
Binary file not shown.
Binary file modified data/cms_ide/pages_en.MYI
Binary file not shown.
Binary file modified data/cms_ide/pages_sr.MYD
Binary file not shown.
Binary file modified data/cms_ide/pages_sr.MYI
Binary file not shown.
Binary file modified data/cms_ide/templates_en.MYD
Binary file not shown.
Binary file modified data/cms_ide/templates_en.MYI
Binary file not shown.
Binary file modified data/cms_ide/templates_sr.MYD
Binary file not shown.
Binary file modified data/cms_ide/templates_sr.MYI
Binary file not shown.
Binary file modified data/cms_ide/users.MYD
Binary file not shown.
Binary file modified data/cms_ide/users.MYI
Binary file not shown.
1 change: 1 addition & 0 deletions src/app/Http/Middleware/VerifyCsrfToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class VerifyCsrfToken extends Middleware
'tables/*',
'user/*',
'search',
'forms',
'public/*'
];
}
289 changes: 137 additions & 152 deletions src/composer.lock

Large diffs are not rendered by default.

21 changes: 18 additions & 3 deletions src/legacy/dev-application/controllers/CreatorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1314,15 +1314,26 @@ private function _fillTable($table, $array)
public function deleteLanguageAction()
{
$this->_checkAccess();

if($this->_sesija->superadmin != "1") {
echo $this->_translate->_("Only superadministrator can delete this!");
return;
}
// turn off ViewRenderer
$this->_helper->viewRenderer->setNoRender();
$values = $this->_request->getParams();

if ($values['id'] != "" ) {
$result = $this->_db->fetchAll("SELECT code, name FROM " . $this->_tblprefix . "languages WHERE id= ?", array($values['id']));
$result = $this->_db->fetchAll("SELECT code, name, isDefault FROM " . $this->_tblprefix . "languages WHERE id= ?", array($values['id']));

if($result[0]['isDefault'] === 1) { // nobody should be able to delete the default language
$jsonResponse = json_encode([
"success" => false,
"message" => $this->_translate->_("Default language cannot be deleted!")
]);
echo $jsonResponse;
return;
}

//Drop table
$this->_db->query("DROP TABLE " . $this->_tblprefix . "pages_" . $result[0]['code']);
Expand All @@ -1342,8 +1353,12 @@ public function deleteLanguageAction()
$this->_db->query("DELETE FROM " . $this->_tblprefix . "tableregistry WHERE name = ?", array('pages_' . $result[0]['code']) );
//clean cache
$this->cleanCache();
echo $this->translate("The selected language has been deleted!");
echo '<script type="text/javascript">$("#langName option:contains(' . "'" . $langName . "'" . ')").remove();</script>';//js for removing the lng frm combo

$jsonResponse = json_encode([
"success" => true,
"message" => $this->_translate->_("The selected language has been deleted!")
]);
echo $jsonResponse;
} else {
echo $this->translate("No Language specified!");
}
Expand Down
Loading

0 comments on commit 0530ec7

Please sign in to comment.