[geeklog-hg] geeklog: Added Author column to lists on the admin submissions p...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Thu Jun 27 13:42:04 EDT 2013


changeset 9141:910e53286d5d
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/910e53286d5d
user: Tom <websitemaster at cogeco.net>
date: Thu Jun 27 13:41:25 2013 -0400
description:
Added Author column to lists on the admin submissions page for stories and draft stories (feature request #0001605)

diffstat:

 language/english.php             |   2 +-
 language/english_utf-8.php       |   2 +-
 public_html/admin/moderation.php |  33 ++++++++++++++++++++-------------
 system/lib-admin.php             |   2 +-
 system/lib-story.php             |   6 ++++--
 5 files changed, 27 insertions(+), 18 deletions(-)

diffs (105 lines):

diff -r 0021a62e1a8e -r 910e53286d5d language/english.php
--- a/language/english.php	Thu Jun 27 12:44:19 2013 -0400
+++ b/language/english.php	Thu Jun 27 13:41:25 2013 -0400
@@ -1055,7 +1055,7 @@
     34 => 'Command and Control',
     35 => 'Story Submissions',
     36 => 'Parent or Comment',
-    37 => '',
+    37 => 'Author',
     38 => 'Submit',
     39 => 'There are no submissions to moderate at this time',
     40 => 'User Submissions',
diff -r 0021a62e1a8e -r 910e53286d5d language/english_utf-8.php
--- a/language/english_utf-8.php	Thu Jun 27 12:44:19 2013 -0400
+++ b/language/english_utf-8.php	Thu Jun 27 13:41:25 2013 -0400
@@ -1055,7 +1055,7 @@
     34 => 'Command and Control',
     35 => 'Story Submissions',
     36 => 'Parent or Comment',
-    37 => '',
+    37 => 'Author',
     38 => 'Submit',
     39 => 'There are no submissions to moderate at this time',
     40 => 'User Submissions',
diff -r 0021a62e1a8e -r 910e53286d5d public_html/admin/moderation.php
--- a/public_html/admin/moderation.php	Thu Jun 27 12:44:19 2013 -0400
+++ b/public_html/admin/moderation.php	Thu Jun 27 13:41:25 2013 -0400
@@ -204,20 +204,27 @@
         $data_arr[$i] = $A;
     }
 
-    $header_arr = array(      // display 'text' and use table field 'field'
-        array('text' => $LANG_ADMIN['edit'], 'field' => 0),
-        array('text' => $H[0], 'field' => 1),
-        array('text' => $H[1], 'field' => 2),
-        array('text' => $H[2], 'field' => 3),
-        array('text' => $LANG29[2], 'field' => 'delete'),
-        array('text' => $LANG29[1], 'field' => 'approve')
-    );
     if ($type == 'comment') {
-        // data for comment submission headers
-        $header_arr[6]['text'] = $LANG29[42];
-        $header_arr[6]['field'] = 'uid';
-        $header_arr[7]['text'] = $LANG29[43];
-        $header_arr[7]['field'] = 'publishfuture';
+        $header_arr = array(      // display 'text' and use table field 'field'
+            array('text' => $LANG_ADMIN['edit'], 'field' => 0),
+            array('text' => $H[0], 'field' => 1),
+            array('text' => $H[1], 'field' => 2),
+            array('text' => $H[2], 'field' => 3),
+            array('text' => $LANG29[2], 'field' => 'delete'),
+            array('text' => $LANG29[1], 'field' => 'approve'),
+            array('text' => $LANG29[42], 'field' => 'uid'),
+            array('text' => $LANG29[43], 'field' => 'publishfuture')
+        );            
+    } else {
+        $header_arr = array(      // display 'text' and use table field 'field'
+            array('text' => $LANG_ADMIN['edit'], 'field' => 0),
+            array('text' => $H[0], 'field' => 1),
+            array('text' => $H[1], 'field' => 'uid'),
+            array('text' => $H[2], 'field' => 3),
+            array('text' => $H[3], 'field' => 4),
+            array('text' => $LANG29[2], 'field' => 'delete'),
+            array('text' => $LANG29[1], 'field' => 'approve')
+        );            
     }
 
     $text_arr = array('has_menu' => false,
diff -r 0021a62e1a8e -r 910e53286d5d system/lib-admin.php
--- a/system/lib-admin.php	Thu Jun 27 12:44:19 2013 -0400
+++ b/system/lib-admin.php	Thu Jun 27 13:41:25 2013 -0400
@@ -1318,7 +1318,7 @@
         break;
 
     default:
-        if (($fieldname == 3) && (($type == 'story') || ($type == 'story_draft'))) {
+        if (($fieldname == 4) && (($type == 'story') || ($type == 'story_draft'))) {
             $retval = TOPIC_getTopicAdminColumn('article', $A[0]);
         } elseif (($fieldname == 2) && ($type == 'comment')) {
             $commenttext = COM_getTextContent($A['comment']);
diff -r 0021a62e1a8e -r 910e53286d5d system/lib-story.php
--- a/system/lib-story.php	Thu Jun 27 12:44:19 2013 -0400
+++ b/system/lib-story.php	Thu Jun 27 13:41:25 2013 -0400
@@ -1246,8 +1246,9 @@
         $plugin = new Plugin();
         $plugin->submissionlabel = $LANG29[35];
         $plugin->submissionhelpfile = 'ccstorysubmission.html';
-        $plugin->getsubmissionssql = "SELECT sid AS id,title,date,ta.tid FROM {$_TABLES['storysubmission']}, {$_TABLES['topic_assignments']} ta WHERE ta.type = 'article' AND ta.id = sid AND ta.tdefault = 1 " . COM_getTopicSQL ('AND') . " ORDER BY date ASC";
+        $plugin->getsubmissionssql = "SELECT sid AS id,title,uid,date,ta.tid FROM {$_TABLES['storysubmission']}, {$_TABLES['topic_assignments']} ta WHERE ta.type = 'article' AND ta.id = sid AND ta.tdefault = 1 " . COM_getTopicSQL ('AND') . " ORDER BY date ASC";
         $plugin->addSubmissionHeading($LANG29[10]);
+        $plugin->addSubmissionHeading($LANG29[37]);
         $plugin->addSubmissionHeading($LANG29[14]);
         $plugin->addSubmissionHeading($LANG29[15]);
 
@@ -1314,8 +1315,9 @@
         $plugin = new Plugin();
         $plugin->submissionlabel = $LANG29[35] . ' (' . $LANG24[34] . ')';
         $plugin->submissionhelpfile = 'ccdraftsubmission.html';
-        $plugin->getsubmissionssql = "SELECT sid AS id,title,date,tid FROM {$_TABLES['stories']}, {$_TABLES['topic_assignments']} ta WHERE ta.type = 'article' AND ta.id = sid AND ta.tdefault = 1 AND draft_flag = 1 " . COM_getTopicSQL ('AND') . COM_getPermSQL ('AND', 0, 3) . " ORDER BY date ASC";
+        $plugin->getsubmissionssql = "SELECT sid AS id,title,uid,date,tid FROM {$_TABLES['stories']}, {$_TABLES['topic_assignments']} ta WHERE ta.type = 'article' AND ta.id = sid AND ta.tdefault = 1 AND draft_flag = 1 " . COM_getTopicSQL ('AND') . COM_getPermSQL ('AND', 0, 3) . " ORDER BY date ASC";
         $plugin->addSubmissionHeading($LANG29[10]);
+        $plugin->addSubmissionHeading($LANG29[37]);
         $plugin->addSubmissionHeading($LANG29[14]);
         $plugin->addSubmissionHeading($LANG29[15]);
 



More information about the geeklog-cvs mailing list