Changeset 17866

Show
Ignore:
Timestamp:
09/04/07 16:22:50 (10 months ago)
Author:
GamerZ
Message:

Checking Of Voted Returning Array

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wp-polls/trunk/polls/polls.php

    r17685 r17866  
    125125            if($poll_active == 0) { 
    126126                  $poll_close = intval(get_option('poll_close')); 
     127            } else { 
     128                  $poll_close = 0; 
    127129            } 
    128130            if($check_voted > 0 || ($poll_active == 0 && $poll_close == 1) || !check_allowtovote()) { 
     
    305307      // Check IP From IP Logging Database 
    306308      $get_voted_aids = $wpdb->get_col("SELECT pollip_aid FROM $wpdb->pollsip WHERE pollip_qid = $poll_id AND pollip_ip = '".get_ipaddress()."'"); 
    307       return $get_voted_aids; 
     309      if($get_voted_aids) { 
     310            return $get_voted_aids; 
     311      } else { 
     312            return 0; 
     313      } 
    308314} 
    309315 
     
    319325      // Check User ID From IP Logging Database 
    320326      $get_voted_aids = $wpdb->get_col("SELECT pollip_aid FROM $wpdb->pollsip WHERE pollip_qid = $poll_id AND pollip_userid = $pollsip_userid"); 
    321       return $get_voted_aids; 
     327      if($get_voted_aids) 
     328            return $get_voted_aids; 
     329      } else { 
     330            return 0; 
     331      } 
    322332} 
    323333 
  • wp-polls/trunk/polls/wp-polls.pot

    r17685 r17866  
    33"Project-Id-Version: WP-Polls 2.21\n" 
    44"POT-Creation-Date: \n" 
    5 "PO-Revision-Date: 2007-09-01 14:09+0800\n" 
     5"PO-Revision-Date: 2007-09-05 00:22+0800\n" 
    66"Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n" 
    77"Language-Team: Ravan <ravanhagen@gmail.com>\n" 
     
    415415#: polls-manager.php:489 
    416416#: polls-manager.php:497 
    417 #: polls.php:33
    418 #: polls.php:34
    419 #: polls.php:45
    420 #: polls.php:45
    421 #: polls.php:83
    422 #: polls.php:83
     417#: polls.php:34
     418#: polls.php:35
     419#: polls.php:46
     420#: polls.php:46
     421#: polls.php:84
     422#: polls.php:84
    423423#, php-format 
    424424msgid "%s @ %s" 
     
    584584#: polls-templates.php:116 
    585585#: polls-templates.php:119 
    586 #: polls.php:130
    587 #: polls.php:130
     586#: polls.php:131
     587#: polls.php:131
    588588msgid "Total Voters" 
    589589msgstr "" 
     
    598598 
    599599#: polls-manager.php:495 
    600 #: polls.php:34
    601 #: polls.php:45
    602 #: polls.php:83
     600#: polls.php:35
     601#: polls.php:46
     602#: polls.php:84
    603603msgid "No Expiry" 
    604604msgstr "" 
     
    826826#: polls-templates.php:110 
    827827#: polls-templates.php:113 
    828 #: polls.php:130
    829 #: polls.php:130
     828#: polls.php:131
     829#: polls.php:131
    830830msgid "Votes" 
    831831msgstr "" 
     
    10151015#: polls-templates.php:104 
    10161016#: polls-templates.php:119 
    1017 #: polls.php:129
    1018 #: polls.php:130
     1017#: polls.php:130
     1018#: polls.php:131
    10191019msgid "Vote" 
    10201020msgstr "" 
    10211021 
    10221022#: polls-templates.php:104 
    1023 #: polls.php:129
     1023#: polls.php:130
    10241024msgid "View Results Of This Poll" 
    10251025msgstr "" 
    10261026 
    10271027#: polls-templates.php:104 
    1028 #: polls.php:129
     1028#: polls.php:130
    10291029msgid "View Results" 
    10301030msgstr "" 
    10311031 
    10321032#: polls-templates.php:113 
    1033 #: polls.php:130
     1033#: polls.php:131
    10341034msgid "You Have Voted For This Choice" 
    10351035msgstr "" 
    10361036 
    10371037#: polls-templates.php:119 
    1038 #: polls.php:130
     1038#: polls.php:131
    10391039msgid "Vote For This Poll" 
    10401040msgstr "" 
     
    10421042#: polls-templates.php:122 
    10431043#: polls-usage.php:80 
    1044 #: polls.php:133
     1044#: polls.php:134
    10451045msgid "Polls Archive" 
    10461046msgstr "" 
     
    10551055 
    10561056#: polls-templates.php:131 
    1057 #: polls.php:130
     1057#: polls.php:131
    10581058msgid "Sorry, there are no polls available at the moment." 
    10591059msgstr "" 
    10601060 
    10611061#: polls-templates.php:134 
    1062 #: polls.php:131
     1062#: polls.php:132
    10631063msgid "An error has occurred when processing your poll." 
    10641064msgstr "" 
     
    15131513msgstr "" 
    15141514 
    1515 #: polls.php:196 
    1516 #: polls.php:202 
     1515#: polls.php:198 
     1516#: polls.php:204 
    15171517msgid "Poll" 
    15181518msgstr "" 
    15191519 
    1520 #: polls.php:203 
     1520#: polls.php:205 
    15211521msgid "Insert Poll" 
    15221522msgstr "" 
    15231523 
    1524 #: polls.php:41
    1525 #: polls.php:57
     1524#: polls.php:42
     1525#: polls.php:58
    15261526msgid "Loading" 
    15271527msgstr "" 
    15281528 
    1529 #: polls.php:62
     1529#: polls.php:63
    15301530msgid "Note: There is a poll embedded within this post, please visit the site to participate in this post's poll." 
    15311531msgstr "" 
    15321532 
    1533 #: polls.php:96
     1533#: polls.php:97
    15341534msgid "Previous Page" 
    15351535msgstr "" 
    15361536 
    1537 #: polls.php:97
     1537#: polls.php:98
    15381538msgid "Next Page" 
    15391539msgstr "" 
    15401540 
    1541 #: polls.php:98
     1541#: polls.php:99
    15421542msgid "Pages" 
    15431543msgstr "" 
    15441544 
    1545 #: polls.php:98
     1545#: polls.php:99
    15461546msgid "Go to First Page" 
    15471547msgstr "" 
    15481548 
    1549 #: polls.php:98
     1549#: polls.php:99
    15501550msgid "First" 
    15511551msgstr "" 
    15521552 
    1553 #: polls.php:98
    1554 #: polls.php:99
     1553#: polls.php:99
     1554#: polls.php:100
    15551555msgid "Go to Page" 
    15561556msgstr "" 
    15571557 
    1558 #: polls.php:99
     1558#: polls.php:100
    15591559msgid "Page" 
    15601560msgstr "" 
    15611561 
    1562 #: polls.php:100
     1562#: polls.php:101
    15631563msgid "Go to Last Page" 
    15641564msgstr "" 
    15651565 
    1566 #: polls.php:100
     1566#: polls.php:101
    15671567msgid "Last" 
    15681568msgstr "" 
    15691569 
    1570 #: polls.php:117
     1570#: polls.php:118
    15711571#, php-format 
    15721572msgid "Unable To Update Poll Total Votes And Poll Total Voters. Poll ID #%s" 
    15731573msgstr "" 
    15741574 
    1575 #: polls.php:117
     1575#: polls.php:118
    15761576#, php-format 
    15771577msgid "You Had Already Voted For This Poll. Poll ID #%s" 
    15781578msgstr "" 
    15791579 
    1580 #: polls.php:118
     1580#: polls.php:119
    15811581#, php-format 
    15821582msgid "Invalid Poll ID. Poll ID #%s" 
    15831583msgstr "" 
    15841584 
    1585 #: polls.php:1208 
    1586 #: polls.php:1210 
     1585#: polls.php:1218 
    15871586#: polls.php:1220 
     1587#: polls.php:1230 
    15881588msgid "WP-Polls" 
    15891589msgstr "" 
    15901590 
    1591 #: polls.php:122
     1591#: polls.php:123
    15921592msgid "polls were created." 
    15931593msgstr "" 
    15941594 
    1595 #: polls.php:122
     1595#: polls.php:123
    15961596msgid "polls' answers were given." 
    15971597msgstr "" 
    15981598 
    1599 #: polls.php:122
     1599#: polls.php:123
    16001600msgid "votes were casted." 
    16011601msgstr "" 
    16021602 
    1603 #: polls.php:127
     1603#: polls.php:128
    16041604msgid "How Is My Site?" 
    16051605msgstr "" 
    16061606 
    1607 #: polls.php:128
     1607#: polls.php:129
    16081608msgid "Good" 
    16091609msgstr "" 
    16101610 
    1611 #: polls.php:128
     1611#: polls.php:129
    16121612msgid "Excellent" 
    16131613msgstr "" 
    16141614 
    1615 #: polls.php:128
     1615#: polls.php:129
    16161616msgid "Bad" 
    16171617msgstr "" 
    16181618 
    1619 #: polls.php:128
     1619#: polls.php:129
    16201620msgid "Can Be Improved" 
    16211621msgstr "" 
    16221622 
    1623 #: polls.php:128
     1623#: polls.php:129
    16241624msgid "No Comments" 
    16251625msgstr ""