if ( parentcatname ) {
if ( ( ! fdcat -> parent_cat ) ||
( ! fdpcat ) )
- {
+ {
// child cat points to a different parent than requested parent!
cat_is_clean = 0;
pnd_log ( pndn_warning, "PXML Fail %s: Cat request %s (parent %s) -> cat wants to be child of a cat which FD says is the wrong parent (1)\n", app -> title_en ? app -> title_en : "no name?", catname, parentcatname ? parentcatname : "n/a" );
// so, is the cat we're looking at right now the apps main (or main alt) cat?
if ( parentp ) {
// and does this app have sub/altsub cats?
- if ( app -> main_category1 || app -> main_category2 || app -> alt_category1 || app -> alt_category2 ) {
+ if ( ( parentp == 1 && ( app -> main_category1 || app -> main_category2 ) ) ||
+ ( parentp == 2 && ( app -> alt_category1 || app -> alt_category2 ) )
+ )
+ {
// and we're only desiring the subcat version of the app?
if ( pnd_conf_get_as_int_d ( g_conf, "tabs.subcat_to_parent", 1 ) == 0 ) {
// create the parent category, since we need to be able to place a folder here maybe
} else if ( filter_mask == CFBYNAME ) {
char *foo = strchr ( param, '*' ) + 1;
if ( strncasecmp ( iter -> catname, param, strlen ( iter -> catname ) ) == 0 &&
+ iter -> parent_catname &&
strcasecmp ( iter -> parent_catname, foo ) == 0 )
{
interested = 1;
int category_index ( char *catname ) {
unsigned char i;
-
+
for ( i = 0; i < g_categorycount; i++ ) {
-
+
if ( strcasecmp ( g_categories [ i ] -> catname, catname ) == 0 ) {
return ( i );
}
-
+
}
-
+
return ( -1 );
}