Skip to content

Commit bc13914

Browse files
committed
Merge branch 'master' into feature/live-preview
2 parents 204bfb1 + b46542a commit bc13914

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ test/ImageTransformreport.html
1313
examples/index.php
1414
.DS_Store
1515
tmp/
16-
stdout
17-
test/result.json
16+
test/result.json
17+
stdout

src/Stack/Stack.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ public function ImageTrasform($url, $parameters)
137137
}
138138
}
139139

140-
141140
public function LivePreviewQuery($parameters) {
142141
$this->live_preview['live_preview'] = $parameters['live_preview'] ?? 'init';
143142
$this->live_preview['content_type_uid'] = $parameters['content_type_uid'];
@@ -292,7 +291,6 @@ public function getEnvironment()
292291
return $this->environment;
293292
}
294293

295-
296294
/**
297295
* This function sets Branch.
298296
*

src/Support/Utility.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ public static function isLivePreview($query) {
105105
}
106106
return false;
107107
}
108+
108109
/**
109110
* Get the domain from the current object
110111
*
@@ -129,7 +130,7 @@ public static function getDomain($query)
129130
$host = $stack->live_preview['host'];
130131
}
131132
return $stack->getProtocol()
132-
.'://'.$host
133+
.'://'.$stack->getHost()
133134
.':'
134135
.$stack->getPort().VERSION;
135136
}

test/EntriesTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public static function setUpBeforeClass() : void {
2424
if (self::$rest->getHost() !== NULL) {
2525
self::$Stack->setHost(self::$rest->getHost());
2626
}
27-
2827
self::$LivePreviewStack = Contentstack::Stack(self::$rest->getAPIKEY(), self::$rest->getAccessToken(), self::$rest->getEnvironmentName(), array('live_preview' => array(
2928
'enable'=> true,
3029
'host' => 'preview.contentstack.com',

test/constants.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111

1212

1313
// fpr query test params
14+
define('CT_REF', 'reference');
1415
define('CT_ContentType', 'ctwithallfields');

0 commit comments

Comments
 (0)