]> CyberLeo.Net >> Repos - Github/YOURLS.git/commit
Re-enable actions only if edit-save succeeded
authorBestNa.me Labs <info@bestna.me>
Tue, 22 Mar 2016 19:09:38 +0000 (20:09 +0100)
committerBestNa.me Labs <info@bestna.me>
Tue, 22 Mar 2016 19:09:38 +0000 (20:09 +0100)
commitaf866b3e653bb378533ad741d720757b01657f1a
tree9d4cdad23d53b30d6d097ba7d57906eba38d6f6d
parent2f9e0c18129184ec8257ee2a5c1c64ef085e05eb
Re-enable actions only if edit-save succeeded

Fixes a flaw in `edit_link_save()` in insert.js:

On exit, `edit_link_save()` re-enables all buttons of the action column, regardless of the value of `status` as returned by the ajax call (`action=edit_save`), i.e. also if the `status` is `fail` which means that the edit row remains visible. Because of that, it is then possible to open another edit row for the same keyword/long URL row. It is even possible to repeat this, introducing an arbitrary number of open edit rows with the same content.
js/insert.js