Advertisement
Guest User

Untitled

a guest
Feb 15th, 2012
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.50 KB | None | 0 0
  1. Index: inc/wpseo-non-ajax-functions.php
  2. ===================================================================
  3. --- inc/wpseo-non-ajax-functions.php    (revision 505496)
  4. +++ inc/wpseo-non-ajax-functions.php    (working copy)
  5. @@ -2,24 +2,25 @@
  6.  
  7.  function wpseo_load_plugins( $path ) {
  8.     $allowed_plugins = array('wpseo-local', 'wpseo-video', 'wpseo-news');
  9. -  
  10. -   $dir = @opendir( $path );
  11. -   if ($dir) {
  12. -       while (($entry = @readdir($dir)) !== false) {
  13. -           $full_dir_path = $path . "/" . $entry;
  14. -           if( in_array($entry, $allowed_plugins) && is_readable($full_dir_path) && is_dir($full_dir_path) ) {
  15. -               $module_dir = @opendir( $full_dir_path );
  16. -               if ($module_dir) {
  17. -                   while (($module_entry = @readdir($module_dir)) !== false) {
  18. -                       if (strrchr($module_entry, '.') === '.php') {
  19. -                           require $full_dir_path . '/' . $module_entry;
  20. +   if (is_dir($path)) {
  21. +       $dir = @opendir( $path );
  22. +       if ($dir) {
  23. +           while (($entry = @readdir($dir)) !== false) {
  24. +               $full_dir_path = $path . "/" . $entry;
  25. +               if( in_array($entry, $allowed_plugins) && is_readable($full_dir_path) && is_dir($full_dir_path) ) {
  26. +                   $module_dir = @opendir( $full_dir_path );
  27. +                   if ($module_dir) {
  28. +                       while (($module_entry = @readdir($module_dir)) !== false) {
  29. +                           if (strrchr($module_entry, '.') === '.php') {
  30. +                               require $full_dir_path . '/' . $module_entry;
  31. +                           }
  32.                         }
  33.                     }
  34.                 }
  35.             }
  36. +           @closedir($dir);
  37.         }
  38. -       @closedir($dir);
  39. -   }
  40. +   }  
  41.  }
  42.  
  43.  function wpseo_get_country($country_code) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement