Skip to content

Commit

Permalink
DBUpdate Bugfix
Browse files Browse the repository at this point in the history
Query #6 caused implode error when installing the plugin under
ILIAS 5.1.5, PHP 5.6.17, Debian Jessie 3.16.0
  • Loading branch information
disc5 committed Apr 27, 2016
1 parent cc407e6 commit 12bcb03
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,7 @@ function gen_uuid() {
?>
<#6>
<?php
$sql = 'SELECT id FROM ui_uihk_rest_client WHERE api_key = \'apollon\'';
$query = $ilDB->query($sql);
$row = $ilDB->fetchAssoc($query);
$id = (isset($row['id'])) ? intval($row['id']) : 1;

$id = 1;
$ilDB->insert('ui_uihk_rest_perm', array(
'api_id' => array('integer', $id),
'pattern' => array('text', '/v2/admin/clients'),
Expand Down Expand Up @@ -342,7 +338,6 @@ function gen_uuid() {
'verb' => array('text', 'DELETE')
));


global $ilLog;
$ilLog->write('Plugin REST -> DB-Update #6: Filled ui_uihk_rest_perm.');
?>
Expand Down Expand Up @@ -385,7 +380,7 @@ function gen_uuid() {
$ilDB->addPrimaryKey('ui_uihk_rest_refresh', array('id'));
$ilDB->manipulate('ALTER TABLE ui_uihk_rest_refresh CHANGE id id INT NOT NULL AUTO_INCREMENT');

global $ilLog;

$ilLog->write('Plugin REST -> DB-Update #7: Created ui_uihk_rest_refresh.');
?>
<#8>
Expand Down

0 comments on commit 12bcb03

Please sign in to comment.