Verified Commit b37fc6d8 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(public-forms) Minor fixes

A sonar fix and a button name change

issue #5838
parent fd614d2a
No related merge requests found
Showing with 5 additions and 5 deletions
+5 -5
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
</div> </div>
<div id="window-footer" class="plugbottom"> <div id="window-footer" class="plugbottom">
<input type="submit" name="template_continue" value="{t}Continue{/t}"/> <input type="submit" name="form_submit" value="{msgPool type=okButton}"/>
</div> </div>
</form> </form>
</div> </div>
......
...@@ -38,13 +38,13 @@ class publicFormPage extends standAlonePage ...@@ -38,13 +38,13 @@ class publicFormPage extends standAlonePage
if (!isset($this->form) && isset($_GET['form'])) { if (!isset($this->form) && isset($_GET['form'])) {
/* Search for the form object */ /* Search for the form object */
$form = objects::ls('publicForm', array('dn' => 'raw', 'cn' => 1, 'fdPublicFormTitle' => 1, 'fdPublicFormText' => 1, 'fdPublicFormTemplateType' => 1, 'fdPublicFormTemplateDN' => 1), NULL, '(cn='.ldap_escape_f($_GET['form']).')'); $forms = objects::ls('publicForm', array('dn' => 'raw', 'cn' => 1, 'fdPublicFormTitle' => 1, 'fdPublicFormText' => 1, 'fdPublicFormTemplateType' => 1, 'fdPublicFormTemplateDN' => 1), NULL, '(cn='.ldap_escape_f($_GET['form']).')');
if (count($form) <= 0) { if (count($forms) <= 0) {
throw new FusionDirectoryException('Form "'.$_GET['form'].'" could not be found'); throw new FusionDirectoryException('Form "'.$_GET['form'].'" could not be found');
} elseif (count($form) > 1) { } elseif (count($forms) > 1) {
throw new FusionDirectoryException('Several forms match the name "'.$_GET['form'].'"'); throw new FusionDirectoryException('Several forms match the name "'.$_GET['form'].'"');
} }
$this->form = reset($form); $this->form = reset($forms);
$this->template = new template($this->form['fdPublicFormTemplateType'], $this->form['fdPublicFormTemplateDN']); $this->template = new template($this->form['fdPublicFormTemplateType'], $this->form['fdPublicFormTemplateDN']);
} elseif (!isset($this->form)) { } elseif (!isset($this->form)) {
throw new FusionDirectoryException('No form name given'); throw new FusionDirectoryException('No form name given');
......
  • SonarQube analysis reported 4 issues

    • :warning: 3 major
    • :information_source: 1 info

    Note: The following issues were found on lines that were not modified in the commit. Because these issues can't be reported as line comments, they are summarized here:

    1. :warning: Remove this commented out code. :blue_book:
    2. :warning: Remove this commented out code. :blue_book:
    3. :warning: Remove this commented out code. :blue_book:
    4. :information_source: Complete the task associated to this "TODO" comment. :blue_book:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment