Commit 28ed995a authored by Sarah German's avatar Sarah German Committed by Christian Beier
Browse files

Issue #2558283 by hey_germano: User warning from drupal_get_path

parent 24dbb689
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -32,14 +32,12 @@ class IconsetFinderService {
   * @return array
   */
  protected function setSearchDirs() {
    $profile = drupal_get_path('profile', drupal_get_profile());
    $site_path = \Drupal::service('kernel')->getSitePath();

    // Similar to 'modules' and 'themes' directories inside an installation
    // profile, installation profiles may want to place libraries into a
    // 'libraries' directory.
    if (strpos($profile, "core") === FALSE) {
      $searchdirs[] = "$profile/libraries";
    if ($profile = drupal_get_profile() && strpos($profile, "core") === FALSE) {
      $profile_path = drupal_get_path('profile', $profile);
      $searchdirs[] = "$profile_path/libraries";
    }

    // Search sites/all/libraries for backwars-compatibility.
@@ -49,6 +47,7 @@ class IconsetFinderService {
    $searchdirs[] = 'libraries';

    // Also search sites/<domain>/*.
    $site_path = \Drupal::service('kernel')->getSitePath();
    $searchdirs[] = "$site_path/libraries";

    // Add the social_media_links module directory.