@@ -49,30 +49,16 @@ public static function getTree($xmap, stdClass $parent, array &$params)
4949 $ params ['include_pagination ' ] = ($ params ['include_pagination ' ] == 1 || ($ params ['include_pagination ' ] == 2 && $ xmap ->view == 'xml ' ) || ($ params ['include_pagination ' ] == 3 && $ xmap ->view == 'html ' ));
5050
5151 $ params ['cat_priority ' ] = JArrayHelper::getValue ($ params , 'cat_priority ' , $ parent ->priority );
52- $ params ['cat_changefreq ' ] = JArrayHelper::getValue ($ params , 'cat_changefreq ' , $ parent ->changefreq );
53-
54- if ($ params ['cat_priority ' ] == -1 )
55- {
56- $ params ['cat_priority ' ] = $ parent ->priority ;
57- }
52+ $ params ['cat_priority ' ] = ($ params ['cat_priority ' ] == -1 ) ? $ parent ->priority : $ params ['cat_priority ' ];
5853
59- if ($ params ['cat_changefreq ' ] == -1 )
60- {
61- $ params ['cat_changefreq ' ] = $ parent ->changefreq ;
62- }
54+ $ params ['cat_changefreq ' ] = JArrayHelper::getValue ($ params , 'cat_changefreq ' , $ parent ->changefreq );
55+ $ params ['cat_changefreq ' ] = ($ params ['cat_changefreq ' ] == -1 ) ? $ parent ->changefreq : $ params ['cat_changefreq ' ];
6356
6457 $ params ['topic_priority ' ] = JArrayHelper::getValue ($ params , 'topic_priority ' , $ parent ->changefreq );
65- $ params ['topic_changefreq ' ] = JArrayHelper::getValue ($ params , 'topic_changefreq ' , $ parent ->changefreq );
66-
67- if ($ params ['topic_priority ' ] == -1 )
68- {
69- $ params ['topic_priority ' ] = $ parent ->priority ;
70- }
58+ $ params ['topic_priority ' ] = ($ params ['topic_priority ' ] == -1 ) ? $ parent ->priority : $ params ['topic_priority ' ];
7159
72- if ($ params ['topic_changefreq ' ] == -1 )
73- {
74- $ params ['topic_changefreq ' ] = $ parent ->changefreq ;
75- }
60+ $ params ['topic_changefreq ' ] = JArrayHelper::getValue ($ params , 'topic_changefreq ' , $ parent ->changefreq );
61+ $ params ['topic_changefreq ' ] = ($ params ['topic_changefreq ' ] == -1 ) ? $ parent ->changefreq : $ params ['topic_changefreq ' ];
7662
7763 if ($ params ['include_topics ' ])
7864 {
0 commit comments