Changeset 3680 for extensions/mypolls


Ignore:
Timestamp:
Jul 26, 2009, 3:23:03 PM (11 years ago)
Author:
grum
Message:

Update MyPolls to 2.1.0 alpha-2
Minor changes (ajax management is modified to be compatible with AMM 2.1.0)

Location:
extensions/mypolls
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/mypolls/main.inc.php

    r3397 r3680  
    22/*
    33Plugin Name: MyPolls.2
    4 Version: 2.1.0
    5 Description: Plugin pour faire des sondages sur sa gallerie / Plugin to carry out surveys on its gallery 
     4Version: 2.1.0 alpha-2
     5Description: Plugin pour faire des sondages sur sa gallerie / Plugin to carry out surveys on its gallery
    66Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=181
    77Author: grum@piwigo.org
     
    3030  2.0.2       - 02/01/08  - correction template (ajax) pour être compatible avec IE7.0
    3131                          - remplacement des "&" dans les URL par des "&" pour être aux normes
    32   2.0.3       - 06/01/08  - correction insertions avec MySQL 5 
     32  2.0.3       - 06/01/08  - correction insertions avec MySQL 5
    3333  2.0.4       - 06/01/08  - correction insertions&maj
    3434                          - correction pb sur affichage de mypolls_action_ok
     
    4242                          + PHP5 classe
    4343                          + install process can import database file (.sql) if present
     44                          + compatibilty with AMM 2.1.0 for ajax functions (alpha-2)
    4445
    4546:: TO DO
     
    6667define('MYPOLLS_PATH' , PHPWG_PLUGINS_PATH . MYPOLLS_DIR . '/');
    6768
    68 define('MYPOLLS_VERSION' , '2.1.0'); // => ne pas oublier la version dans l'entête !!
     69define('MYPOLLS_VERSION' , '2.1.0 Alpha-2'); // => ne pas oublier la version dans l'entête !!
    6970
    7071global $prefixeTable;
  • extensions/mypolls/maintain.inc.php

    r3397 r3680  
    2929{
    3030  @include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/main.inc.php');
    31   // need GPC release greater or equal than 2.0.1
    32   if(checkGPCRelease(2,0,1))
     31  // need GPC release greater or equal than 2.0.3
     32  if(checkGPCRelease(2,0,3))
    3333  {
    3434    @include_once('mypolls_install.class.inc.php');
     
    3939function gpcMsgError(&$errors)
    4040{
    41   array_push($errors, sprintf(l10n('mypolls_gpc2_not_installed'), "2.0.1"));
     41  array_push($errors, sprintf(l10n('mypolls_gpc2_not_installed'), "2.0.3"));
    4242}
    4343// -----------------------------------------------------------------------------
     
    4949
    5050
    51 function plugin_install($plugin_id, $plugin_version, &$errors) 
     51function plugin_install($plugin_id, $plugin_version, &$errors)
    5252{
    5353  global $prefixeTable, $gpc_installed;
  • extensions/mypolls/mypolls_pip.class.inc.php

    r3397 r3680  
    211211      if((isset($_POST['submit_results']))&&(!$this->get_user_already_vote($poll_id, $user['user_id'], $_SERVER['REMOTE_ADDR'])))
    212212      {
    213 
    214213        if(!isset($_REQUEST['fmypolls_comment']))
    215214        { $_REQUEST['fmypolls_comment']=''; }
     
    467466    if(isset($_REQUEST['ajaxfct']))
    468467    {
    469       $poll_id=$this->extract_poll_id_from_uri();
    470       //$user['language'] = $_REQUEST['lang'];
    471       switch($_REQUEST['ajaxfct'])
    472       {
    473         case 'poll_question_blocks':
    474           $result=$this->ajax_poll_question_blocks($poll_id, $_REQUEST['question'], $_REQUEST['lang']);
    475           break;
    476         case 'poll_comment_list':
    477           $result=$this->ajax_poll_comment_list($poll_id, $_REQUEST['vpage']);
    478           break;
    479       }
    480       $this->ajax->return_result($result);
     468      if($_REQUEST['ajaxfct'] == 'poll_question_blocks' || $_REQUEST['ajaxfct'] == 'poll_comment_list')
     469      {
     470        switch($_REQUEST['ajaxfct'])
     471        {
     472          case 'poll_question_blocks':
     473            $result=$this->ajax_poll_question_blocks($this->extract_poll_id_from_uri(), $_REQUEST['question'], $_REQUEST['lang']);
     474            break;
     475          case 'poll_comment_list':
     476            $result=$this->ajax_poll_comment_list($this->extract_poll_id_from_uri(), $_REQUEST['vpage']);
     477            break;
     478        }
     479        $this->ajax->return_result($result);
     480      }
    481481    }
    482482  }
Note: See TracChangeset for help on using the changeset viewer.