pereorga / minimalist-web-notepad

Minimalist Web Notepad
https://notes.orga.cat
1.01k stars 276 forks source link

An attempt to remove $name #28

Closed qex closed 6 years ago

qex commented 6 years ago

It is all about the question "what is minimalist".

Will the code looks clear now?

pereorga commented 6 years ago

That looks good.

.htaccess should also be changed. And the nginx instructions in the README

qex commented 6 years ago

Yeah I will go with that.

And actually it doesn't cause more characters transfer because the rewrite.

No one visit note using /?f=xxxxx or /?note=xxxxx, they just use /xxxxx and everything are same.

pereorga commented 6 years ago

No one visit note using /?f=xxxxx or /?note=xxxxx, they just use /xxxxx and everything are same.

True, I forgot that JS code is using a relative path. It's only the text in POST then that requires more chars. But that's fine.

$path = "$data_directory/{$_GET['note']}";

Wouldn't that be more readable with $data_directory . '/' . $_GET['note'] or "$data_directory/" . $_GET['note'] ?

pereorga commented 6 years ago

Great!

qex commented 6 years ago

Let me see, it makes little difference, however without {} the code looks more clear.

qex commented 6 years ago

Yeah it is great!