Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc committed Jul 14, 2016
1 parent 2c384bb commit d45278f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
22 changes: 22 additions & 0 deletions core/repo/market.repo.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,28 @@ public static function getInfo($_logicalId, $_version = 'stable') {

/* * ***********************UTILS*************************** */

public static function saveTicket($_ticket) {
$jsonrpc = self::getJsonRpc();
$_ticket['user_plugin'] = '';
foreach (plugin::listPlugin() as $plugin) {
$_ticket['user_plugin'] .= $plugin->getId();
$update = $plugin->getUpdate();
if (is_object($update)) {
$_ticket['user_plugin'] .= '[' . $update->getConfiguration('version', 'stable') . ',' . $update->getLocalVersion() . ']';
}
$_ticket['user_plugin'] .= ',';
}
trim($_ticket['user_plugin'], ',');
if (isset($_ticket['options']['page'])) {
$_ticket['options']['page'] = substr($_ticket['options']['page'], strpos($_ticket['options']['page'], 'index.php'));
}
$_ticket['options']['jeedom_version'] = jeedom::version();
if (!$jsonrpc->sendRequest('ticket::save', array('ticket' => $_ticket))) {
throw new Exception($jsonrpc->getErrorMessage());
}
return $jsonrpc->getResult();
}

public static function getPassword() {
$password = config::byKey('market::password');
if (!is_sha1($password)) {
Expand Down
2 changes: 1 addition & 1 deletion desktop/modal/report.bug.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
return;
}
$('#bt_sendBugReport').hide();
$('#div_alertReportBug').showAlert({message: '{{Votre ticket a bien été ouvert. Un mail va vous être envoyé.}}', level: 'success'});
$('#div_alertReportBug').showAlert({message: '{{Votre ticket a bien été ouvert. Nous vous recontacterons prochainement.}}', level: 'success'});
}
});
});
Expand Down
2 changes: 1 addition & 1 deletion desktop/modal/update.list.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
if (!isConnect('admin')) {
throw new Exception('{{401 - Accès non autorisé}}');
}
$repo = update::repoById(init('repo'));
$repo = update::repoById(init('repo', 'market'));
if ($repo['enable'] == 0) {
throw new Exception(__('Le repository est inactif : ', __FILE__) . init('repo'));
}
Expand Down

0 comments on commit d45278f

Please sign in to comment.