Skip to content

Commit

Permalink
TagAnno annoFormat is dead code.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Sep 8, 2023
1 parent bd39cf2 commit d9a1d6e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
9 changes: 4 additions & 5 deletions lib/tagger.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,10 @@ function jsonSerialize() {
}
if ($this->heading !== null) {
$j["legend"] = $this->heading; // XXX "heading" backward compat
}
if ($this->heading !== null
&& $this->heading !== ""
&& ($format = Conf::$main->check_format($this->annoFormat, $this->heading))) {
$j["format"] = +$format;
if ($this->heading !== ""
&& ($format = Conf::$main->check_format(null, $this->heading))) {
$j["format"] = +$format;
}
}
if ($this->_props === null && $this->infoJson !== null) {
$this->decode_props();
Expand Down
2 changes: 0 additions & 2 deletions src/api/api_taganno.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ static function set(Contact $user, Qrequest $qreq) {
$qf = [];
if (isset($anno->legend)) {
$qf[] = "heading=?";
$qf[] = "annoFormat=?";
$qv[] = $anno->legend;
$qv[] = null;
}
if (isset($anno->tagval)) {
$tagval = trim($anno->tagval);
Expand Down
2 changes: 1 addition & 1 deletion src/papercolumns/pc_tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function content(PaperList $pl, PaperInfo $row) {
&& $ta->heading !== "") {
$h = htmlspecialchars($ta->heading);
$k = "pltagheading";
if (($format = $pl->conf->check_format($ta->annoFormat, $ta->heading))) {
if (($format = $pl->conf->check_format(null, $ta->heading))) {
$k .= " need-format\" data-format\"{$format}";
$pl->need_render = true;
}
Expand Down
9 changes: 4 additions & 5 deletions src/paperlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -1677,11 +1677,10 @@ private function _mark_groups_html($grouppos, $rstate, &$body, $last) {
$x = "<span class=\"plheading-group";
if ($ginfo->heading !== "") {
$x .= " pr-2";
}
if ($ginfo->heading !== ""
&& ($format = $this->conf->check_format($ginfo->annoFormat, $ginfo->heading))) {
$x .= " need-format\" data-format=\"{$format}";
$this->need_render = true;
if (($format = $this->conf->check_format(null, $ginfo->heading))) {
$x .= " need-format\" data-format=\"{$format}";
$this->need_render = true;
}
}
$x .= "\" data-title=\"" . htmlspecialchars($ginfo->heading)
. "\">" . htmlspecialchars($ginfo->heading)
Expand Down

0 comments on commit d9a1d6e

Please sign in to comment.