Skip to content

Commit

Permalink
Removing mustache, will be replaced later with a new parser
Browse files Browse the repository at this point in the history
See #12 for the discussion
  • Loading branch information
laoneo committed Jun 19, 2016
1 parent 9f369c3 commit 41bd1f6
Show file tree
Hide file tree
Showing 37 changed files with 37 additions and 4,404 deletions.
19 changes: 2 additions & 17 deletions administrator/components/com_fields/helpers/fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,24 +128,9 @@ public static function getFields ($context, $item = null, $prepareValue = false)
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('onFieldBeforePrepare', array($context, $item, &$field));

if ($output = $field->params->get('output'))
{
try
{
$m = new Mustache_Engine;
$value = $m->render($output, $field);
}
catch (Exception $e)
{
JFactory::getApplication()->enqueueMessage($e->getMessage(), 'warning');
}
}
// Prepare the value from the type layout
$value = self::render($context, 'field.prepare.' . $field->type, array('field' => $field));

if (! $value)
{
// Prepare the value from the type layout
$value = self::render($context, 'field.prepare.' . $field->type, array('field' => $field));
}
// If the value is empty, render the base layout
if (! $value)
{
Expand Down
2 changes: 0 additions & 2 deletions administrator/components/com_fields/models/forms/field.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@
<option value="0">JNO</option>
<option value="-1">JGLOBAL_USE_GLOBAL</option>
</field>
<field name="output" type="editor"
label="COM_FIELDS_FIELD_OUTPUT_LABEL" description="COM_FIELDS_FIELD_OUTPUT_DESC" />
</fieldset>
</fields>
</form>
2 changes: 0 additions & 2 deletions administrator/language/en-GB/en-GB.com_fields.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ COM_FIELDS_FIELD_LABEL_LABEL="Label"
COM_FIELDS_FIELD_LANGUAGE_DESC="Assign a language to this field."
COM_FIELDS_FIELD_NOTE_DESC="An optional note for the field."
COM_FIELDS_FIELD_NOTE_LABEL="Note"
COM_FIELDS_FIELD_OUTPUT_DESC="The output of the field. If not empty then the field is rendered with the mustache codes."
COM_FIELDS_FIELD_OUTPUT_LABEL="Output"
COM_FIELDS_FIELD_PERMISSION_CREATE_DESC="New setting for <strong>create actions</strong> in this field and the calculated setting based on the parent extension and group permissions."
COM_FIELDS_FIELD_PERMISSION_DELETE_DESC="New setting for <strong>delete actions</strong> on this field and the calculated setting based on the parent extension and group permissions."
COM_FIELDS_FIELD_PERMISSION_EDITOWN_DESC="New setting for <strong>edit own actions</strong> on this field and the calculated setting based on the parent extension and group permissions."
Expand Down
10 changes: 1 addition & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
},
"vendor-dir": "libraries/vendor"
},
"support": {
"issues":"https://issues.joomla.org",
"irc":"http://irc.lc/freenode/joomla/",
"forum":"http://forum.joomla.org/",
"docs":"https://docs.joomla.org"
},
"require": {
"php": ">=5.3.10",
"joomla/application": "~1.5",
Expand All @@ -32,9 +26,7 @@
"paragonie/random_compat": "~1.0",
"phpmailer/phpmailer": "5.2.14",
"symfony/polyfill-php56": "~1.0",
"symfony/yaml": "2.*",
"simplepie/simplepie": "1.3.1",
"mustache/mustache": "2.8.0"
"symfony/yaml": "2.*"
},
"require-dev": {
"phpunit/phpunit": "4.*",
Expand Down
119 changes: 34 additions & 85 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 41bd1f6

Please sign in to comment.