Plugin Directory

Changeset 619814


Ignore:
Timestamp:
11/01/2012 02:08:04 PM (13 years ago)
Author:
tosend.it
Message:

Version 2.4.6 released

Location:
pafacile
Files:
16 edited
30 copied

Legend:

Unmodified
Added
Removed
  • pafacile/tags/2.4.6/alboPretorio/elenco.php

    r525549 r619814  
    11<?php
    22
    3 function displayAlboPretorioPublic($params){
     3function displayAlboPretorioPublic($params, $extraParams = array()){
    44    global $wpdb;
    55    $params = toSendItGenericMethods::identifyParameters($params,
     
    1111        )
    1212    );
     13    $params = array_merge ($params, $extraParams);
     14   
    1315    extract($params);
    1416    switch($params['kind']){
  • pafacile/tags/2.4.6/bandi/elenco.php

    r559534 r619814  
    11<?php
    22
    3 function displayBandiPublic($params){
     3function displayBandiPublic($params, $extraParams = array()){
    44    global $wpdb;
    55   
     
    99        )
    1010    );
     11    $params = array_merge($params, $extraParams);
     12   
    1113    extract($params);
    1214    switch($kind){
  • pafacile/tags/2.4.6/delibere/elenco.php

    r484663 r619814  
    22#require_once 'public-contents/Delibere.php';
    33
    4 function displayDeliberePublic($params){
     4function displayDeliberePublic($params, $extraParams = array()){
    55    global $wpdb;
    66   
     
    1515        )
    1616    );
    17    
     17    $params = array_merge ($params, $extraParams);
    1818    extract($params);
    1919   
     
    2525        case 'table':
    2626            return Delibere::elenco($params);
    27             #toSendItPAFacileContents::mostraDelibereElenco($params);
    2827            break;         
    2928           
  • pafacile/tags/2.4.6/determine/elenco.php

    r484663 r619814  
    22# require_once 'public-contents/Determine.php';
    33
    4 function displayDeterminePublic($params){
     4function displayDeterminePublic($params, $extraParams = array()){
    55    $params = toSendItGenericMethods::identifyParameters($params,
    66        array(
     
    1616        )
    1717    );
    18     #print_r($params); 
     18    $params = array_merge ($params, $extraParams);
    1919    switch($params['kind']){
    2020        case 'box':
  • pafacile/tags/2.4.6/incarichiProfessionali/elenco.php

    r559534 r619814  
    122122}
    123123
    124 function displayIncarichiProfessionaliPublic($params){
     124function displayIncarichiProfessionaliPublic($params, $extraParams = array()){
    125125    /*
    126126     * Utilizzato dai widget o sulla pagina
     
    137137        )
    138138    );
    139    
     139    $params = array_merge ($params, $extraParams);
    140140    switch($params['kind']){
    141141        case 'box':
  • pafacile/tags/2.4.6/mce/editor_plugin.dev.js

    r484663 r619814  
    1616                    'title="%shortcode%" />',
    1717                   
    18         shortCodeRegExp:/(\[PAFacile ([a-z]+)(.+)?\])/i,
     18        shortCodeRegExp:/(\[PAFacile ([a-z]+)([^\]]+)?\])/i,
    1919       
    2020        is: function(n){
     
    2222            if(n==null) return false;
    2323            if(n.nodeName.toLowerCase() != 'hr') return false;
    24             return regExp.test(n.title);
     24            return regExp.test(decodeURI(n.title));
    2525           
    2626        },
    2727        getVisual: function(url, shortcode, type, aspect){
    2828            // le statistiche e gli altri atti hanno un visual shortcode differente
     29           
    2930            var visualCode = (type==='statistiche')?
    3031                    tinyMCE.activeEditor.plugins.PAFacile.visualCodeStatistiche:
    3132                    tinyMCE.activeEditor.plugins.PAFacile.visualCode;
    3233            visualCode = visualCode.replace('%url%', url);
    33             visualCode = visualCode.replace('%shortcode%', shortcode);
     34            // console.log("Sono qui: " + aspect );
     35            if(aspect.indexOf(',')!=-1){
     36                aspect = aspect.substring(0, aspect.indexOf(','));
     37            }
     38            visualCode = visualCode.replace('%shortcode%', encodeURI(shortcode) );
    3439            visualCode = visualCode.replace('%type%', type);
    3540            visualCode = visualCode.replace('%aspect%', aspect);
     
    4247                authorurl : 'http://toSend.it',
    4348                infourl : 'http://toSend.it/prodotti/pafacile',
    44                 version : "1.0"
     49                version : "1.1"
    4550            };
    4651        },
     
    6570                       
    6671                        if (theNode) {
    67                             value = (theNode.getAttribute('title') ? theNode.getAttribute('title') : "");
     72                            value = decodeURI(theNode.getAttribute('title') ? theNode.getAttribute('title') : "");
    6873                           
    6974                           
     
    106111            ed.onPostProcess.add(function(ed, o) {
    107112                if (o.get)
    108                     o.content = o.content.replace(/<hr[^>]+title\="(\[PAFacile[^\]]+\])"[^>]+>/g, function(hr) {
    109                         hr = hr.replace(/<hr[^>]+title\="/,'');
    110                         hr = hr.replace(/\]"[^>]\/>$/,']');
     113                    o.content = o.content.replace(/<hr[^>]+title\="(%5BPAFacile.*)"[^>]+>/g, function(hr) {
     114                       
     115                        hr = hr.replace(/<hr[^>]+title\="(.*)".*>/i,'$1');
     116                        // hr = hr.replace(/"[^>]\/>$/,']');
     117                        hr = decodeURI(hr);
     118                        // console.log(hr);
    111119                        return hr;
    112120                    });
     
    146154                       
    147155                        // console.log(scElements);
     156                       
    148157                        var out = tinyMCE.activeEditor.plugins.PAFacile.getVisual(
    149158                                tinyMCE.activeEditor.plugins.PAFacile.url,
     
    204213                    shortcode += tipo;
    205214                   
    206                     console.log("azione: " + azione);
    207                     console.log("giorni: " + giorni);
     215                    // console.log("azione: " + azione);
     216                    // console.log("giorni: " + giorni);
    208217                   
    209218                    if(tipo!='statistiche'){
     
    214223                    }
    215224                    shortcode += ']';
    216                    
     225                    // console.log(shortcode);
    217226                    var visualCode =
    218227                        tinyMCE.activeEditor.plugins.PAFacile.getVisual(
  • pafacile/tags/2.4.6/ordinanze/elenco.php

    r459538 r619814  
    125125}
    126126
    127 function displayOrdinanzePublic($params){
     127function displayOrdinanzePublic($params, $extraParams = array()){
    128128    /*
    129129     * Utilizzato dai widget o sulla pagina
     
    142142        )
    143143    );
    144    
     144    $params = array_merge ($params, $extraParams);
    145145    switch($params['kind']){
    146146        case 'box':
  • pafacile/tags/2.4.6/organi/elenco.php

    r459538 r619814  
    153153            )
    154154        );
     155        $params = array_merge ($params, $extraParams);
    155156        extract($params);
    156157        switch($kind){
  • pafacile/tags/2.4.6/public-contents/BandiGare.php

    r619228 r619814  
    102102    public static function elenco($params=null){
    103103        global $wpdb;
     104       
    104105        $opzioni = get_option('PAFacile_settings');
    105106        $subLevel = 3;
     
    122123        $sql = "select * from $tableName ";
    123124       
    124         # Since V. 2.4.4
    125         #$dp_al = toMySQLDate($_GET['dp_al_dd'], $_GET['dp_al_mm'], $_GET['dp_al_yy'], false);
    126         #$ds_dal = toMySQLDate($_GET['ds_dal_dd'], $_GET['ds_dal_mm'], $_GET['ds_dal_yy'], false);
    127         #$ds_al = toMySQLDate($_GET['ds_al_dd'], $_GET['ds_al_mm'], $_GET['ds_al_yy'], false);
    128         $dp_dal = toMySQLDate(isset($_GET['dp_dal_dd'])?$_GET['dp_dal_dd']:'01', isset($_GET['dp_dal_mm'])?$_GET['dp_dal_mm']:'01', isset($_GET['dp_dal_yy'])?$_GET['dp_dal_yy']:'1900', false);
    129         $dp_al = toMySQLDate(isset($_GET['dp_al_dd'])?$_GET['dp_al_dd']:'31', isset($_GET['dp_al_mm'])?$_GET['dp_al_mm']:'12', isset($_GET['dp_al_yy'])?$_GET['dp_al_yy']:date('Y'), false);
    130         $ds_dal = toMySQLDate(isset($_GET['ds_dal_dd'])?$_GET['ds_dal_dd']:'01', isset($_GET['ds_dal_mm'])?$_GET['ds_dal_mm']:'01', isset($_GET['ds_dal_yy'])?$_GET['ds_dal_yy']:'1900', false);
    131         $ds_al = toMySQLDate(isset($_GET['ds_al_dd'])?$_GET['ds_al_dd']:'31', isset($_GET['ds_al_mm'])?$_GET['ds_al_mm']:'12', isset($_GET['ds_al_yy'])?$_GET['ds_al_yy']:date('Y'), false);
    132        
    133        
    134125        $filtro = array();
     126
     127        # Since V 2.4.6
     128        if(isset($_GET['dp_dal_dd']) && isset($_GET['dp_al_dd'])){
     129            # Since V. 2.4.4
     130            #$dp_al = toMySQLDate($_GET['dp_al_dd'], $_GET['dp_al_mm'], $_GET['dp_al_yy'], false);
     131            #$ds_dal = toMySQLDate($_GET['ds_dal_dd'], $_GET['ds_dal_mm'], $_GET['ds_dal_yy'], false);
     132            #$ds_al = toMySQLDate($_GET['ds_al_dd'], $_GET['ds_al_mm'], $_GET['ds_al_yy'], false);
     133            $dp_dal = toMySQLDate(isset($_GET['dp_dal_dd'])?$_GET['dp_dal_dd']:'01', isset($_GET['dp_dal_mm'])?$_GET['dp_dal_mm']:'01', isset($_GET['dp_dal_yy'])?$_GET['dp_dal_yy']:'1900', false);
     134            $dp_al = toMySQLDate(isset($_GET['dp_al_dd'])?$_GET['dp_al_dd']:'31', isset($_GET['dp_al_mm'])?$_GET['dp_al_mm']:'12', isset($_GET['dp_al_yy'])?$_GET['dp_al_yy']:date('Y'), false);
     135            $ds_dal = toMySQLDate(isset($_GET['ds_dal_dd'])?$_GET['ds_dal_dd']:'01', isset($_GET['ds_dal_mm'])?$_GET['ds_dal_mm']:'01', isset($_GET['ds_dal_yy'])?$_GET['ds_dal_yy']:'1900', false);
     136            $ds_al = toMySQLDate(isset($_GET['ds_al_dd'])?$_GET['ds_al_dd']:'31', isset($_GET['ds_al_mm'])?$_GET['ds_al_mm']:'12', isset($_GET['ds_al_yy'])?$_GET['ds_al_yy']:date('Y'), false);
     137            $filtro[] = self::buildDataFilter('data_pubblicazione', $dp_dal, $dp_al);
     138            $filtro[] = self::buildDataFilter('data_scadenza', $ds_dal, $ds_al);
     139        }else{
     140            $filtro[] = "(data_pubblicazione <= now() and data_scadenza >= now())";
     141        }
     142       
    135143        if(isset($type) && $type!='') $filtro[]="tipo ='$type'";
    136144        if(isset($office) && $office!='') $filtro[]= "id_ufficio = $office";
    137        
    138         $filtro[] = self::buildDataFilter('data_pubblicazione', $dp_dal, $dp_al);
    139         $filtro[] = self::buildDataFilter('data_scadenza', $ds_dal, $ds_al);
    140145       
    141146        if(isset($_GET['type']) && $_GET['type']!='') $filtro[] .= "tipo='{$_GET['type']}'";
     
    143148        $filtro = self::purgeFilter($filtro);
    144149       
    145         $filtro = join(' and ',$filtro);
     150               
     151        $filtro = join(' and ',$filtro);
     152         
    146153        if($filtro!=''){
    147154            $filtro = ' where ' . $filtro; //join(' and ', $filtro);
  • pafacile/tags/2.4.6/readme.txt

    r619228 r619814  
    44Requires at least: 3.4
    55Tested up to: 3.4.2
    6 Stable tag: 2.4.5
     6Stable tag: 2.4.6
    77
    88Plugin per la gestione delle informazioni on-line che ogni amministrazione deve pubblicare (linee guida per i requisiti minimi per i siti delle PA).
     
    7272
    7373== Changelog ==
     74
     75= 2.4.6 (2012-11-01) =
     76* **Update:** Possibilità di impostare parametri aggiuntivi nello shortcode per i Albo Pretorio
     77* **Update:** Possibilità di impostare parametri aggiuntivi nello shortcode per i Bandi
     78* **Update:** Possibilità di impostare parametri aggiuntivi nello shortcode per i Delibere
     79* **Update:** Possibilità di impostare parametri aggiuntivi nello shortcode per i Determine
     80* **Update:** Possibilità di impostare parametri aggiuntivi nello shortcode per i Incarichi Professionali
     81* **Update:** Possibilità di impostare parametri aggiuntivi nello shortcode per i Ordinanze
     82* **Update:** Possibilità di impostare parametri aggiuntivi nello shortcode per i Organi di Governo
     83* **Update:** Aggiornato plugin per l'editor visuale
     84
     85* **Bugfix:** I bandi scaduti non devono essere visualizzati nell'elenco dei bandi in corso.
     86* **Bugfix:** Su internet explorer e firefox senza la console attiva il plugin generava degli errori di javascript nell'editor visuale.
    7487
    7588= 2.4.5 (2012-10-30) =
  • pafacile/tags/2.4.6/tosendit-pa.php

    r619228 r619814  
    33 * @package toSend.it
    44 * @author toSend.it di Luisa Marra
    5  * @version 2.4.5
     5 * @version 2.4.6
    66 */
    77/*
    88Plugin Name: PA Facile
    99Plugin URI: http://wordpress.org/extend/plugins/pafacile/
    10 Description: Gestisce le informazioni on-line che qualunque PA deve pubblicare secondo quanto specificato nelle linee guida per i requisiti minimi per i siti delle PA emanate dal Governo nel 2010
     10Description: Gestisce le informazioni on-line che qualunque PA deve pubblicare secondo quanto specificato nelle linee guida per i requisiti minimi per i siti delle PA emanate dal Governo nel 2011
    1111Author: toSend.it di Luisa Marra
    12 Version: 2.4.5
     12Version: 2.4.6
    1313Author URI: http://toSend.it
    1414*/
     
    1717#define('TOSENDIT_PAFACILE_VERSION', '2.4.3');
    1818#define('TOSENDIT_PAFACILE_VERSION', '2.4.4');
    19 define('TOSENDIT_PAFACILE_VERSION', '2.4.5');
     19# define('TOSENDIT_PAFACILE_VERSION', '2.4.5');
     20define('TOSENDIT_PAFACILE_VERSION', '2.4.6');
    2021
    2122# è PAFacile in un installazione di default
     
    267268                $array = $obj;
    268269                ob_start();
    269                 $fnName= strtoupper(substr($array[0],0,1)).substr($array[0],1);
     270                /*
     271                 * Identifica la sezione
     272                 */
     273                $section = array_shift($array);
     274                error_log($section);
     275                /*
     276                 * Evitiamo che si facciano cose strane
     277                 */
     278                $section = preg_replace('#[^a-z]#', '', $section);
     279               
     280                $fnName= strtoupper(substr($section,0,1)).substr($section,1);
     281                /*
     282                 * Costruisce il nome del metodo
     283                 */
    270284                $defaultMethod = "display" . $fnName;
    271                 $baseMethod =  "display" . $array[0] . 'Public';
    272                 require_once PAFACILE_PLUING_DIRECTORY .'/' . $array[0].'/elenco.php';
     285                $baseMethod =  "display" . $section . 'Public';
     286               
     287                /*
     288                 * Include il file specifico dalla sezione
     289                 */
     290                require_once PAFACILE_PLUING_DIRECTORY .'/' .$section.'/elenco.php';
    273291                $method = (function_exists($baseMethod))?$baseMethod:$defaultMethod;
    274                 $method($array[1]);
     292                /*
     293                 * Estrae il tipo di visualizzazione dall'elenco dei parametri
     294                 */
     295                $actionParameter =  array_shift($array);
     296               
     297                /*
     298                 * Invoca il metodo specifico fornendo la tipologia di azione e l'elenco dei parametri aggiuntivi
     299                 */
     300                $method($actionParameter, $array);
    275301                $buffer = ob_get_clean();
    276302            }else{
  • pafacile/trunk/alboPretorio/elenco.php

    r525549 r619814  
    11<?php
    22
    3 function displayAlboPretorioPublic($params){
     3function displayAlboPretorioPublic($params, $extraParams = array()){
    44    global $wpdb;
    55    $params = toSendItGenericMethods::identifyParameters($params,
     
    1111        )
    1212    );
     13    $params = array_merge ($params, $extraParams);
     14   
    1315    extract($params);
    1416    switch($params['kind']){
  • pafacile/trunk/bandi/elenco.php

    r559534 r619814  
    11<?php
    22
    3 function displayBandiPublic($params){
     3function displayBandiPublic($params, $extraParams = array()){
    44    global $wpdb;
    55   
     
    99        )
    1010    );
     11    $params = array_merge($params, $extraParams);
     12   
    1113    extract($params);
    1214    switch($kind){
  • pafacile/trunk/delibere/elenco.php

    r484663 r619814  
    22#require_once 'public-contents/Delibere.php';
    33
    4 function displayDeliberePublic($params){
     4function displayDeliberePublic($params, $extraParams = array()){
    55    global $wpdb;
    66   
     
    1515        )
    1616    );
    17    
     17    $params = array_merge ($params, $extraParams);
    1818    extract($params);
    1919   
     
    2525        case 'table':
    2626            return Delibere::elenco($params);
    27             #toSendItPAFacileContents::mostraDelibereElenco($params);
    2827            break;         
    2928           
  • pafacile/trunk/determine/elenco.php

    r484663 r619814  
    22# require_once 'public-contents/Determine.php';
    33
    4 function displayDeterminePublic($params){
     4function displayDeterminePublic($params, $extraParams = array()){
    55    $params = toSendItGenericMethods::identifyParameters($params,
    66        array(
     
    1616        )
    1717    );
    18     #print_r($params); 
     18    $params = array_merge ($params, $extraParams);
    1919    switch($params['kind']){
    2020        case 'box':
  • pafacile/trunk/incarichiProfessionali/elenco.php

    r559534 r619814  
    122122}
    123123
    124 function displayIncarichiProfessionaliPublic($params){
     124function displayIncarichiProfessionaliPublic($params, $extraParams = array()){
    125125    /*
    126126     * Utilizzato dai widget o sulla pagina
     
    137137        )
    138138    );
    139    
     139    $params = array_merge ($params, $extraParams);
    140140    switch($params['kind']){
    141141        case 'box':
  • pafacile/trunk/mce/editor_plugin.dev.js

    r484663 r619814  
    1616                    'title="%shortcode%" />',
    1717                   
    18         shortCodeRegExp:/(\[PAFacile ([a-z]+)(.+)?\])/i,
     18        shortCodeRegExp:/(\[PAFacile ([a-z]+)([^\]]+)?\])/i,
    1919       
    2020        is: function(n){
     
    2222            if(n==null) return false;
    2323            if(n.nodeName.toLowerCase() != 'hr') return false;
    24             return regExp.test(n.title);
     24            return regExp.test(decodeURI(n.title));
    2525           
    2626        },
    2727        getVisual: function(url, shortcode, type, aspect){
    2828            // le statistiche e gli altri atti hanno un visual shortcode differente
     29           
    2930            var visualCode = (type==='statistiche')?
    3031                    tinyMCE.activeEditor.plugins.PAFacile.visualCodeStatistiche:
    3132                    tinyMCE.activeEditor.plugins.PAFacile.visualCode;
    3233            visualCode = visualCode.replace('%url%', url);
    33             visualCode = visualCode.replace('%shortcode%', shortcode);
     34            // console.log("Sono qui: " + aspect );
     35            if(aspect.indexOf(',')!=-1){
     36                aspect = aspect.substring(0, aspect.indexOf(','));
     37            }
     38            visualCode = visualCode.replace('%shortcode%', encodeURI(shortcode) );
    3439            visualCode = visualCode.replace('%type%', type);
    3540            visualCode = visualCode.replace('%aspect%', aspect);
     
    4247                authorurl : 'http://toSend.it',
    4348                infourl : 'http://toSend.it/prodotti/pafacile',
    44                 version : "1.0"
     49                version : "1.1"
    4550            };
    4651        },
     
    6570                       
    6671                        if (theNode) {
    67                             value = (theNode.getAttribute('title') ? theNode.getAttribute('title') : "");
     72                            value = decodeURI(theNode.getAttribute('title') ? theNode.getAttribute('title') : "");
    6873                           
    6974                           
     
    106111            ed.onPostProcess.add(function(ed, o) {
    107112                if (o.get)
    108                     o.content = o.content.replace(/<hr[^>]+title\="(\[PAFacile[^\]]+\])"[^>]+>/g, function(hr) {
    109                         hr = hr.replace(/<hr[^>]+title\="/,'');
    110                         hr = hr.replace(/\]"[^>]\/>$/,']');
     113                    o.content = o.content.replace(/<hr[^>]+title\="(%5BPAFacile.*)"[^>]+>/g, function(hr) {
     114                       
     115                        hr = hr.replace(/<hr[^>]+title\="(.*)".*>/i,'$1');
     116                        // hr = hr.replace(/"[^>]\/>$/,']');
     117                        hr = decodeURI(hr);
     118                        // console.log(hr);
    111119                        return hr;
    112120                    });
     
    146154                       
    147155                        // console.log(scElements);
     156                       
    148157                        var out = tinyMCE.activeEditor.plugins.PAFacile.getVisual(
    149158                                tinyMCE.activeEditor.plugins.PAFacile.url,
     
    204213                    shortcode += tipo;
    205214                   
    206                     console.log("azione: " + azione);
    207                     console.log("giorni: " + giorni);
     215                    // console.log("azione: " + azione);
     216                    // console.log("giorni: " + giorni);
    208217                   
    209218                    if(tipo!='statistiche'){
     
    214223                    }
    215224                    shortcode += ']';
    216                    
     225                    // console.log(shortcode);
    217226                    var visualCode =
    218227                        tinyMCE.activeEditor.plugins.PAFacile.getVisual(
  • pafacile/trunk/ordinanze/elenco.php

    r459538 r619814  
    125125}
    126126
    127 function displayOrdinanzePublic($params){
     127function displayOrdinanzePublic($params, $extraParams = array()){
    128128    /*
    129129     * Utilizzato dai widget o sulla pagina
     
    142142        )
    143143    );
    144    
     144    $params = array_merge ($params, $extraParams);
    145145    switch($params['kind']){
    146146        case 'box':
  • pafacile/trunk/organi/elenco.php

    r459538 r619814  
    153153            )
    154154        );
     155        $params = array_merge ($params, $extraParams);
    155156        extract($params);
    156157        switch($kind){
  • pafacile/trunk/public-contents/BandiGare.php

    r619228 r619814  
    102102    public static function elenco($params=null){
    103103        global $wpdb;
     104       
    104105        $opzioni = get_option('PAFacile_settings');
    105106        $subLevel = 3;
     
    122123        $sql = "select * from $tableName ";
    123124       
    124         # Since V. 2.4.4
    125         #$dp_al = toMySQLDate($_GET['dp_al_dd'], $_GET['dp_al_mm'], $_GET['dp_al_yy'], false);
    126         #$ds_dal = toMySQLDate($_GET['ds_dal_dd'], $_GET['ds_dal_mm'], $_GET['ds_dal_yy'], false);
    127         #$ds_al = toMySQLDate($_GET['ds_al_dd'], $_GET['ds_al_mm'], $_GET['ds_al_yy'], false);
    128         $dp_dal = toMySQLDate(isset($_GET['dp_dal_dd'])?$_GET['dp_dal_dd']:'01', isset($_GET['dp_dal_mm'])?$_GET['dp_dal_mm']:'01', isset($_GET['dp_dal_yy'])?$_GET['dp_dal_yy']:'1900', false);
    129         $dp_al = toMySQLDate(isset($_GET['dp_al_dd'])?$_GET['dp_al_dd']:'31', isset($_GET['dp_al_mm'])?$_GET['dp_al_mm']:'12', isset($_GET['dp_al_yy'])?$_GET['dp_al_yy']:date('Y'), false);
    130         $ds_dal = toMySQLDate(isset($_GET['ds_dal_dd'])?$_GET['ds_dal_dd']:'01', isset($_GET['ds_dal_mm'])?$_GET['ds_dal_mm']:'01', isset($_GET['ds_dal_yy'])?$_GET['ds_dal_yy']:'1900', false);
    131         $ds_al = toMySQLDate(isset($_GET['ds_al_dd'])?$_GET['ds_al_dd']:'31', isset($_GET['ds_al_mm'])?$_GET['ds_al_mm']:'12', isset($_GET['ds_al_yy'])?$_GET['ds_al_yy']:date('Y'), false);
    132        
    133        
    134125        $filtro = array();
     126
     127        # Since V 2.4.6
     128        if(isset($_GET['dp_dal_dd']) && isset($_GET['dp_al_dd'])){
     129            # Since V. 2.4.4
     130            #$dp_al = toMySQLDate($_GET['dp_al_dd'], $_GET['dp_al_mm'], $_GET['dp_al_yy'], false);
     131            #$ds_dal = toMySQLDate($_GET['ds_dal_dd'], $_GET['ds_dal_mm'], $_GET['ds_dal_yy'], false);
     132            #$ds_al = toMySQLDate($_GET['ds_al_dd'], $_GET['ds_al_mm'], $_GET['ds_al_yy'], false);
     133            $dp_dal = toMySQLDate(isset($_GET['dp_dal_dd'])?$_GET['dp_dal_dd']:'01', isset($_GET['dp_dal_mm'])?$_GET['dp_dal_mm']:'01', isset($_GET['dp_dal_yy'])?$_GET['dp_dal_yy']:'1900', false);
     134            $dp_al = toMySQLDate(isset($_GET['dp_al_dd'])?$_GET['dp_al_dd']:'31', isset($_GET['dp_al_mm'])?$_GET['dp_al_mm']:'12', isset($_GET['dp_al_yy'])?$_GET['dp_al_yy']:date('Y'), false);
     135            $ds_dal = toMySQLDate(isset($_GET['ds_dal_dd'])?$_GET['ds_dal_dd']:'01', isset($_GET['ds_dal_mm'])?$_GET['ds_dal_mm']:'01', isset($_GET['ds_dal_yy'])?$_GET['ds_dal_yy']:'1900', false);
     136            $ds_al = toMySQLDate(isset($_GET['ds_al_dd'])?$_GET['ds_al_dd']:'31', isset($_GET['ds_al_mm'])?$_GET['ds_al_mm']:'12', isset($_GET['ds_al_yy'])?$_GET['ds_al_yy']:date('Y'), false);
     137            $filtro[] = self::buildDataFilter('data_pubblicazione', $dp_dal, $dp_al);
     138            $filtro[] = self::buildDataFilter('data_scadenza', $ds_dal, $ds_al);
     139        }else{
     140            $filtro[] = "(data_pubblicazione <= now() and data_scadenza >= now())";
     141        }
     142       
    135143        if(isset($type) && $type!='') $filtro[]="tipo ='$type'";
    136144        if(isset($office) && $office!='') $filtro[]= "id_ufficio = $office";
    137        
    138         $filtro[] = self::buildDataFilter('data_pubblicazione', $dp_dal, $dp_al);
    139         $filtro[] = self::buildDataFilter('data_scadenza', $ds_dal, $ds_al);
    140145       
    141146        if(isset($_GET['type']) && $_GET['type']!='') $filtro[] .= "tipo='{$_GET['type']}'";
     
    143148        $filtro = self::purgeFilter($filtro);
    144149       
    145         $filtro = join(' and ',$filtro);
     150               
     151        $filtro = join(' and ',$filtro);
     152         
    146153        if($filtro!=''){
    147154            $filtro = ' where ' . $filtro; //join(' and ', $filtro);
  • pafacile/trunk/readme.txt

    r619228 r619814  
    44Requires at least: 3.4
    55Tested up to: 3.4.2
    6 Stable tag: 2.4.5
     6Stable tag: 2.4.6
    77
    88Plugin per la gestione delle informazioni on-line che ogni amministrazione deve pubblicare (linee guida per i requisiti minimi per i siti delle PA).
     
    7272
    7373== Changelog ==
     74
     75= 2.4.6 (2012-11-01) =
     76* **Update:** Possibilità di impostare parametri aggiuntivi nello shortcode per i Albo Pretorio
     77* **Update:** Possibilità di impostare parametri aggiuntivi nello shortcode per i Bandi
     78* **Update:** Possibilità di impostare parametri aggiuntivi nello shortcode per i Delibere
     79* **Update:** Possibilità di impostare parametri aggiuntivi nello shortcode per i Determine
     80* **Update:** Possibilità di impostare parametri aggiuntivi nello shortcode per i Incarichi Professionali
     81* **Update:** Possibilità di impostare parametri aggiuntivi nello shortcode per i Ordinanze
     82* **Update:** Possibilità di impostare parametri aggiuntivi nello shortcode per i Organi di Governo
     83* **Update:** Aggiornato plugin per l'editor visuale
     84
     85* **Bugfix:** I bandi scaduti non devono essere visualizzati nell'elenco dei bandi in corso.
     86* **Bugfix:** Su internet explorer e firefox senza la console attiva il plugin generava degli errori di javascript nell'editor visuale.
    7487
    7588= 2.4.5 (2012-10-30) =
  • pafacile/trunk/tosendit-pa.php

    r619228 r619814  
    33 * @package toSend.it
    44 * @author toSend.it di Luisa Marra
    5  * @version 2.4.5
     5 * @version 2.4.6
    66 */
    77/*
    88Plugin Name: PA Facile
    99Plugin URI: http://wordpress.org/extend/plugins/pafacile/
    10 Description: Gestisce le informazioni on-line che qualunque PA deve pubblicare secondo quanto specificato nelle linee guida per i requisiti minimi per i siti delle PA emanate dal Governo nel 2010
     10Description: Gestisce le informazioni on-line che qualunque PA deve pubblicare secondo quanto specificato nelle linee guida per i requisiti minimi per i siti delle PA emanate dal Governo nel 2011
    1111Author: toSend.it di Luisa Marra
    12 Version: 2.4.5
     12Version: 2.4.6
    1313Author URI: http://toSend.it
    1414*/
     
    1717#define('TOSENDIT_PAFACILE_VERSION', '2.4.3');
    1818#define('TOSENDIT_PAFACILE_VERSION', '2.4.4');
    19 define('TOSENDIT_PAFACILE_VERSION', '2.4.5');
     19# define('TOSENDIT_PAFACILE_VERSION', '2.4.5');
     20define('TOSENDIT_PAFACILE_VERSION', '2.4.6');
    2021
    2122# è PAFacile in un installazione di default
     
    267268                $array = $obj;
    268269                ob_start();
    269                 $fnName= strtoupper(substr($array[0],0,1)).substr($array[0],1);
     270                /*
     271                 * Identifica la sezione
     272                 */
     273                $section = array_shift($array);
     274                error_log($section);
     275                /*
     276                 * Evitiamo che si facciano cose strane
     277                 */
     278                $section = preg_replace('#[^a-z]#', '', $section);
     279               
     280                $fnName= strtoupper(substr($section,0,1)).substr($section,1);
     281                /*
     282                 * Costruisce il nome del metodo
     283                 */
    270284                $defaultMethod = "display" . $fnName;
    271                 $baseMethod =  "display" . $array[0] . 'Public';
    272                 require_once PAFACILE_PLUING_DIRECTORY .'/' . $array[0].'/elenco.php';
     285                $baseMethod =  "display" . $section . 'Public';
     286               
     287                /*
     288                 * Include il file specifico dalla sezione
     289                 */
     290                require_once PAFACILE_PLUING_DIRECTORY .'/' .$section.'/elenco.php';
    273291                $method = (function_exists($baseMethod))?$baseMethod:$defaultMethod;
    274                 $method($array[1]);
     292                /*
     293                 * Estrae il tipo di visualizzazione dall'elenco dei parametri
     294                 */
     295                $actionParameter =  array_shift($array);
     296               
     297                /*
     298                 * Invoca il metodo specifico fornendo la tipologia di azione e l'elenco dei parametri aggiuntivi
     299                 */
     300                $method($actionParameter, $array);
    275301                $buffer = ob_get_clean();
    276302            }else{
Note: See TracChangeset for help on using the changeset viewer.