From c9265bc8c2bf039e3622c3902ed6eb81f129ba44 Mon Sep 17 00:00:00 2001
From: Adrian Rossouw <adrian@developmentseed.org>
Date: Tue, 20 Jul 2010 06:08:37 +0200
Subject: [PATCH] Now that we are actually storing context objects in
 $this->context, standardize on $context everywhere. (ie: config classes when
 from $this->owner to $this->context.)

---
 http/http.config.inc                |  2 +-
 platform/provision_drupal.drush.inc |  2 +-
 provision.config.inc                | 30 ++++++++++++++---------------
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/http/http.config.inc b/http/http.config.inc
index 386592859..68dfad5ac 100644
--- a/http/http.config.inc
+++ b/http/http.config.inc
@@ -82,7 +82,7 @@ class provisionConfig_http_platform extends provisionConfig_http {
   public $description = 'platform configuration file';
 
   function filename() {
-    return $this->data['http_platformd_path'] . '/' . ltrim($this->owner->name, '@') . '.conf';
+    return $this->data['http_platformd_path'] . '/' . ltrim($this->context->name, '@') . '.conf';
   }
 }
 
diff --git a/platform/provision_drupal.drush.inc b/platform/provision_drupal.drush.inc
index 8f93aba54..38138fa97 100644
--- a/platform/provision_drupal.drush.inc
+++ b/platform/provision_drupal.drush.inc
@@ -134,7 +134,7 @@ class provisionConfig_drupal_settings extends provisionConfig {
     if (drush_drupal_major_version() >= 7) {
       $this->data['db_type'] = ($this->data['db_type'] == 'mysqli') ? 'mysql' : $this->data['db_type'];
     }
-    $cloaked = $this->owner->service('http')->cloaked_db_creds();
+    $cloaked = $this->context->service('http')->cloaked_db_creds();
 
     foreach (array('db_type', 'db_user', 'db_passwd', 'db_host', 'db_name') as $key) {
       $this->creds[$key] = ($cloaked) ? "\$_SERVER[{$key}]" : urldecode($this->data[$key]);
diff --git a/provision.config.inc b/provision.config.inc
index 57dad6a5b..ed428b7e3 100644
--- a/provision.config.inc
+++ b/provision.config.inc
@@ -23,7 +23,7 @@ class provisionConfig {
    *
    * @var provisionContext
    */
-  public $owner = null;
+  public $context = null;
 
   /**
    * If set, replaces file name in log messages.
@@ -41,26 +41,26 @@ class provisionConfig {
   protected $group = NULL;
 
   /**
-   * Forward $this->... to $this->owner->...
+   * Forward $this->... to $this->context->...
    * object.
    */
   function __get($name) {
-    if (isset($this->owner)) {
-      return $this->owner->$name;
+    if (isset($this->context)) {
+      return $this->context->$name;
     }
   }
 
   /**
    * Constructor, overriding not recommended.
    *
-   * @param $owner
+   * @param $context
    *   An alias name for d(), the provisionContext that this configuration
    *   is relevant to.
    * @param $data
    *   An associative array to potentiall manipulate in process() and make
    *   available as variables to the template.
    */
-  function __construct($owner, $data = array()) {
+  function __construct($context, $data = array()) {
     if (is_null($this->template)) {
       throw(exception);
     }
@@ -70,8 +70,8 @@ class provisionConfig {
       $this->data = array_merge($this->data, $data);
     }
 
-    // Accept both a reference and an alias name for the owner.
-    $this->owner = is_object($owner) ? $owner : d($owner);
+    // Accept both a reference and an alias name for the context.
+    $this->context = is_object($context) ? $context : d($context);
   }
 
   /**
@@ -176,8 +176,8 @@ class provisionConfig {
         }
         if (!is_null($this->group)) {
           provision_file()->chgrp($filename, $this->group)
-            ->succeed('Change group ownership of @path to @gid')
-            ->fail('Could not change group ownership of @path to @gid');
+            ->succeed('Change group contextship of @path to @gid')
+            ->fail('Could not change group contextship of @path to @gid');
         }
       }
     }
@@ -207,8 +207,8 @@ class provisionConfig_drushrc extends provisionConfig {
     return _drush_config_file($this->context_name);
   }
 
-  function __construct($owner, $data = array()) {
-    parent::__construct($owner, $data);
+  function __construct($context, $data = array()) {
+    parent::__construct($context, $data);
     $this->load_data();
   }
 
@@ -236,10 +236,10 @@ class provisionConfig_drushrc_alias extends provisionConfig_drushrc {
    * @param $options
    *   Array of string option names to save.
    */
-  function __construct($owner, $data = array()) {
-    parent::__construct($owner, $data);
+  function __construct($context, $data = array()) {
+    parent::__construct($context, $data);
     $this->data = array(
-      'aliasname' => ltrim($owner, '@'),
+      'aliasname' => ltrim($context, '@'),
       'options' => $data,
     );
   }
-- 
GitLab