Forums | Mahara Community

Developers /
Incomplete array in interaction\forum\editpost.php

anonymous profile picture
Account deleted
Posts: 15

08 July 2009, 2:16


I found that when you reply to a post if you dont write anything and click on post the message that appear is this: [[required] instead of  'This field is required' .This ony happens here.

I Modified the code in the rules array  in the subject array of the pieform to made that field not required so the text appear correctly.

  'rules'        => array(
                'maxlength' => 255,
                'required' => false

I don't know if this is the best method but its works for me. 

anonymous profile picture
Account deleted
Posts: 1643

12 July 2009, 16:58


The correct fix is this:

 [email protected]:~/mahara$ git diff
diff --git a/htdocs/lib/pieforms/pieform.php b/htdocs/lib/pieforms/pieform.php
index fb5ce67..35090c3 100644
--- a/htdocs/lib/pieforms/pieform.php
+++ b/htdocs/lib/pieforms/pieform.php
@@ -1068,6 +1068,7 @@ EOF;
         // Fall back to the default string
+        $this->include_plugin($plugin, $pluginname);
         $function = 'pieform_' . $plugin . '_' . $pluginname . '_i18n';
         if (function_exists($function)) {
             $strings = $function();

I have applied this to the source so the next version of Mahara will be fixed. Thanks for the report!

2 results