Максим Червонный (fiskus_boulder) wrote in changelog,
Максим Червонный
fiskus_boulder
changelog

[livejournal] r19874: LJSUP-9517: Edit Entries, refactoring of...

Committer: mchervonniy
LJSUP-9517: Edit Entries, refactoring of edit-link
U   trunk/htdocs/editjournal.bml
Modified: trunk/htdocs/editjournal.bml
===================================================================
--- trunk/htdocs/editjournal.bml	2011-08-26 10:17:38 UTC (rev 19873)
+++ trunk/htdocs/editjournal.bml	2011-08-26 10:34:46 UTC (rev 19874)
@@ -115,18 +115,11 @@
             $ret .= $sec;
 
             $ret .= "<p class='b-editentry-ctrls'>";
+            my $ditemid_get = $getextra ? ("$getextra&amp;itemid=" . $entry->ditemid) : ("?itemid=" . $entry->ditemid);
             if (!$edit_disable) {
-                if ($getextra) {
-                    $ret .= "<a href='editjournal.bml$getextra&amp;itemid=" . $entry->ditemid . "&amp;mode=edit' class='b-editentry-edit-btn b-editentry-ctrl-btn'></a>";
-                } else {
-                    $ret .= "<a href='editjournal.bml?itemid=" . $entry->ditemid . "&amp;mode=edit' class='b-editentry-edit-btn b-editentry-ctrl-btn'></a>";
-                }
+                $ret .= "<a href='editjournal.bml" . $ditemid_get . "&amp;mode=edit' class='b-editentry-edit-btn b-editentry-ctrl-btn'></a>";
             } else {
-                if ($getextra) {
-                    $ret .= "<a href='editjournal.bml$getextra&amp;itemid=" . $entry->ditemid . "&amp;mode=delete' class='b-editentry-edit-btn b-editentry-ctrl-btn'></a>";
-                } else {
-                    $ret .= "<a href='editjournal.bml?itemid=" . $entry->ditemid . "&amp;mode=delete' class='b-editentry-edit-btn b-editentry-ctrl-btn'></a>";
-                }
+                $ret .= "<a href='editjournal.bml" . $ditemid_get . "&amp;mode=delete' class='b-editentry-del-btn b-editentry-ctrl-btn'></a>";
             }
             $ret .= "</p>";
 

Tags: bml, fiskus_boulder, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments