1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-11 17:14:42 +02:00

Notice removal, eliminate DB queries

This commit is contained in:
e107steved
2007-08-08 19:34:52 +00:00
parent ee5bf62858
commit 8c320ad1de
5 changed files with 40 additions and 24 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/poll/poll_class.php,v $
| $Revision: 1.4 $
| $Date: 2007-08-06 19:16:28 $
| $Revision: 1.5 $
| $Date: 2007-08-08 19:34:34 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -286,9 +286,17 @@ class poll
if(count($voteArray))
{
foreach($voteArray as $votes){
$percentage[] = round(($votes/$voteTotal) * 100, 2);
foreach($voteArray as $votes)
{
if ($voteTotal > 0)
{
$percentage[] = round(($votes/$voteTotal) * 100, 2);
}
else
{
$percentage[] = 0;
}
}
}
/* get template */
if (file_exists(THEME."poll_template.php"))