diff --git a/administrator/components/com_content/config.xml b/administrator/components/com_content/config.xml index 37e2268d61079..f32a9e945b5e0 100644 --- a/administrator/components/com_content/config.xml +++ b/administrator/components/com_content/config.xml @@ -120,7 +120,7 @@ name="spacer1" type="spacer" hr="true" - /> + /> + /> + /> JYES -
+ description="COM_CONTENT_CONFIG_EDITOR_LAYOUT"> + > @@ -364,7 +364,7 @@ default="1" label="COM_CONTENT_SHOW_PUBLISHING_OPTIONS_LABEL" description="COM_CONTENT_SHOW_PUBLISHING_OPTIONS_DESC" - > + > @@ -375,7 +375,7 @@ default="1" label="COM_CONTENT_SHOW_ARTICLE_OPTIONS_LABEL" description="COM_CONTENT_SHOW_ARTICLE_OPTIONS_DESC" - > + > @@ -386,7 +386,7 @@ default="0" label="JGLOBAL_SAVE_HISTORY_OPTIONS_LABEL" description="JGLOBAL_SAVE_HISTORY_OPTIONS_DESC" - > + > @@ -406,7 +406,7 @@ default="0" label="COM_CONTENT_SHOW_IMAGES_URLS_FRONT_LABEL" description="COM_CONTENT_SHOW_IMAGES_URLS_FRONT_DESC" - > + > @@ -417,7 +417,7 @@ default="0" label="COM_CONTENT_SHOW_IMAGES_URLS_BACK_LABEL" description="COM_CONTENT_SHOW_IMAGES_URLS_BACK_DESC" - > + > @@ -425,7 +425,8 @@ name="spacer3" type="spacer" hr="true" - /> + showon="show_urls_images_backend:1[OR]show_urls_images_frontend:1" + /> - - - - + > + + + + - - - - + > + + + + - - - - + > + + + + + showon="show_urls_images_backend:1[OR]show_urls_images_frontend:1" + /> - - - + > + + + - - - + > + + +
@@ -502,7 +504,7 @@
+ > - - + + - - + > + + - - + + - - + + + > @@ -606,7 +608,7 @@ label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL" description="COM_CONTENT_NUMBER_CATEGORY_ITEMS_DESC" default="1" - > + > @@ -626,14 +628,14 @@
+ > + > @@ -692,7 +694,7 @@
+ > + > + value="0">JGLOBAL_DOWN + + value="1">JGLOBAL_ACROSS + + /> + default="0" + description="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_DESC" + label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL" + > @@ -758,7 +762,7 @@
+ > - - + + - - - - - + + + + + - - + + - - - - + + + + @@ -817,8 +821,8 @@ default="1" label="JGLOBAL_LIST_HITS_LABEL" description="JGLOBAL_LIST_HITS_DESC"> - - + + - - + + - - + + - - + +
@@ -854,20 +858,24 @@
- + + value="none">JGLOBAL_NO_ORDER + + value="alpha">JGLOBAL_TITLE_ALPHABETICAL + + value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL + + value="order">JGLOBAL_CATEGORY_MANAGER_ORDER + + value="rdate">JGLOBAL_MOST_RECENT_FIRST + + + value="alpha">JGLOBAL_TITLE_ALPHABETICAL + + value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL + + value="author">JGLOBAL_AUTHOR_ALPHABETICAL + + value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL + + value="hits">JGLOBAL_MOST_HITS + + value="rhits">JGLOBAL_LEAST_HITS + + value="order">JGLOBAL_ARTICLE_MANAGER_ORDER + - - - - + value="vote" requires="vote">JGLOBAL_VOTES_DESC + + + + - - - - + default="published" + description="JGLOBAL_ORDERING_DATE_DESC" + label="JGLOBAL_ORDERING_DATE_LABEL" + showon="orderby_sec:rdate,date" + > + + + + - - - + + + - - + > + + + label="JGLOBAL_SHOW_FEATURED_ARTICLES_LABEL" + description="JGLOBAL_SHOW_FEATURED_ARTICLES_DESC" + > @@ -950,7 +971,7 @@
+ > - - + + + value="0">JGLOBAL_INTRO_TEXT + + value="1">JGLOBAL_FULL_TEXT + + > @@ -1033,7 +1056,7 @@ name="permissions" label="JCONFIG_PERMISSIONS_LABEL" description="JCONFIG_PERMISSIONS_DESC" - > + > + section="component"/>
diff --git a/libraries/joomla/form/helper.php b/libraries/joomla/form/helper.php index 0cc79e6bf5614..b16a57bf88017 100644 --- a/libraries/joomla/form/helper.php +++ b/libraries/joomla/form/helper.php @@ -336,9 +336,6 @@ public static function parseShowOnConditions($showOn, $formControl = null, $grou return array(); } - $showOnData = array(); - $showOnParts = preg_split('#\[AND\]|\[OR\]#', $showOn); - $formPath = $formControl ?: ''; if ($formPath && $group) @@ -346,8 +343,18 @@ public static function parseShowOnConditions($showOn, $formControl = null, $grou $formPath .= '[' . $group . ']'; } + $showOnData = array(); + $showOnParts = preg_split('#(\[AND\]|\[OR\])#', $showOn, -1, PREG_SPLIT_DELIM_CAPTURE); + $op = ''; + foreach ($showOnParts as $showOnPart) { + if (($showOnPart === '[AND]') || $showOnPart === '[OR]') + { + $op = trim($showOnPart, '[]'); + continue; + } + $compareEqual = strpos($showOnPart, '!:') === false; $showOnPartBlocks = explode(($compareEqual ? ':' : '!:'), $showOnPart, 2); @@ -355,8 +362,13 @@ public static function parseShowOnConditions($showOn, $formControl = null, $grou 'field' => $formPath ? $formPath . '[' . $showOnPartBlocks[0] . ']' : $showOnPartBlocks[0], 'values' => explode(',', $showOnPartBlocks[1]), 'sign' => $compareEqual === true ? '=' : '!=', - 'op' => preg_match('#^\[(AND|OR)\]#', $showOnPart, $matches) ? $matches[1] : '', + 'op' => $op, ); + + if ($op !== '') + { + $op = ''; + } } return $showOnData;