Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-13355

Small file_exists optimization to extension loading

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Medium Medium
    • 4.1.0alpha1
    • 4.0.1, 4.0.1rc1
    • Misc
    • None

    Description

      Save one file_exists call pr activated extension pr request.

      Index: lib/ezutils/classes/ezextension.php
      ===================================================================
      --- lib/ezutils/classes/ezextension.php	(revision 22100)
      +++ lib/ezutils/classes/ezextension.php	(working copy)
      @@ -105,10 +105,6 @@
               $ini = eZINI::instance();
               foreach ( $activeExtensions as $activeExtension )
               {
      -            if ( !file_exists( $extensionDirectory . '/' . $activeExtension ) )
      -            {
      -                eZDebug::writeWarning( "Extension '$activeExtension' does not exist, looked for directory '" . $extensionDirectory . '/' . $activeExtension . "'" );
      -            }
                   $extensionSettingsPath = $extensionDirectory . '/' . $activeExtension . '/settings';
                   if ( file_exists( $extensionSettingsPath ) )
                   {
      @@ -120,6 +116,10 @@
                       }
                       $hasExtensions = true;
                   }
      +            else if ( !file_exists( $extensionDirectory . '/' . $activeExtension ) )
      +            {
      +                eZDebug::writeWarning( "Extension '$activeExtension' does not exist, looked for directory '" . $extensionDirectory . '/' . $activeExtension . "'" );
      +            }
               }
               if ( $hasExtensions )
                   $ini->loadCache();
      
      

      Attachments

        Activity

          People

            andre1 andre1
            andre1 andre1
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: