Skip to content
Snippets Groups Projects
Commit efe2e7fa authored by Rasmus Fuhse's avatar Rasmus Fuhse
Browse files

some small things

parent 82165c92
Branches
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ class MypluginsController extends PluginController { ...@@ -35,7 +35,7 @@ class MypluginsController extends PluginController {
public function edit_release_action($release_id) { public function edit_release_action($release_id) {
$this->release = new MarketRelease($release_id); $this->release = new MarketRelease($release_id);
if (Request::isXhr()) { if (Request::isXhr()) {
$this->response->add_header('X-Title', _("Plugin bearbeiten")); $this->response->add_header('X-Title', _("Release bearbeiten"));
$this->set_layout(null); $this->set_layout(null);
} }
} }
......
...@@ -16,6 +16,7 @@ class UpdateController extends PluginController { ...@@ -16,6 +16,7 @@ class UpdateController extends PluginController {
if ($release->getSecurityHash() === Request::get("s")) { if ($release->getSecurityHash() === Request::get("s")) {
$release->installFile(); $release->installFile();
} }
$this->render_text("OK");
} }
} }
\ No newline at end of file
...@@ -3,7 +3,9 @@ if (strpos($_SERVER['SERVER_NAME'], ':') !== false) { ...@@ -3,7 +3,9 @@ if (strpos($_SERVER['SERVER_NAME'], ':') !== false) {
list($_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT']) = list($_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT']) =
explode(':', $_SERVER['SERVER_NAME']); explode(':', $_SERVER['SERVER_NAME']);
} }
if ($_SERVER['SERVER_NAME'] === "localhost" || $_SERVER['SERVER_NAME'] = "127.0.0.1") {
$domain_warning = sprintf(_("Achtung, mit %s als Domain kann der Webhook-Aufruf von github nicht funktionieren."), $_SERVER['SERVER_NAME']);
}
$DOMAIN_STUDIP = $_SERVER['HTTPS'] == 'on' ? 'https' : 'http'; $DOMAIN_STUDIP = $_SERVER['HTTPS'] == 'on' ? 'https' : 'http';
$DOMAIN_STUDIP .= '://'.$_SERVER['SERVER_NAME']; $DOMAIN_STUDIP .= '://'.$_SERVER['SERVER_NAME'];
...@@ -16,7 +18,11 @@ if ($_SERVER['HTTPS'] == 'on' && $_SERVER['SERVER_PORT'] != 443 || ...@@ -16,7 +18,11 @@ if ($_SERVER['HTTPS'] == 'on' && $_SERVER['SERVER_PORT'] != 443 ||
<fieldset> <fieldset>
<legend> <legend>
<?= _("Release hinzufgen") ?> <? if ($release->isNew()) : ?>
<?= _("Release hinzufgen") ?>
<? else : ?>
<?= sprintf(_("Release %s bearbeiten"), htmlReady($release['version'])) ?>
<? endif ?>
</legend> </legend>
<div> <div>
...@@ -57,8 +63,11 @@ if ($_SERVER['HTTPS'] == 'on' && $_SERVER['SERVER_PORT'] != 443 || ...@@ -57,8 +63,11 @@ if ($_SERVER['HTTPS'] == 'on' && $_SERVER['SERVER_PORT'] != 443 ||
<? if (!$release->isNew()) : ?> <? if (!$release->isNew()) : ?>
<p class="info"> <p class="info">
<?= _("Webhook-URL zum Einfgen in github oder gitlab:") ?> <?= _("Webhook-URL zum Einfgen in github oder gitlab:") ?>
<input type="text" style="border: thin solid #cccccc; background-color: #eeeeee;" value="<?= $DOMAIN_STUDIP.URLHelper::getLink("plugins.php/pluginmarket/upate/".$release->getId(), array('s' => $release->getSecurityHash()), true) ?>"> <input type="text" style="border: thin solid #cccccc; background-color: #eeeeee;" value="<?= $DOMAIN_STUDIP.URLHelper::getLink("plugins.php/pluginmarket/update/release/".$release->getId(), array('s' => $release->getSecurityHash()), true) ?>">
</p> </p>
<? if ($domain_warning) : ?>
<p class="info"><?= htmlReady($domain_warning) ?></p>
<? endif ?>
<? endif ?> <? endif ?>
</fieldset> </fieldset>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment