[dev] [patch] showing the generated config in an textarea

Eduardo Dominguez lalo at teligens.com
Thu Feb 5 18:01:12 PST 2004


I find it easier to copy-paste from a textarea than from the browser. I 
was bitten twice by the fact that Mozilla likes to prepend the copied 
text with a space.




Index: admin/setup/config.php
===================================================================
RCS file: /repository/horde/admin/setup/config.php,v
retrieving revision 1.3
diff -u -r1.3 config.php
--- admin/setup/config.php	1 Feb 2004 16:19:13 -0000	1.3
+++ admin/setup/config.php	6 Feb 2004 01:50:45 -0000
@@ -73,7 +73,7 @@
  $menu = &new Menu(true, true, true);
  $template->set('menu', $menu->getMenu());
  $template->set('notify', Util::bufferOutput(array($notification, 
'notify')));
-$template->set('php', nl2br(htmlspecialchars($php)), true);
+$template->set('php', htmlspecialchars($php), true);
  $template->set('form', $form);

  require HORDE_TEMPLATES . '/common-header.inc';

Index: templates/admin/setup/config.html
===================================================================
RCS file: /repository/horde/templates/admin/setup/config.html,v
retrieving revision 1.3
diff -u -r1.3 config.html
--- templates/admin/setup/config.html	1 Feb 2004 16:19:14 -0000	1.3
+++ templates/admin/setup/config.html	6 Feb 2004 01:47:37 -0000
@@ -21,14 +21,14 @@

  <if:php>
  <br />
-<table>
+<table width="100%">
    <tr>
      <td class="smallheader">
        <gettext>Generated Code</gettext>
      </td>
    </tr><tr class="light">
      <td>
-      <tag:php />
+      <textarea style="width:95%;" rows="20"><tag:php /></textarea>
      </td>
    </tr>
  </table>



-- 
edmz



More information about the dev mailing list