ID
diff --git a/e107_plugins/poll/languages/admin/English.php b/e107_plugins/poll/languages/admin/English.php
index f99703103..230ae6e8b 100644
--- a/e107_plugins/poll/languages/admin/English.php
+++ b/e107_plugins/poll/languages/admin/English.php
@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/poll/languages/admin/English.php,v $
-| $Revision: 1.1 $
-| $Date: 2008-08-16 16:25:45 $
+| $Revision: 1.2 $
+| $Date: 2008-08-17 11:54:40 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -25,6 +25,7 @@ define("POLL_ADLAN04", "The poll plugin has been successfully installed. To add
define("POLL_ADLAN05", "Main Poll: ");
define("POLL_ADLAN06", "Forum Thread: ");
define("POLL_ADLAN07", "Type");
+define("POLL_ADLAN08", "Poll deleted");
define("POLLAN_MENU_CAPTION", "Poll");
@@ -73,8 +74,15 @@ define("POLLAN_41", "This poll is restricted to members only");
define("POLLAN_42", "This poll is restricted to administrators only");
define("POLLAN_43", "You do not have the required permissions to vote in this poll");
define("POLLAN_44", "Delete this poll?");
-define("POLLAN_45", "Poll successfully updated");
*/
+define("POLLAN_45", "Poll successfully updated");
define("POLLAN_46", "Field(s) left blank");
+// Log messages
+define('LAN_AL_POLL_01','Poll deleted');
+define('LAN_AL_POLL_02','Poll updated');
+define('LAN_AL_POLL_03','Poll added');
+define('LAN_AL_POLL_04','');
+define('LAN_AL_POLL_05','');
+
?>
\ No newline at end of file
diff --git a/e107_plugins/poll/plugin.xml b/e107_plugins/poll/plugin.xml
index 90fb8ba42..0914752fc 100644
--- a/e107_plugins/poll/plugin.xml
+++ b/e107_plugins/poll/plugin.xml
@@ -1,6 +1,6 @@
-
+
POLL_ADLAN01
2.0
Steve Dunstan (jalist)
@@ -9,6 +9,7 @@
0.8
true
poll
+
poll
admin_config.php
diff --git a/e107_plugins/poll/poll_class.php b/e107_plugins/poll/poll_class.php
index 4a061ff54..fae08aa06 100644
--- a/e107_plugins/poll/poll_class.php
+++ b/e107_plugins/poll/poll_class.php
@@ -11,15 +11,14 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/poll/poll_class.php,v $
-| $Revision: 1.10 $
-| $Date: 2008-08-04 20:31:49 $
+| $Revision: 1.11 $
+| $Date: 2008-08-17 11:54:39 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
-@include_once(e_PLUGIN."poll/languages/".e_LANGUAGE.".php");
-@include_once(e_PLUGIN."poll/languages/English.php");
+@include_lan(e_PLUGIN."poll/languages/".e_LANGUAGE.".php");
define("POLLCLASS", TRUE);
define("POLL_MODE_COOKIE", 0);
define("POLL_MODE_IP", 1);
@@ -33,14 +32,15 @@ class poll
function delete_poll($existing)
{
- global $sql;
+ global $sql, $admin_log;
if ($sql -> db_Delete("polls", " poll_id='".intval($existing)."' "))
{
if(function_exists("admin_purge_related"))
{
admin_purge_related("poll", $existing);
}
- return "Poll deleted.";
+ $admin_log->log_event('POLL_01',POLL_ADLAN08.': '.$existing,'');
+ return POLL_ADLAN08;
}
}
@@ -52,7 +52,7 @@ class poll
$mode = 2 :: poll is forum poll
*/
- global $tp, $sql;
+ global $tp, $sql, $admin_log;
$poll_title = $tp->toDB($_POST['poll_title']);
$poll_comment= $tp -> toDB($_POST['poll_comment']);
@@ -74,7 +74,7 @@ class poll
$sql -> db_Update("polls", "poll_title='{$poll_title}',
poll_options='{$poll_options}',
poll_comment='{$poll_comment}',
- poll_type=$mode,
+ poll_type={$mode},
poll_allow_multiple={$multipleChoice},
poll_result_type={$showResults},
poll_vote_userclass={$pollUserclass},
@@ -97,9 +97,11 @@ class poll
$sql -> db_Update("polls", "poll_votes='".$foo['poll_votes']."' WHERE poll_id='".intval(POLLID)."' ");
}
+ $admin_log->log_event('POLL_02','ID: '.POLLID.' - '.$poll_title,'');
$message = POLLAN_45;
- } else {
-
+ }
+ else
+ {
$votes = "";
for($a=1; $a<=count($_POST['poll_option']); $a++)
{
@@ -117,7 +119,8 @@ class poll
$sql -> db_Update("polls", "poll_end_datestamp='".time()."', poll_vote_userclass='255' WHERE poll_id=".$deacpoll['poll_id']);
}
}
- $sql -> db_Insert("polls", "'0', ".time().", ".intval($active_start).", ".intval($active_end).", ".ADMINID.", '$poll_title', '$poll_options', '$votes', '', '1', '".$tp -> toDB($poll_comment)."', '".intval($multipleChoice)."', '".intval($showResults)."', '".intval($pollUserclass)."', '".intval($storageMethod)."'");
+ $ret = $sql -> db_Insert("polls", "'0', ".time().", ".intval($active_start).", ".intval($active_end).", ".ADMINID.", '{$poll_title}', '{$poll_options}', '{$votes}', '', '1', '".$tp -> toDB($poll_comment)."', '".intval($multipleChoice)."', '".intval($showResults)."', '".intval($pollUserclass)."', '".intval($storageMethod)."'");
+ $admin_log->log_event('POLL_03','ID: '.$ret.' - '.$poll_title,''); // Intentionally only log admin-entered polls
}
else
{
|