Skip to content
Permalink
Browse files

better handling of bad personal-note-coordinate input; updates #169

  • Loading branch information...
following5 committed May 25, 2015
1 parent 1df52c4 commit 1321fe65665e70d0ff52dce63a19b9bb7dd4b67b
Showing with 13 additions and 2 deletions.
  1. +6 −1 htdocs/libse/CacheNote/Presenter.php
  2. +7 −1 htdocs/templates2/ocstyle/viewcache.tpl
@@ -58,7 +58,12 @@ public function validate()
$this->request->validate(self::req_note, new Validator_AlwaysValid());
if ($this->includeCoordinate())
return $coordinateValid = $this->coordinate->validate();
{
$this->coordinate->validate();
// Removed false-return for invalid coordinate, so that at least the note will be saved.
// validate() produces some formal valid coordinate.
// -- following 25 May 2015
}
else
$this->coordinate->init(0, 0);
@@ -331,7 +331,7 @@
<!-- Personal Note -->
{if $enableCacheNote}
<div class="content2-container bg-blue02">
<div class="content2-container bg-blue02" id="personal_note">
<p class="content-title-noshade-size2">
<img src="resource2/{$opt.template.style}/images/description/20x20-cache-note.png" style="align: left; margin-right: 10px;" alt="{t}Personal cache note{/t}" />
{t}Personal cache note{/t}
@@ -537,5 +537,11 @@
</script>
{/if}
{if $enableCacheNote && isset($coord_error)}
<script type="text/javascript">
document.getElementById('personal_note').scrollIntoView();
</script>
{/if}
<!-- End Logs -->
{/if} {* not $show_logpics *}

0 comments on commit 1321fe6

Please sign in to comment.
You can’t perform that action at this time.