mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
Minor tweaks
This commit is contained in:
parent
359ed44729
commit
a71210658f
@ -117,7 +117,7 @@ class Database {
|
||||
}
|
||||
|
||||
open() {
|
||||
this.db_ = SQLite.openDatabase({ name: '/storage/emulated/0/Download/joplin-26.sqlite' }, (db) => {
|
||||
this.db_ = SQLite.openDatabase({ name: '/storage/emulated/0/Download/joplin-27.sqlite' }, (db) => {
|
||||
Log.info('Database was open successfully');
|
||||
}, (error) => {
|
||||
Log.error('Cannot open database: ', error);
|
||||
|
@ -246,7 +246,14 @@ switch ($action) {
|
||||
if (count($diff)) {
|
||||
execRequest('PATCH', $path . '/' . $_POST['item_id'], null, $diff);
|
||||
}
|
||||
redirect('/');
|
||||
|
||||
$query = array(
|
||||
'action' => 'item',
|
||||
'type' => $_POST['type'],
|
||||
'item_id' => $_POST['item_id'],
|
||||
);
|
||||
|
||||
redirect('/?' . http_build_query($query));
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
<td><?php echo htmlentities($it['type']); ?></td>
|
||||
<td><?php echo htmlentities($it['item_type']); ?></td>
|
||||
<td><?php echo htmlentities($it['item_id']); ?></td>
|
||||
<td><?php echo htmlentities($t == 'update' ? json_encode($it['item']) : ''); ?></td>
|
||||
<td><?php echo htmlentities($it['type'] == 'update' ? json_encode($it['item']) : ''); ?></td>
|
||||
</tr>
|
||||
<?php endfor; ?>
|
||||
</table>
|
73219
phpunit-5.7.20.phar
Normal file
73219
phpunit-5.7.20.phar
Normal file
File diff suppressed because one or more lines are too long
@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
bootstrap="app/autoload.php"
|
||||
>
|
||||
<php>
|
||||
<ini name="error_reporting" value="-1" />
|
||||
<server name="KERNEL_DIR" value="app/" />
|
||||
</php>
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="Project Test Suite">
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory>src</directory>
|
||||
<exclude>
|
||||
<directory>src/*Bundle/Resources</directory>
|
||||
<directory>src/*/*Bundle/Resources</directory>
|
||||
<directory>src/*/Bundle/*Bundle/Resources</directory>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
@ -1,2 +1,2 @@
|
||||
#!/bin/bash
|
||||
phpunit --bootstrap vendor/autoload.php tests/Model/
|
||||
php phpunit-5.7.20.phar --bootstrap vendor/autoload.php tests/Model/
|
@ -49,9 +49,8 @@ class NotesController extends ApiController {
|
||||
|
||||
if ($request->isMethod('PATCH')) {
|
||||
$data = $this->patchParameters();
|
||||
foreach ($data as $n => $v) {
|
||||
$note->{$n} = $v;
|
||||
}
|
||||
$note->fromPublicArray($this->patchParameters());
|
||||
$note->id = Note::unhex($id);
|
||||
$note->save();
|
||||
return static::successResponse($note);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ require_once dirname(__FILE__) . '/BaseTestCase.php';
|
||||
$dbConfig = array(
|
||||
'dbName' => 'notes_test',
|
||||
'user' => 'root',
|
||||
'password' => '',
|
||||
'password' => 'pass',
|
||||
'host' => '127.0.0.1',
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user