Skip to content

Commit 57268d9

Browse files
Fix #157 by upgrading predis; Upgraded docker compose; Fixed submit button being cut off (#174)
1 parent cc9f24c commit 57268d9

File tree

10 files changed

+57
-47
lines changed

10 files changed

+57
-47
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM composer:1.7
1+
FROM composer:2.2
22

3-
ENV TINI_VERSION 0.18.0-r0
3+
ENV TINI_VERSION 0.19.0-r0
44

55
RUN apk add --no-cache tini=$TINI_VERSION
66

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
}
1414
],
1515
"require": {
16-
"predis/predis": "1.1.x-dev",
16+
"predis/predis": "v1.1.9",
1717
"paragonie/random_compat": ">=2"
1818
},
1919
"minimum-stability": "stable",
20-
"target-dir": "ErikDubbelboer/phpRedisAdmin"
20+
"target-dir": "ErikDubbelboer/phpRedisAdmin"
2121
}

composer.lock

Lines changed: 32 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/frame.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ margin-left: -8em;
1414
}
1515

1616
form .button {
17-
margin-left: -7em;
1817
}
1918

2019

docker-compose.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
phpredisadmin:
2-
build: .
3-
environment:
4-
- ADMIN_USER=admin
5-
- ADMIN_PASS=admin
6-
- REDIS_1_HOST=redis
7-
- REDIS_1_PORT=6379
8-
links:
9-
- redis
10-
ports:
11-
- "80:80"
1+
services:
2+
phpredisadmin:
3+
build: .
4+
environment:
5+
- ADMIN_USER=admin
6+
- ADMIN_PASS=admin
7+
- REDIS_1_HOST=redis
8+
- REDIS_1_PORT=6379
9+
links:
10+
- redis
11+
ports:
12+
- "80:80"
1213

13-
redis:
14-
image: redis
15-
command: --loglevel verbose
14+
redis:
15+
image: redis
16+
command: --loglevel verbose

edit.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,7 @@
185185

186186
<input type="hidden" name="oldvalue" value="<?php echo format_html($value)?>">
187187

188-
<p>
189188
<input type="submit" class="button" value="<?php echo $edit ? 'Edit' : 'Add'?>">
190-
</p>
191189

192190
</form>
193191
<?php

export.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function export_redis($key, $filter = false, $transform = false) {
1515
$outputKey = str_replace($filter, $transform, $key);
1616
else
1717
$outputKey = $key;
18-
18+
1919
// String
2020
if ($type == 'string') {
2121
echo 'SET "',addslashes($outputKey),'" "',addslashes($redis->get($key)),'"',PHP_EOL;
@@ -124,7 +124,7 @@ function export_json($key) {
124124

125125
// JSON
126126
if ($_POST['type'] == 'json') {
127-
127+
128128
// Single key
129129
if (isset($_GET['key'])) {
130130
echo json_encode(export_json($_GET['key']));
@@ -137,13 +137,13 @@ function export_json($key) {
137137
// if we have a filter and no match, nothing to do
138138
if($filter !== false && stripos($key, $filter) === false)
139139
continue;
140-
140+
141141
// we rename the keys as necessary
142142
if($filter !== false && $transform !== false)
143143
$outputKey = str_replace($filter, $transform, $key);
144144
else
145145
$outputKey = $key;
146-
146+
147147
$vals[$outputKey] = export_json($key);
148148
}
149149

@@ -165,7 +165,7 @@ function export_json($key) {
165165
// if we have a filter and no match, we skip
166166
if($filter !== false && stripos($key, $filter) === false)
167167
continue;
168-
168+
169169
export_redis($key, $filter, $transform);
170170
}
171171
}
@@ -195,7 +195,7 @@ function export_json($key) {
195195
<option value="redis" <?php echo (isset($_GET['type']) && ($_GET['type'] == 'redis')) ? 'selected="selected"' : ''?>>Redis</option>
196196
<option value="json" <?php echo (isset($_GET['type']) && ($_GET['type'] == 'json' )) ? 'selected="selected"' : ''?>>JSON</option>
197197
</select>
198-
</p>
198+
</p>
199199

200200
<?php if (!isset($_GET['key'])): ?>
201201
<p>
@@ -209,9 +209,7 @@ function export_json($key) {
209209
</p>
210210
<?php endif; ?>
211211

212-
<p>
213212
<input type="submit" class="button" value="Export">
214-
</p>
215213

216214
</form>
217215
<?php

import.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@
111111
<textarea name="commands" id="commands" cols="80" rows="20"></textarea>
112112
</p>
113113

114-
<p>
115114
<input type="submit" class="button" value="Import">
116-
</p>
117115

118116
</form>
119117
<?php

rename.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@
4545
<input type="text" name="key" id="key" size="30" <?php echo isset($_GET['key']) ? 'value="'.format_html($_GET['key']).'"' : ''?>>
4646
</p>
4747

48-
<p>
4948
<input type="submit" class="button" value="Rename">
50-
</p>
5149

5250
</form>
5351
<?php

ttl.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@
3939
<input type="text" name="ttl" id="ttl" size="30" <?php echo isset($_GET['ttl']) ? 'value="'.format_html($_GET['ttl']).'"' : ''?>> <span class="info">(-1 to remove the TTL)</span>
4040
</p>
4141

42-
<p>
4342
<input type="submit" class="button" value="Edit TTL">
44-
</p>
4543

4644
</form>
4745
<?php

0 commit comments

Comments
 (0)