| | 359 | } elseif ( is_dir("$theme_root/$stylesheet/$file") ) { |
| | 360 | $stylesheet_subdir = @ dir("$theme_root/$stylesheet/$file"); |
| | 361 | if ( !$stylesheet_subdir ) |
| | 362 | continue; |
| | 363 | while ( ($subfile = $stylesheet_subdir->read()) !== false ) { |
| | 364 | if ( preg_match('|^\.+$|', $subfile) ) |
| | 365 | continue; |
| | 366 | if ( preg_match('|\.php$|', $subfile) ) { |
| | 367 | $template_files[] = "$theme_root/$stylesheet/$file/$subfile"; |
| | 368 | } |
| | 369 | elseif ( is_dir("$theme_root/$stylesheet/$file/$subfile") ) { |
| | 370 | $stylesheet_subdir_subdir = @ dir("$theme_root/$stylesheet/$file/$subfile"); |
| | 371 | if ( !$stylesheet_subdir_subdir ) |
| | 372 | continue; |
| | 373 | while ( ($sub_subfile = $stylesheet_subdir_subdir->read()) !== false ) { |
| | 374 | if ( preg_match('|^\.+$|', $sub_subfile) ) |
| | 375 | continue; |
| | 376 | if ( preg_match('|\.php$|', $sub_subfile) ) |
| | 377 | $template_files[] = "$theme_root/$stylesheet/$file/$subfile/$sub_subfile"; |
| | 378 | } |
| | 379 | @ $stylesheet_subdir_subdir->close(); |
| | 380 | } |
| | 381 | } |
| | 382 | @ $stylesheet_subdir->close(); |
| | 383 | } |
| | 405 | } |
| | 406 | elseif ( is_dir("$template_directory/$file/$subfile") ) { |
| | 407 | $template_subdir_subdir = @ dir("$template_directory/$file/$subfile"); |
| | 408 | if ( !$template_subdir_subdir ) |
| | 409 | continue; |
| | 410 | while ( ($sub_subfile = $template_subdir_subdir->read()) !== false ) { |
| | 411 | if ( preg_match('|^\.+$|', $sub_subfile) ) |
| | 412 | continue; |
| | 413 | if ( preg_match('|\.php$|', $sub_subfile) ) |
| | 414 | $template_files[] = "$template_directory/$file/$subfile/$sub_subfile"; |
| | 415 | } |
| | 416 | @ $template_subdir_subdir->close(); |
| | 417 | } |