Révision b0dc3a2e
Ajouté par Julien Enselme il y a plus de 7 ans
drupal7/modules/system/system.updater.inc | ||
---|---|---|
24 | 24 |
* found on your system, and if there was a copy in sites/all, we'd see it. |
25 | 25 |
*/ |
26 | 26 |
public function getInstallDirectory() { |
27 |
if ($relative_path = drupal_get_path('module', $this->name)) {
|
|
27 |
if ($this->isInstalled() && ($relative_path = drupal_get_path('module', $this->name))) {
|
|
28 | 28 |
$relative_path = dirname($relative_path); |
29 | 29 |
} |
30 | 30 |
else { |
... | ... | |
34 | 34 |
} |
35 | 35 |
|
36 | 36 |
public function isInstalled() { |
37 |
return (bool) drupal_get_path('module', $this->name);
|
|
37 |
return (bool) drupal_get_filename('module', $this->name, NULL, FALSE);
|
|
38 | 38 |
} |
39 | 39 |
|
40 | 40 |
public static function canUpdateDirectory($directory) { |
... | ... | |
109 | 109 |
* found on your system, and if there was a copy in sites/all, we'd see it. |
110 | 110 |
*/ |
111 | 111 |
public function getInstallDirectory() { |
112 |
if ($relative_path = drupal_get_path('theme', $this->name)) {
|
|
112 |
if ($this->isInstalled() && ($relative_path = drupal_get_path('theme', $this->name))) {
|
|
113 | 113 |
$relative_path = dirname($relative_path); |
114 | 114 |
} |
115 | 115 |
else { |
... | ... | |
119 | 119 |
} |
120 | 120 |
|
121 | 121 |
public function isInstalled() { |
122 |
return (bool) drupal_get_path('theme', $this->name);
|
|
122 |
return (bool) drupal_get_filename('theme', $this->name, NULL, FALSE);
|
|
123 | 123 |
} |
124 | 124 |
|
125 | 125 |
static function canUpdateDirectory($directory) { |
Formats disponibles : Unified diff
Update to Drupal 7.52