See:

After talking a bit with Sun one potential solution is to change

  • conf_path() to site_settings_path()
  • find_conf_path() to site_settings_path_find()
CommentFileSizeAuthor
#5 1643398-5_conf_path_refactor.patch30.84 KBalexpott
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1643398-5_conf_path_refactor.patch. Unable to apply patch. See the log in the details link for more information. View
#1 1643398-1_conf_path_refactor.patch30.76 KBalexpott
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1643398-1_conf_path_refactor.patch. Unable to apply patch. See the log in the details link for more information. View
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

alexpott’s picture

FileSize
30.76 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1643398-1_conf_path_refactor.patch. Unable to apply patch. See the log in the details link for more information. View

After doing this refactor it occurred to me that site_settings_path() is not good either as the path contains a site's settings.php, config directory, user uploaded files, translations and lots of other weird and wonderful stuff...

So I propose we change conf_path() to site_path()...

Here's a patch to do just that.

mjonesdinero’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1643398-1_conf_path_refactor.patch, failed testing.

mjonesdinero’s picture

Status: Needs work » Needs review

i change the status earlier to test the patch you have worked and it has an error, i will also make patch on this, to help you resolved this issue.

Thanks

alexpott’s picture

Issue tags: +Avoid commit conflicts
FileSize
30.84 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1643398-5_conf_path_refactor.patch. Unable to apply patch. See the log in the details link for more information. View

8.x had moved on... merged to resolve non-applicable patch.

Status: Needs review » Needs work

The last submitted patch, 1643398-5_conf_path_refactor.patch, failed testing.

alexpott’s picture

Status: Needs work » Needs review

Hmmm.... the Show Comment Search tests pass locally...

alexpott’s picture

#5: 1643398-5_conf_path_refactor.patch queued for re-testing.

alexpott’s picture

This change is probably going to cause heaps of pain... for example Drush uses conf_path(). Perhaps we should include a function like this to ease the pain.

/**
 * Some very good docs explaining this.
 */
function conf_path($require_settings = TRUE, $reset = FALSE) {
  return site_path($require_settings, $reset);
}
sun’s picture

Status: Needs review » Needs work
Issue tags: -Avoid commit conflicts

I don't think this needs the Avoid commit conflicts tag - the patch is pretty small and easy to re-roll.

+++ b/core/includes/bootstrap.inc
@@ -359,34 +359,34 @@ function timer_stop($name) {
- * - $confdir/8080.www.example.com.mysite.test
- * - $confdir/www.example.com.mysite.test
- * - $confdir/example.com.mysite.test
- * - $confdir/com.mysite.test
+ * - $site_path/8080.www.example.com.mysite.test
+ * - $site_path/www.example.com.mysite.test
+ * - $site_path/example.com.mysite.test
+ * - $site_path/com.mysite.test

eh? I think you got confused here ;)

$site_path is the return value of the function; i.e., each entry in this list == possible $site_path.

Each $site_path here should be just simply replaced with "sites/" :)

(Alas... it's correct in default.settings.php, which contains a copy of these docs ;))

sun’s picture

Status: Needs work » Needs review
Issue tags: -Configuration system

#5: 1643398-5_conf_path_refactor.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Configuration system

The last submitted patch, 1643398-5_conf_path_refactor.patch, failed testing.

gdd’s picture

Is this really worth doing? We've been very successfully using the system for almost a year since this issue was posted and I've not heard anyone bring up this issue. Patch is guaranteed to need a reroll too.

mtift’s picture

Issue summary: View changes

I don't understand what problem this issue would be fixing

alexpott’s picture

Status: Needs work » Closed (duplicate)
Related issues: +#2457469: Remove usages of conf_path()

This has been or is being resolved by other issues eg. #2457469: Remove usages of conf_path()