diff options
| author | turon <spider@turon> | 2016-02-23 14:21:57 -0500 |
|---|---|---|
| committer | turon <spider@turon> | 2016-02-23 14:21:57 -0500 |
| commit | e6013842b583ac2d94b92cea753b9d7374c94286 (patch) | |
| tree | 843d68ae03a4713402b207926e7deeeb4fd6d695 | |
| parent | 3abc1399a5c05512a1aef55cbc332e3d4ac72b87 (diff) | |
| download | themes-e6013842b583ac2d94b92cea753b9d7374c94286.tar.gz themes-e6013842b583ac2d94b92cea753b9d7374c94286.tar.bz2 themes-e6013842b583ac2d94b92cea753b9d7374c94286.zip | |
fix broken textarea smarty plugin
| -rw-r--r-- | smartyplugins/function.textarea.php | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/smartyplugins/function.textarea.php b/smartyplugins/function.textarea.php index c78c4ec..a19c5f1 100644 --- a/smartyplugins/function.textarea.php +++ b/smartyplugins/function.textarea.php @@ -15,7 +15,7 @@ * ------------------------------------------------------------- */ function smarty_function_textarea( $pParams, &$pSmarty ) { - global $gBitSystem, $gContent, $gLibertySystem; + global $gBitSystem, $gContent, $gLibertySystem, $gBitSmarty; $attributes = ''; $style = ''; @@ -54,7 +54,7 @@ function smarty_function_textarea( $pParams, &$pSmarty ) { case 'error': case 'required': case 'maxchars': - $pSmarty->assign("textarea_".$_key, $_value); + $gBitSmarty->assign("textarea_".$_key, $_value); break; case 'class': $class .= ' '.$_key; @@ -63,16 +63,16 @@ function smarty_function_textarea( $pParams, &$pSmarty ) { $style .= $_key; break; case 'formatguid': - $pSmarty->assign('formatGuid', $_value); + $gBitSmarty->assign('formatGuid', $_value); break; case 'langcode': - $pSmarty->assign('langCode', $_value); + $gBitSmarty->assign('langCode', $_value); break; case 'gContent': // Trick out gContent $oldContent = $gContent; $gContent = $_value; - $pSmarty->assign('gContent', $_value); + $gBitSmarty->assign('gContent', $_value); break; default: $attributes .= $_key.'="'.$_value.'" '; @@ -84,31 +84,30 @@ function smarty_function_textarea( $pParams, &$pSmarty ) { if ($gBitSystem->isPackageActive('bnspell')) { $style .= (empty($style) ? '' : ';').'height:'.$pParams['rows'].'em;'; } - $pSmarty->assign('textarea_attributes', $attributes); + $gBitSmarty->assign('textarea_attributes', $attributes); if (!empty($style)) { - $pSmarty->assign('textarea_style', 'style="'.$style.'"'); + $gBitSmarty->assign('textarea_style', 'style="'.$style.'"'); } - $pSmarty->assign('textarea_class', 'class="'.$class.'"'); - $ret = $pSmarty->fetch("bitpackage:liberty/edit_textarea.tpl"); - + $gBitSmarty->assign('textarea_class', 'class="form-control '.$class.'"'); + $ret = $gBitSmarty->fetch("bitpackage:liberty/edit_textarea.tpl"); if( is_object( $gContent ) ) { if( $formatGuid = $gContent->getField( 'format_guid' ) ) { - $pSmarty->assign('formatGuid', $formatGuid); + $gBitSmarty->assign('formatGuid', $formatGuid); } if( $langCode = $gContent->getField( 'lang_code' ) ) { - $pSmarty->assign( 'langCode', $langCode ); + $gBitSmarty->assign( 'langCode', $langCode ); } } // Restore gContent if (isset($oldContent)) { $gContent = $oldContent; - $pSmarty->assign('gContent', $oldContent); + $gBitSmarty->assign('gContent', $oldContent); } // since we have the funky {textarea} in play, we'll display the edit help tab - $pSmarty->assign( 'display_help_tab', TRUE ); + $gBitSmarty->assign( 'display_help_tab', TRUE ); return $ret; } |
