Changeset 27560


Ignore:
Timestamp:
Mar 5, 2014, 9:52:06 AM (6 years ago)
Author:
bonhommedeneige
Message:

Version 1.3.0 - Piwigo 2.6 compatibility

Location:
extensions/Force_HTTPS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/Force_HTTPS/admin.php

    r22560 r27560  
    66*
    77* Created   :   02.05.2013
    8 * Updated   :   04.05.2013
     8* Updated   :   05.03.2014
    99* Author: bonhommedeneige
    1010*
     
    2626/**
    2727Changelog :
     28 1.3.0 (05.03.2014) : Upgrade for Piwigo 2.6 compatibility
    2829 1.1.0 (03.05.2013) : No change yet
    2930 1.0.0 (02.05.2013) : Initial version
  • extensions/Force_HTTPS/main.inc.php

    r22560 r27560  
    22/*
    33Plugin Name: Force HTTPS
    4 Version: 1.2.0
     4Version: 1.3.0
    55Description: Gives the capacity to force https connections on https enabled servers.
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=697
     
    99
    1010Changelog :
     11 1.3.0 (05.03.2014) : Upgrade for Piwigo 2.6 compatibility
    1112 1.2.0 (05.05.2013) : Fixed unicity of strbool function (renamed to piwigo_force_https_strbool)
    1213                      Caused unicity issue with video-js plugin
     
    2627define('FORCE_HTTPS_ID', basename(dirname(__FILE__)));
    2728define('FORCE_HTTPS_PATH' ,   PHPWG_PLUGINS_PATH . FORCE_HTTPS_ID . '/');
    28 define('FORCE_HTTPS_VERSION', '1.2.0');
     29define('FORCE_HTTPS_VERSION', '1.3.0');
    2930// this is automatically updated by PEM if you publish your plugin with SVN, otherwise you musn't forget to change it, as well as "Version" in the plugin header
    3031
     
    9495    }
    9596  }
    96  
    97   // prepare plugin configuration
    98   //$conf['piwigo_force_https'] = unserialize($conf['piwigo_force_https']);
    99 }
    100 
    101 /**
    102  * SSL availability check
    103  *   - function checks if ssl is available on domain
    104  */
    105 function piwigo_force_https_checkssl() {
    106         global $conf;
    107        
    108 $mylinks="http://www.petitssuisses.com";
    109 $handlerr = curl_init($mylinks);
    110 curl_setopt($handlerr,  CURLOPT_RETURNTRANSFER, TRUE);
    111 $resp = curl_exec($handlerr);
    112 $ht = curl_getinfo($handlerr, CURLINFO_HTTP_CODE);
    113 
    114 if ($ht == '404')
    115      { echo 'OK';}
    116 else { echo 'NO';
    117 }
    11897}
    11998
  • extensions/Force_HTTPS/maintain.inc.php

    r22560 r27560  
    66*
    77* Created   :   02.05.2013
    8 * Updated   :   03.05.2013
     8* Updated   :   05.03.2014
    99* Author    :   bonhommedeneige
    1010*
     
    2626/**
    2727Changelog :
     28 1.3.0 (05.03.2014) : Renamed deltree function to force_https_deltree to avoid multiple declarations of
     29                      function accross multiple plugins. Piwigo 2.6 compatibility
    2830 1.2.0 (05.05.2013) : No change
    2931 1.1.0 (04.05.2013) : Added HSTS security settings
     
    3335
    3436if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    35 define('FORCE_HTTPS_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
     37if (!defined('FORCE_HTTPS_PATH')) define('FORCE_HTTPS_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
    3638
    3739function plugin_install()
     
    5456        if (is_dir(PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'piwigo-force-https'))
    5557        {
    56                 deltree(PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'piwigo-force-https');
     58                force_https_deltree(PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'piwigo-force-https');
    5759        }
    5860        $q = 'DELETE FROM '.CONFIG_TABLE.' WHERE param LIKE "fhp_%" LIMIT 6;';
     
    7072}
    7173
    72 function deltree($path)
     74function force_https_deltree($path)
    7375{
    7476        if (is_dir($path))
     
    8284                                if (is_dir($pathfile))
    8385                                {
    84                                         deltree($pathfile);
     86                                        force_https_deltree($pathfile);
    8587                                }
    8688                                else
Note: See TracChangeset for help on using the changeset viewer.