Plugin Directory

Changeset 1708035


Ignore:
Timestamp:
08/03/2017 08:45:45 PM (9 years ago)
Author:
Zuige
Message:

Update copyright date, test with 4.7.1

Location:
wp-post-acl
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-post-acl/tags/1.0.1/readme.txt

    r1449978 r1708035  
    44Donate link: https://github.com/anttiviljami
    55Requires at least: 4.2
    6 Tested up to: 4.4.4
     6Tested up to: 4.7.1
    77Stable tag: 1.0.1
    88License: GPLv3
  • wp-post-acl/tags/1.0.1/vendor/autoload.php

    r1450040 r1708035  
    33// autoload.php @generated by Composer
    44
    5 require_once __DIR__ . '/composer' . '/autoload_real.php';
     5require_once __DIR__ . '/composer/autoload_real.php';
    66
    77return ComposerAutoloaderInit69d5b30f64515316ac39a7f70f14623d::getLoader();
  • wp-post-acl/tags/1.0.1/vendor/composer/ClassLoader.php

    r1450040 r1708035  
    5454    private $useIncludePath = false;
    5555    private $classMap = array();
    56 
    5756    private $classMapAuthoritative = false;
     57    private $missingClasses = array();
     58    private $apcuPrefix;
    5859
    5960    public function getPrefixes()
     
    273274
    274275    /**
     276     * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
     277     *
     278     * @param string|null $apcuPrefix
     279     */
     280    public function setApcuPrefix($apcuPrefix)
     281    {
     282        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
     283    }
     284
     285    /**
     286     * The APCu prefix in use, or null if APCu caching is not enabled.
     287     *
     288     * @return string|null
     289     */
     290    public function getApcuPrefix()
     291    {
     292        return $this->apcuPrefix;
     293    }
     294
     295    /**
    275296     * Registers this instance as an autoloader.
    276297     *
     
    314335    public function findFile($class)
    315336    {
    316         // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
    317         if ('\\' == $class[0]) {
    318             $class = substr($class, 1);
    319         }
    320 
    321337        // class map lookup
    322338        if (isset($this->classMap[$class])) {
    323339            return $this->classMap[$class];
    324340        }
    325         if ($this->classMapAuthoritative) {
     341        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
    326342            return false;
    327343        }
     344        if (null !== $this->apcuPrefix) {
     345            $file = apcu_fetch($this->apcuPrefix.$class, $hit);
     346            if ($hit) {
     347                return $file;
     348            }
     349        }
    328350
    329351        $file = $this->findFileWithExtension($class, '.php');
    330352
    331353        // Search for Hack files if we are running on HHVM
    332         if ($file === null && defined('HHVM_VERSION')) {
     354        if (false === $file && defined('HHVM_VERSION')) {
    333355            $file = $this->findFileWithExtension($class, '.hh');
    334356        }
    335357
    336         if ($file === null) {
     358        if (null !== $this->apcuPrefix) {
     359            apcu_add($this->apcuPrefix.$class, $file);
     360        }
     361
     362        if (false === $file) {
    337363            // Remember that this class does not exist.
    338             return $this->classMap[$class] = false;
     364            $this->missingClasses[$class] = true;
    339365        }
    340366
     
    349375        $first = $class[0];
    350376        if (isset($this->prefixLengthsPsr4[$first])) {
    351             foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
    352                 if (0 === strpos($class, $prefix)) {
    353                     foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
     377            $subPath = $class;
     378            while (false !== $lastPos = strrpos($subPath, '\\')) {
     379                $subPath = substr($subPath, 0, $lastPos);
     380                $search = $subPath.'\\';
     381                if (isset($this->prefixDirsPsr4[$search])) {
     382                    foreach ($this->prefixDirsPsr4[$search] as $dir) {
     383                        $length = $this->prefixLengthsPsr4[$first][$search];
    354384                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
    355385                            return $file;
     
    400430            return $file;
    401431        }
     432
     433        return false;
    402434    }
    403435}
  • wp-post-acl/tags/1.0.1/vendor/composer/LICENSE

    r1450040 r1708035  
    11
    2 Copyright (c) 2016 Nils Adermann, Jordi Boggiano
     2Copyright (c) Nils Adermann, Jordi Boggiano
    33
    44Permission is hereby granted, free of charge, to any person obtaining a copy
  • wp-post-acl/tags/1.0.1/vendor/composer/autoload_real.php

    r1450040 r1708035  
    2424        spl_autoload_unregister(array('ComposerAutoloaderInit69d5b30f64515316ac39a7f70f14623d', 'loadClassLoader'));
    2525
    26         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
     26        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
    2727        if ($useStaticLoader) {
    2828            require_once __DIR__ . '/autoload_static.php';
  • wp-post-acl/tags/1.0.1/wp-post-acl.php

    r1449951 r1708035  
    1515 */
    1616
    17 /** Copyright 2016 Antti Kuosmanen
     17/** Copyright 2017 Antti Kuosmanen
    1818
    1919  This program is free software; you can redistribute it and/or modify
  • wp-post-acl/trunk/readme.txt

    r1449978 r1708035  
    44Donate link: https://github.com/anttiviljami
    55Requires at least: 4.2
    6 Tested up to: 4.4.4
     6Tested up to: 4.7.1
    77Stable tag: 1.0.1
    88License: GPLv3
  • wp-post-acl/trunk/vendor/autoload.php

    r1450040 r1708035  
    33// autoload.php @generated by Composer
    44
    5 require_once __DIR__ . '/composer' . '/autoload_real.php';
     5require_once __DIR__ . '/composer/autoload_real.php';
    66
    77return ComposerAutoloaderInit69d5b30f64515316ac39a7f70f14623d::getLoader();
  • wp-post-acl/trunk/vendor/composer/ClassLoader.php

    r1450040 r1708035  
    5454    private $useIncludePath = false;
    5555    private $classMap = array();
    56 
    5756    private $classMapAuthoritative = false;
     57    private $missingClasses = array();
     58    private $apcuPrefix;
    5859
    5960    public function getPrefixes()
     
    273274
    274275    /**
     276     * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
     277     *
     278     * @param string|null $apcuPrefix
     279     */
     280    public function setApcuPrefix($apcuPrefix)
     281    {
     282        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
     283    }
     284
     285    /**
     286     * The APCu prefix in use, or null if APCu caching is not enabled.
     287     *
     288     * @return string|null
     289     */
     290    public function getApcuPrefix()
     291    {
     292        return $this->apcuPrefix;
     293    }
     294
     295    /**
    275296     * Registers this instance as an autoloader.
    276297     *
     
    314335    public function findFile($class)
    315336    {
    316         // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
    317         if ('\\' == $class[0]) {
    318             $class = substr($class, 1);
    319         }
    320 
    321337        // class map lookup
    322338        if (isset($this->classMap[$class])) {
    323339            return $this->classMap[$class];
    324340        }
    325         if ($this->classMapAuthoritative) {
     341        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
    326342            return false;
    327343        }
     344        if (null !== $this->apcuPrefix) {
     345            $file = apcu_fetch($this->apcuPrefix.$class, $hit);
     346            if ($hit) {
     347                return $file;
     348            }
     349        }
    328350
    329351        $file = $this->findFileWithExtension($class, '.php');
    330352
    331353        // Search for Hack files if we are running on HHVM
    332         if ($file === null && defined('HHVM_VERSION')) {
     354        if (false === $file && defined('HHVM_VERSION')) {
    333355            $file = $this->findFileWithExtension($class, '.hh');
    334356        }
    335357
    336         if ($file === null) {
     358        if (null !== $this->apcuPrefix) {
     359            apcu_add($this->apcuPrefix.$class, $file);
     360        }
     361
     362        if (false === $file) {
    337363            // Remember that this class does not exist.
    338             return $this->classMap[$class] = false;
     364            $this->missingClasses[$class] = true;
    339365        }
    340366
     
    349375        $first = $class[0];
    350376        if (isset($this->prefixLengthsPsr4[$first])) {
    351             foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
    352                 if (0 === strpos($class, $prefix)) {
    353                     foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
     377            $subPath = $class;
     378            while (false !== $lastPos = strrpos($subPath, '\\')) {
     379                $subPath = substr($subPath, 0, $lastPos);
     380                $search = $subPath.'\\';
     381                if (isset($this->prefixDirsPsr4[$search])) {
     382                    foreach ($this->prefixDirsPsr4[$search] as $dir) {
     383                        $length = $this->prefixLengthsPsr4[$first][$search];
    354384                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
    355385                            return $file;
     
    400430            return $file;
    401431        }
     432
     433        return false;
    402434    }
    403435}
  • wp-post-acl/trunk/vendor/composer/LICENSE

    r1450040 r1708035  
    11
    2 Copyright (c) 2016 Nils Adermann, Jordi Boggiano
     2Copyright (c) Nils Adermann, Jordi Boggiano
    33
    44Permission is hereby granted, free of charge, to any person obtaining a copy
  • wp-post-acl/trunk/vendor/composer/autoload_real.php

    r1450040 r1708035  
    2424        spl_autoload_unregister(array('ComposerAutoloaderInit69d5b30f64515316ac39a7f70f14623d', 'loadClassLoader'));
    2525
    26         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
     26        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
    2727        if ($useStaticLoader) {
    2828            require_once __DIR__ . '/autoload_static.php';
  • wp-post-acl/trunk/wp-post-acl.php

    r1449951 r1708035  
    1515 */
    1616
    17 /** Copyright 2016 Antti Kuosmanen
     17/** Copyright 2017 Antti Kuosmanen
    1818
    1919  This program is free software; you can redistribute it and/or modify
Note: See TracChangeset for help on using the changeset viewer.