Version 3.4.6
This commit is contained in:
1 parent
e4478369d8
commit
b45ea0dffb
1568 files changed
+155104
-161665
No files matched your search
@@ -2,21 +2,21 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.4.5
|
||||
* IP.Board v3.4.6
|
||||
* Static Classes for IP.Board 3
|
||||
*
|
||||
* These classes are not required as objects. We have grouped
|
||||
* together several singletons to prevent multiple file loads
|
||||
* Last Updated: $Date: 2013-05-21 20:51:17 -0400 (Tue, 21 May 2013) $
|
||||
* Last Updated: $Date: 2013-09-26 22:37:28 -0400 (Thu, 26 Sep 2013) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: rashbrook $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 12th March 2002
|
||||
* @version $Revision: 12263 $
|
||||
* @version $Revision: 12370 $
|
||||
*
|
||||
* @author Matt
|
||||
*/
|
||||
@@ -1330,17 +1330,6 @@ class IPSLib
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Quickly determines if we've got VK enabled and set up
|
||||
*
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
static public function vkontakte_enabled()
|
||||
{
|
||||
return ( ipsRegistry::$settings['vk_enabled'] AND ipsRegistry::$settings['vk_api_id'] AND ipsRegistry::$settings['vk_secret'] ) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Central setlocale method so we can adjust as needed
|
||||
*
|
||||
@@ -1417,9 +1406,6 @@ class IPSLib
|
||||
|
||||
switch( $method )
|
||||
{
|
||||
case 'vkontakte':
|
||||
return self::vkontakte_enabled();
|
||||
break;
|
||||
case 'facebook':
|
||||
return self::fbc_enabled();
|
||||
break;
|
||||
@@ -1887,20 +1873,11 @@ EOF;
|
||||
/* Loop over the applications and build */
|
||||
foreach( $apps as $path => $app_dir )
|
||||
{
|
||||
$furltemplatesfile = IPS_ROOT_PATH . $path;
|
||||
if(IPB_USE_ONLY_ID_FURL && is_file( $furltemplatesfile.'/extensions/furlTemplatesID.php'))
|
||||
{
|
||||
$furltemplatesfile.='/extensions/furlTemplatesID.php';
|
||||
}
|
||||
else
|
||||
{
|
||||
$furltemplatesfile.='/extensions/furlTemplates.php';
|
||||
}
|
||||
if ( is_file( $furltemplatesfile ) )
|
||||
if ( is_file( IPS_ROOT_PATH . $path . '/extensions/furlTemplates.php' ) )
|
||||
{
|
||||
$_SEOTEMPLATES = array();
|
||||
|
||||
require( $furltemplatesfile );/*noLibHook*/
|
||||
require( IPS_ROOT_PATH . $path . '/extensions/furlTemplates.php' );/*noLibHook*/
|
||||
|
||||
if ( is_array( $_SEOTEMPLATES ) && count( $_SEOTEMPLATES ) )
|
||||
{
|
||||
@@ -3483,22 +3460,6 @@ EOF;
|
||||
*/
|
||||
static public function hasActiveLicense( $allowPerpetual=true )
|
||||
{
|
||||
//return true;
|
||||
$licenseData = ipsRegistry::cache()->getCache( 'licenseData' );
|
||||
|
||||
if ( ( ! $licenseData OR ! $licenseData['key']['_expires'] OR $licenseData['key']['_expires'] < IPS_UNIX_TIME_NOW OR $licenseData['key']['_expires'] == 9999999999 ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $allowPerpetual !== true )
|
||||
{
|
||||
if ( stristr( $licenseData['name'], 'perpetual' ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4270,19 +4231,21 @@ class IPSCookie
|
||||
* Abstract layer allows us to do some checking, etc
|
||||
*
|
||||
* @param string Cookie name
|
||||
* @param boolean Use prefix?
|
||||
* @return mixed
|
||||
* @since 2.0
|
||||
*/
|
||||
static public function get($name)
|
||||
static public function get( $name, $usePrefix = true )
|
||||
{
|
||||
$_name = ( $usePrefix ? ipsRegistry::$settings['cookie_id'].$name : $name );
|
||||
/* Check internal data first */
|
||||
if ( isset( self::$_cookiesSet[ $name ] ) )
|
||||
{
|
||||
return self::$_cookiesSet[ $name ];
|
||||
}
|
||||
else if ( isset( $_COOKIE[ipsRegistry::$settings['cookie_id'].$name] ) )
|
||||
else if ( isset( $_COOKIE[ $_name ] ) )
|
||||
{
|
||||
$_value = $_COOKIE[ ipsRegistry::$settings['cookie_id'].$name ];
|
||||
$_value = $_COOKIE[ $_name ];
|
||||
|
||||
$_couldBeJson = stripslashes( urldecode( $_value ) );
|
||||
$_test = json_decode( $_couldBeJson, true );
|
||||
@@ -4523,61 +4486,6 @@ class IPSText
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert russian mounth names to english
|
||||
*
|
||||
* @access public
|
||||
* @param string Date
|
||||
* @return string Converted date
|
||||
*/
|
||||
static public function monthNameRu2En( $text )
|
||||
{
|
||||
|
||||
return str_replace( array('Январь','Февраль','Март','Апрель','Май','Июнь,','Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'), array('January','February','March','April','May','June','July','August','September','October','November','December'), $text );
|
||||
}
|
||||
|
||||
static public function transliterate( $text )
|
||||
{
|
||||
return str_replace( array('а','б','в','г','д','е','ё','ж','з','и','й','к','л','м','н','о','п','р','с','т','у','ф','х','ц','ч','ш','щ','э','ю','я','ы','ь','ъ'), array('a','b','v','g','d','e','yo','zh','z','i','i','k','l','m','n','o','p','r','s','t','u','f','kh','tc','ch','sh','sch','e','iu','ia','y','',''), $text);
|
||||
|
||||
}
|
||||
|
||||
static public function makeSeoTransliterate( $text )
|
||||
{
|
||||
if (!IPB_USE_SEO_TRANSLIT )
|
||||
{
|
||||
return $text;
|
||||
}
|
||||
/*if ( IPB_USE_ONLY_ID_FURL )
|
||||
{
|
||||
return '-';
|
||||
}*/
|
||||
if ((is_array($text)) && (count($text)))
|
||||
{
|
||||
foreach( $text as $k => $v)
|
||||
{
|
||||
$text[$k] = self::makeSeoTransliterate( $v );
|
||||
}
|
||||
return $text;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$text = urldecode($text);
|
||||
|
||||
$text = self::transliterate( $text );
|
||||
|
||||
$text = preg_replace('#[^a-z0-9-]#', '', $text);
|
||||
|
||||
$text = urlencode($text);
|
||||
}
|
||||
|
||||
return $text;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Make an SEO title for use in the URL
|
||||
* We parse them even if friendly urls are off so that the data is there when you do switch it on
|
||||
@@ -4628,7 +4536,7 @@ class IPSText
|
||||
}
|
||||
|
||||
/* Finish off */
|
||||
$text = mb_strtolower($text);
|
||||
$text = strtolower($text);
|
||||
|
||||
if ( strtolower( IPS_DOC_CHAR_SET ) == 'utf-8' )
|
||||
{
|
||||
@@ -4646,8 +4554,6 @@ class IPSText
|
||||
$text = preg_replace( "#-{2,}#", '-', $text );
|
||||
$text = trim($text, '-');
|
||||
|
||||
$text = self::makeSeoTransliterate( $text );
|
||||
|
||||
IPSDebug::addMessage( "<span style='color:red'>makeSeoTitle ($text) called</span>" );
|
||||
|
||||
return ( $text ) ? $text : '-';
|
||||
@@ -5278,11 +5184,19 @@ class IPSText
|
||||
//$email = trim($email);
|
||||
|
||||
//$email = str_replace( " ", "", $email );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check we're not passing an array
|
||||
// (path disclosure prevention)
|
||||
//-----------------------------------------
|
||||
if ( is_array( $email ) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Check for more than 1 @ symbol
|
||||
//-----------------------------------------
|
||||
|
||||
if ( substr_count( $email, '@' ) > 1 )
|
||||
{
|
||||
return FALSE;
|
||||
@@ -6237,15 +6151,8 @@ class IPSText
|
||||
* @see http://en.wikipedia.org/wiki/Space_(punctuation)
|
||||
* @see http://www.ascii.cl/htmlcodes.htm
|
||||
*/
|
||||
if ( strtolower(IPS_DOC_CHAR_SET) == 'utf-8' )
|
||||
{
|
||||
$t = str_replace(chr(194).chr(160), chr(32), $t );
|
||||
return $t;
|
||||
}
|
||||
else
|
||||
{
|
||||
$t = str_replace(chr(160), chr(32), $t );
|
||||
$t = str_replace( chr(173), chr(32), $t );
|
||||
$t = str_replace( chr(160), ' ', $t );
|
||||
$t = str_replace( chr(173), ' ', $t );
|
||||
|
||||
//$t = str_replace( chr(240), ' ', $t ); -> latin small letter eth
|
||||
|
||||
@@ -6263,7 +6170,6 @@ class IPSText
|
||||
//$t = str_replace( chr(0x2060), "", $t ); //Remove sneaky spaces
|
||||
//$t = str_replace( chr(0xFEFF), "", $t ); //Remove sneaky spaces
|
||||
}
|
||||
}
|
||||
|
||||
return $t;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user