[opw-web] mod_manage_programs: fix edit links for non-active programs



commit d87340e160f3c1235e03d05c78dd2c15a0896ee6
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Fri Oct 17 11:32:05 2014 -0400

    mod_manage_programs: fix edit links for non-active programs
    
    There was a skin-variable conflict so that the program for the row
    was overriden with the current program.

 modules/mod_manage_programs.php                    |    2 +-
 .../html/tpl_manage_programs_item.html             |    2 +-
 skins/neverland/html/tpl_manage_programs_item.html |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/modules/mod_manage_programs.php b/modules/mod_manage_programs.php
index 78b61b2..a9baad3 100644
--- a/modules/mod_manage_programs.php
+++ b/modules/mod_manage_programs.php
@@ -43,7 +43,7 @@ if ($action == 'list')
     {
         // Assign data for this program
         $skin->assign(array(
-            'program_id'          => $row['id'],
+            'prog_id'          =>    $row['id'], # 'program_id' is always the current program
             'program_title'       => htmlspecialchars($row['title']),
             'program_description' => nl2br(htmlspecialchars($row['description'])),
             'program_active'      => $skin->visibility($row['is_active'] == 1),
diff --git a/skins/easterngreen/html/tpl_manage_programs_item.html 
b/skins/easterngreen/html/tpl_manage_programs_item.html
index 3559daf..e9655ec 100644
--- a/skins/easterngreen/html/tpl_manage_programs_item.html
+++ b/skins/easterngreen/html/tpl_manage_programs_item.html
@@ -18,7 +18,7 @@
     </td>
 
     <td class="align-center">
-        <a href="?q=manage_programs&amp;a=editor&amp;p=[[program_id]]">
+        <a href="?q=manage_programs&amp;a=editor&amp;p=[[prog_id]]">
             <i class="icon-pencil"></i>
         </a>
     </td>
diff --git a/skins/neverland/html/tpl_manage_programs_item.html 
b/skins/neverland/html/tpl_manage_programs_item.html
index 3559daf..e9655ec 100644
--- a/skins/neverland/html/tpl_manage_programs_item.html
+++ b/skins/neverland/html/tpl_manage_programs_item.html
@@ -18,7 +18,7 @@
     </td>
 
     <td class="align-center">
-        <a href="?q=manage_programs&amp;a=editor&amp;p=[[program_id]]">
+        <a href="?q=manage_programs&amp;a=editor&amp;p=[[prog_id]]">
             <i class="icon-pencil"></i>
         </a>
     </td>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]