Version 3.4.5

This commit is contained in:
Neo committed 2025-12-19 00:38:12 -08:00
1 parent fb6b5baabc
commit e4478369d8
1359 files changed
+114688 -65212

No files matched your search

Binary file not shown.
+1 -1
View File
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $ * $Author: ips_terabyte $
* @since - * @since -
* $LastChangedDate: 2011-03-18 17:34:15 -0400 (Fri, 18 Mar 2011) $ * $LastChangedDate: 2011-03-18 17:34:15 -0400 (Fri, 18 Mar 2011) $
* @version v3.3.4 * @version v3.4.5
* $Revision: 8129 $ * $Revision: 8129 $
*/ */
+24 -6
View File
@@ -4,11 +4,11 @@
*~TERABYTE_DOC_READY~ *~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$ * $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$ * $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $ * $Author: AndyMillne $
* @since 2.2.0 * @since 2.2.0
* $LastChangedDate: 2011-12-20 11:14:05 -0500 (Tue, 20 Dec 2011) $ * $LastChangedDate: 2013-03-21 17:38:09 -0400 (Thu, 21 Mar 2013) $
* @version v3.3.4 * @version v3.4.5
* $Revision: 10035 $ * $Revision: 12109 $
*/ */
if ( ! class_exists( 'apiCore' ) ) if ( ! class_exists( 'apiCore' ) )
@@ -61,7 +61,7 @@ class apiTopicView extends apiCore
* @param boolean Load only topics viewable by guests? * @param boolean Load only topics viewable by guests?
* @return @e array Array of topics data * @return @e array Array of topics data
*/ */
public function return_topic_list_data( $view_as_guest=false ) public function return_topic_list_data( $view_as_guest=false, $parse_display=false )
{ {
//----------------------------------------- //-----------------------------------------
// INIT // INIT
@@ -168,6 +168,24 @@ class apiTopicView extends apiCore
$row['link-forum'] = $this->registry->getClass('output')->buildSEOUrl( "showforum={$row['forum_id']}", 'public', $row['name_seo'], 'showforum' ); $row['link-forum'] = $this->registry->getClass('output')->buildSEOUrl( "showforum={$row['forum_id']}", 'public', $row['name_seo'], 'showforum' );
$row['link-profile'] = $this->registry->getClass('output')->buildSEOUrl( "showuser={$row['member_id']}", 'public', $row['members_seo_name'], 'showuser' ); $row['link-profile'] = $this->registry->getClass('output')->buildSEOUrl( "showuser={$row['member_id']}", 'public', $row['members_seo_name'], 'showuser' );
//-----------------------------------------
// Parse for display - http://community.invisionpower.com/resources/bugs.html/_/ip-board/xml-rpc-returning-bbcode-r41329
//-----------------------------------------
if ( $parse_display )
{
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser' );
$parser = new $classToLoad();
/* Set up some settings */
$parser->set( array( 'parseArea' => 'topics',
'parseBBCode' => true,
'parseHtml' => true,
'parseEmoticons' => true ) );
$row['post'] = $parser->display( $row['post'] );
}
$topics[] = $row; $topics[] = $row;
} }
@@ -177,7 +195,7 @@ class apiTopicView extends apiCore
$this->DB->build( array( 'select' => '*', $this->DB->build( array( 'select' => '*',
'from' => 'attachments', 'from' => 'attachments',
'where' => "attach_rel_module='post' AND attach_rel_id IN (" . implode( ",", $this->attach_pids ) . ")" 'where' => "attach_rel_module='post' AND attach_rel_id IN (" . IPSText::cleanPermString( implode( ",", $this->attach_pids ) ) . ")"
) ); ) );
$this->DB->execute(); $this->DB->execute();
@@ -7,7 +7,7 @@
* $Author: bfarber $ * $Author: bfarber $
* @since - * @since -
* $LastChangedDate: 2011-07-20 20:19:22 -0400 (Wed, 20 Jul 2011) $ * $LastChangedDate: 2011-07-20 20:19:22 -0400 (Wed, 20 Jul 2011) $
* @version v3.3.4 * @version v3.4.5
* $Revision: 9296 $ * $Revision: 9296 $
*/ */
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Member property updater (AJAX) * Member property updater (AJAX)
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 1st march 2002 * @since 1st march 2002
* @version $Revision: 10914 $ * @version $Revision: 10721 $
* *
*/ */
@@ -7,7 +7,7 @@
* @license http://www.invisionpower.com/company/standards.php#license * @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Downloads * @package IP.Downloads
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Rev: 10914 $ * @version $Rev: 11401 $
*/ */
if ( ! defined( 'IN_IPB' ) ) if ( ! defined( 'IN_IPB' ) )
@@ -159,44 +159,54 @@ class comments_core_reports extends classes_comments_renderer
*/ */
public function postSave( $type, array $array, $commentId=0, $parentId=0 ) public function postSave( $type, array $array, $commentId=0, $parentId=0 )
{ {
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) ); $_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
$this->DB->update( 'rc_reports_index', array( 'num_comments' => intval($_cnt['total']), 'date_updated' => IPS_UNIX_TIME_NOW, 'updated_by' => $array['comment_author_id'] ), "id=" . $parentId ); $this->DB->update( 'rc_reports_index', array( 'num_comments' => intval($_cnt['total']), 'date_updated' => IPS_UNIX_TIME_NOW, 'updated_by' => $this->memberData['member_id'] ), "id=" . $parentId );
$report = $this->fetchParent( $parentId );
//----------------------------------------- //-----------------------------------------
// Notify other moderators // Notify other moderators
//----------------------------------------- //-----------------------------------------
$report = $this->fetchParent( $parentId ); if ( $type == 'add' )
$this->registry->class_localization->loadLanguageFile( array( 'public_reports' ) );
$this->DB->loadCacheFile( IPSLib::getAppDir('core') . '/sql/' . ips_DBRegistry::getDriverType() . '_report_queries.php', 'report_sql_queries' );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') .'/sources/classes/reportLibrary.php', 'reportLibrary' );
$this->registry->setClass( 'reportLibrary', new $classToLoad( $this->registry ) );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/reportNotifications.php', 'reportNotifications' );
$notify = new $classToLoad( $this->registry );
$this->registry->getClass('reportLibrary')->loadPlugin( $report['my_class'], $report['app'] );
if( is_object($this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]) )
{ {
if( $report['extra_data'] && $report['extra_data'] != 'N;' ) $this->registry->class_localization->loadLanguageFile( array( 'public_reports' ) );
{
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = unserialize( $report['extra_data'] );
}
else
{
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = array();
}
$report_data = $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->formatReportData( $report ); $this->DB->loadCacheFile( IPSLib::getAppDir('core') . '/sql/' . ips_DBRegistry::getDriverType() . '_report_queries.php', 'report_sql_queries' );
$notify->initNotify( $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->getNotificationList( IPSText::cleanPermString( $report['mod_group_perm'] ), $report_data ), $report_data ); $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') .'/sources/classes/reportLibrary.php', 'reportLibrary' );
$notify->sendReplyNotifications( $array['comment_text'] ); $this->registry->setClass( 'reportLibrary', new $classToLoad( $this->registry ) );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/reportNotifications.php', 'reportNotifications' );
$notify = new $classToLoad( $this->registry );
$this->registry->getClass('reportLibrary')->loadPlugin( $report['my_class'], $report['app'] );
if( is_object($this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]) )
{
if( $report['extra_data'] && $report['extra_data'] != 'N;' )
{
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = unserialize( $report['extra_data'] );
}
else
{
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = array();
}
$report_data = $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->formatReportData( $report );
$notify->initNotify( $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->getNotificationList( IPSText::cleanPermString( $report['mod_group_perm'] ), $report_data ), $report_data );
$notify->sendReplyNotifications( $array['comment_text'] );
}
} }
//-----------------------------------------
// Mark read
//-----------------------------------------
$this->registry->classItemMarking->markRead( array( 'forumID' => 0, 'itemID' => $report['id'] ), 'core' );
return $array; return $array;
} }
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Core Sessions * Core Sessions
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 20th February 2002 * @since 20th February 2002
* @version $Rev: 10914 $ * @version $Rev: 10721 $
* *
*/ */
@@ -28,9 +28,9 @@ if ( ! defined( 'IN_IPB' ) )
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Item Marking * Item Marking
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -38,7 +38,7 @@ if ( ! defined( 'IN_IPB' ) )
* @license http://www.invisionpower.com/company/standards.php#license * @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Downloads * @package IP.Downloads
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Rev: 10914 $ * @version $Rev: 10721 $
* *
*/ */
@@ -2,9 +2,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Core registered caches, redirect resets and bitwise settings * Core registered caches, redirect resets and bitwise settings
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 20th February 2002 * @since 20th February 2002
* @version $Rev: 10914 $ * @version $Rev: 10721 $
* *
*/ */
@@ -2,17 +2,17 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Dashboard Notifications * Dashboard Notifications
* Last Updated: 11.07.2012 * Last Updated: $Date
* *
* @author $Author: ips_terabyte $ * @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license * @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Rev: 11026 $ * @version $Rev: 12238 $
*/ */
if ( ! defined( 'IN_IPB' ) ) if ( ! defined( 'IN_IPB' ) )
@@ -23,7 +23,6 @@ if ( ! defined( 'IN_IPB' ) )
/** /**
* Main loader class * Main loader class
* DO NOT MODIFY!
*/ */
class dashboardNotifications__core class dashboardNotifications__core
{ {
@@ -49,25 +48,118 @@ class dashboardNotifications__core
public function get() public function get()
{ {
/* INIT! */ /* INIT */
$entries = array(); $entries = array();
if( ! $this->settings['ipb_reg_number'] ) if( ! $this->settings['ipb_reg_number'] )
{ {
$entries[] = array( $this->lang->words['lc_title_nokey'], sprintf( $this->lang->words['lc_msg_nokey'], "{$this->settings['base_url']}module=tools&amp;section=licensekey" ) ); $entries[] = array( $this->lang->words['lc_title_nokey'], sprintf( $this->lang->words['lc_msg_nokey'], "{$this->settings['base_url']}module=tools&amp;section=licensekey" ) );
} }
else
{
/* Is the Spam Service Working? */
if ( $this->settings['spam_service_enabled'] )
{
$GOT_SPAM_ERROR = false;
/* Are we entitled to it? */
$licenseData = $this->cache->getCache( 'licenseData' );
if ( is_array( $licenseData['ipbMain'] ) && count( $licenseData['ipbMain'] ) )
{
foreach ( $licenseData['ipbMain'] as $data )
{
if ( $data['name'] == 'Spam Monitoring Service' && $data['status'] != 'Ok' )
{
$disableLink = $this->settings['base_url'] . "app=core&amp;module=settings&amp;section=settings&amp;do=findsetting&amp;key=spamservice";
if ( is_numeric( $data['_expires'] ) && time() > $data['_expires'] )
{
$entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_expired'], $disableLink ) );
}
else
{
$entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_unavailable'], $disableLink ) );
}
$GOT_SPAM_ERROR = true;
break;
}
}
}
if ( ! $GOT_SPAM_ERROR )
{
/* Get last 5 logs, and if all 5 are errors, show message */
$_errors = 0;
$_entries = 0;
$_lastError = '';
$this->DB->build( array( 'select' => 'log_code, log_msg', 'from' => 'spam_service_log', 'order' => 'id DESC', 'limit' => 5 ) );
$this->DB->execute();
while( $_r = $this->DB->fetch() )
{
$_entries++;
if( $_r['log_code'] === '0' )
{
$_errors++;
if( !$_lastError )
{
$_lastError = $_r['log_msg'];
}
}
}
if( $_entries > 0 && $_errors == $_entries )
{
$entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_error_msg'], $_lastError ) );
}
}
}
/* If it's disabled, are we entitiled to it? */
else
{
$licenseData = $this->cache->getCache( 'licenseData' );
if ( is_array( $licenseData['ipbMain'] ) && count( $licenseData['ipbMain'] ) )
{
foreach ( $licenseData['ipbMain'] as $data )
{
if ( $data['name'] == 'Spam Monitoring Service' && $data['status'] == 'Ok' )
{
$entries[] = array( $this->lang->words['spam_service_disabled'], $this->lang->words['spam_service_disabled_msg'] );
break;
}
}
}
}
}
/* FURL cache OOD? */ /* FURL cache OOD? */
if ( is_file( IPS_CACHE_PATH . 'cache/furlCache.php' ) ) if ( is_file( FURL_CACHE_PATH ) )
{ {
$mtime = intval( @filemtime( IPS_CACHE_PATH . 'cache/furlCache.php' ) ); $mtime = intval( @filemtime( FURL_CACHE_PATH ) );
/* Check mtimes on extensions.. */ /* Check mtimes on extensions.. */
foreach( ipsRegistry::$applications as $app_dir => $application ) foreach( ipsRegistry::$applications as $app_dir => $application )
{ {
if ( is_file( IPSLib::getAppDir( $app_dir ) . '/extensions/furlTemplates.php' ) ) $furltemplatesfile = IPSLib::getAppDir( $app_dir );
if(IPB_USE_ONLY_ID_FURL && is_file( $furltemplatesfile.'/extensions/furlTemplatesID.php'))
{ {
$_mtime = intval( @filemtime( IPSLib::getAppDir( $app_dir ) . '/extensions/furlTemplates.php' ) ); $furltemplatesfile.='/extensions/furlTemplatesID.php';
}
else
{
$furltemplatesfile.='/extensions/furlTemplates.php';
}
if ( is_file( $furltemplatesfile ) )
{
$_mtime = intval( @filemtime( $furltemplatesfile ) );
if ( $_mtime > $mtime ) if ( $_mtime > $mtime )
{ {
@@ -185,8 +277,10 @@ class dashboardNotifications__core
{ {
$_postMaxVars = @ini_get('suhosin.post.max_vars'); $_postMaxVars = @ini_get('suhosin.post.max_vars');
$_reqMaxVars = @ini_get('suhosin.request.max_vars'); $_reqMaxVars = @ini_get('suhosin.request.max_vars');
$_getMaxLen = @ini_get('suhosin.get.max_value_length');
$_postMaxLen = @ini_get('suhosin.post.max_value_length'); $_postMaxLen = @ini_get('suhosin.post.max_value_length');
$_reqMaxLen = @ini_get('suhosin.request.max_value_length'); $_reqMaxLen = @ini_get('suhosin.request.max_value_length');
$_reqMaxVar = @ini_get('suhosin.request.max_varname_length');
if( $_postMaxVars < 4096 ) if( $_postMaxVars < 4096 )
{ {
@@ -198,6 +292,11 @@ class dashboardNotifications__core
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue2'], $_reqMaxVars ) ); $entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue2'], $_reqMaxVars ) );
} }
if( $_getMaxLen < 2000 )
{
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue6'], $_getMaxLen ) );
}
if( $_postMaxLen < 1000000 ) if( $_postMaxLen < 1000000 )
{ {
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue3'], $_postMaxLen ) ); $entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue3'], $_postMaxLen ) );
@@ -207,6 +306,11 @@ class dashboardNotifications__core
{ {
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue4'], $_reqMaxLen ) ); $entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue4'], $_reqMaxLen ) );
} }
if( $_reqMaxVar < 350 )
{
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue5'], $_reqMaxVar ) );
}
} }
/* SQL error check */ /* SQL error check */
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* BBCode Management : Determines if bbcode can be used in this section * BBCode Management : Determines if bbcode can be used in this section
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Rev: 10914 $ * @version $Rev: 10721 $
* *
*/ */
@@ -0,0 +1,38 @@
<?php
/**
* @file facebook.php Community Enhancements - Facebook
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 24 July 2012
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
* @version v3.4.5
* $Revision: 10952 $
*/
/**
*
* @class enhancements_core_facebook
* @brief Community Enhancements - Facebook
*/
class enhancements_core_facebook
{
/**
* Applicable Settings
*/
public $settings = array( 'fbc_enable', 'fbc_appid', 'fbc_secret', 'fbc_mgid', 'fbc_bot_group', 'fb_locale', 'fb_realname' );
/**
* Constructor
*
* @param ipsRegistry
*/
public function __construct( $registry )
{
$this->title = $registry->getClass('class_localization')->words['enhancements_facebook'];
$this->description = $registry->getClass('class_localization')->words['enhancements_facebook_desc'];
$this->enabled = ipsRegistry::$settings['fbc_enable'];
$this->message = '<a href="http://external.ipslink.com/ipboard30/landing/?p=facebook" target="_blank">' . ipsRegistry::getClass('class_localization')->words['enhancements_facebook_help'] . '</a>';
}
}
@@ -0,0 +1,38 @@
<?php
/**
* @file facebook.php Community Enhancements - Google Analytics
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 24 July 2012
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
* @version v3.4.5
* $Revision: 10952 $
*/
/**
*
* @class enhancements_core_googleanalytics
* @brief Community Enhancements - Google Analytics
*/
class enhancements_core_googleanalytics
{
/**
* Applicable Settings
*/
public $settings = array( 'ipseo_ga' );
/**
* Constructor
*
* @param ipsRegistry
*/
public function __construct( $registry )
{
$this->title = $registry->getClass('class_localization')->words['enhancements_googleanalytics'];
$this->description = $registry->getClass('class_localization')->words['enhancements_googleanalytics_desc'];
$this->message = "<a href='http://www.google.com/analytics/' target='_blank'>{$registry->getClass('class_localization')->words['enhancements_googleanalytics_help']}</a>";
$this->enabled = (bool) ipsRegistry::$settings['ipseo_ga'];
}
}
@@ -0,0 +1,42 @@
<?php
/**
* @file twitter.php Community Enhancements - IPS Backup
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 24 July 2012
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
* @version v3.4.5
* $Revision: 10952 $
*/
//-----------------------------------------
// admin_core_applications_enhancements::manage()
// contains code to disable this enhancement
// from showing right now
//-----------------------------------------
/**
*
* @class enhancements_core_ipsbackup
* @brief Community Enhancements - IPS Backup
*/
class enhancements_core_ipsbackup
{
/**
* Constructor
*
* @param ipsRegistry
*/
public function __construct( $registry )
{
$this->title = 'IPS Backup Service';
$this->description = 'Automatically backup your community.';
$this->icon = '';
$this->enabled = FALSE;
}
}
@@ -0,0 +1,167 @@
<?php
/**
* @file ipscdn.php Community Enhancements - IPS CDN
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 24 July 2012
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
* @version v3.4.5
* $Revision: 10952 $
*/
/**
*
* @class enhancements_core_ipscdn
* @brief Community Enhancements - IPS CDN
*/
class enhancements_core_ipscdn
{
/**
* Constructor
*
* @param ipsRegistry
*/
public function __construct( $registry )
{
$this->title = $registry->getClass('class_localization')->words['enhancements_ipscdn'];
$this->description = $registry->getClass('class_localization')->words['enhancements_ipscdn_desc'];
$this->icon = '';
$this->enabled = ipsRegistry::$settings['ips_cdn'];
$this->html = $registry->output->loadTemplate( 'cp_skin_applications' );
}
/**
* Edit Settings
*/
public function editSettings()
{
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
$skinFunctions = new skinCaching( ipsRegistry::instance() );
if ( ipsRegistry::$request['recache'] )
{
$skinFunctions->flushipscdn();
ipsRegistry::getClass('output')->redirect( ipsRegistry::$settings['_base_url'] . "app=core&amp;module=applications&amp;section=enhancements&amp;do=edit&amp;service=enhancements_core_ipscdn", ipsRegistry::getClass('class_localization')->words['cdn_recached'] );
}
if ( ipsRegistry::$request['disable'] )
{
IPSLib::updateSettings( array( 'ips_cdn' => FALSE, 'ipb_img_url' => '', 'ipb_css_url' => '', 'ipb_js_url' => '', 'upload_url' => '' ) );
if ( IPSLib::appIsInstalled('gallery') )
{
$this_script = str_replace( '\\', '/', getenv( 'SCRIPT_FILENAME' ) );
$url = ipsRegistry::$settings['_original_base_url'];
if( $this_script )
{
$this_script = str_replace( '/'.CP_DIRECTORY.'/index.php', '', $this_script );
if ( substr( ipsRegistry::$settings['gallery_images_path'], 0, strlen( $this_script ) ) === $this_script )
{
$url = str_replace( '\\', '/', str_replace( $this_script, $url, ipsRegistry::$settings['gallery_images_path'] ) );
}
}
else
{
$url .= '/uploads';
}
IPSLib::updateSettings( array( 'gallery_images_path' => $url ) );
}
IPSContentCache::truncate( 'post' );
IPSContentCache::truncate( 'sig' );
/* Set skin sets to recache */
$skinFunctions->flagSetForRecache();
ipsRegistry::getClass('output')->redirect( ipsRegistry::$settings['_base_url'] . "app=core&amp;module=applications&amp;section=enhancements", ipsRegistry::getClass('class_localization')->words['cdn_disabled'] );
return;
}
if ( !ipsRegistry::$settings['ipb_reg_number'] )
{
ipsRegistry::getClass('output')->showError( sprintf( ipsRegistry::getClass('class_localization')->words['enhancements_ipscdn_error_nokey'], ipsRegistry::getClass('output')->buildUrl('app=core&module=tools&section=licensekey', 'admin') ) );
}
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' );
$file = new $classToLoad();
$return = NULL;
if ( $json = @json_decode( $ping, TRUE ) )
{
if ( $json['ENABLED'] and $json['BYTES'] > 0 )
{
if ( !ipsRegistry::$settings['ips_cdn'] and !ipsRegistry::$request['enable'] )
{
return $this->html->cdnInactive( $json );
}
else
{
$settings = array( 'ips_cdn' => TRUE, 'ipb_img_url' => $json['URL'], 'ipb_css_url' => rtrim( $json['URL'], '/' ) . '/', 'ipb_js_url' => rtrim( $json['URL'], '/' ) . '/', 'upload_url' => $json['URL'] . '/uploads' );
if ( IPSLib::appIsInstalled('downloads') )
{
if ( substr( ipsRegistry::$settings['idm_localsspath'], 0, 11 ) === '{root_path}' )
{
$settings['idm_screenshot_url'] = str_replace( '{root_path}', $json['URL'], ipsRegistry::$settings['idm_localsspath'] );
}
}
if ( IPSLib::appIsInstalled('gallery') )
{
$this_script = str_replace( '\\', '/', getenv( 'SCRIPT_FILENAME' ) );
if( $this_script )
{
$this_script = str_replace( '/'.CP_DIRECTORY.'/index.php', '', $this_script );
if ( substr( ipsRegistry::$settings['gallery_images_path'], 0, strlen( $this_script ) ) === $this_script )
{
$settings['gallery_images_url'] = str_replace( '\\', '/', str_replace( $this_script, $json['URL'], ipsRegistry::$settings['gallery_images_path'] ) );
}
}
}
$_settings = array();
foreach ( $settings as $k => $v )
{
if ( ipsRegistry::$settings[ $k ] != $v )
{
$_settings[ $k ] = $v;
}
}
if ( !empty( $_settings ) )
{
IPSLib::updateSettings( $settings );
}
/* Set skin sets to recache */
$skinFunctions->flagSetForRecache();
}
}
else
{
$licenseData = ipsRegistry::cache()->getCache('licenseData');
if ( $licenseData['key']['url'] != ipsRegistry::$settings['board_url'] )
{
ipsRegistry::getClass('output')->showError( ipsRegistry::getClass('class_localization')->words['enhancements_ipscdn_error_url'] );
}
/* Set skin sets to recache */
$skinFunctions->flagSetForRecache();
return $this->html->cdnNotEnabled( $json );
}
}
else
{
ipsRegistry::getClass('output')->showError( sprintf( ipsRegistry::getClass('class_localization')->words['enhancements_ipscdn_error_key'], ipsRegistry::getClass('output')->buildUrl('app=core&module=tools&section=licensekey', 'admin') ) );
}
return $this->html->cdnOverview( $json );
}
}
@@ -0,0 +1,38 @@
<?php
/**
* @file twitter.php Community Enhancements - Twitter
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 24 July 2012
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
* @version v3.4.5
* $Revision: 10952 $
*/
/**
*
* @class enhancements_core_twitter
* @brief Community Enhancements - Twitter
*/
class enhancements_core_twitter
{
/**
* Applicable Settings
*/
public $settings = array( 'tc_enabled', 'tc_token', 'tc_secret', 'tc_mgid' );
/**
* Constructor
*
* @param ipsRegistry
*/
public function __construct( $registry )
{
$this->title = $registry->getClass('class_localization')->words['enhancements_twitter'];
$this->description = $registry->getClass('class_localization')->words['enhancements_twitter_desc'];
$this->enabled = ipsRegistry::$settings['tc_enabled'];
$this->message = '<a href="http://external.ipslink.com/ipboard30/landing/?p=twitter" target="_blank">' . ipsRegistry::getClass('class_localization')->words['enhancements_twitter_help'] . '</a>';
}
}
@@ -0,0 +1,114 @@
<?php
/**
* @file twitter.php Community Enhancements - Viglink
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 24 July 2012
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
* @version v3.4.5
* $Revision: 10952 $
*/
/**
*
* @class enhancements_core_viglink
* @brief Community Enhancements - Viglink
*/
class enhancements_core_viglink
{
/**
* Constructor
*
* @param ipsRegistry
*/
public function __construct( $registry )
{
$this->title = $registry->getClass('class_localization')->words['enhancements_viglink'];
$this->description = $registry->getClass('class_localization')->words['enhancements_viglink_desc'];
$this->enabled = ipsRegistry::$settings['viglink_enabled'];
if ( $this->enabled )
{
$this->message = sprintf( $registry->getClass('class_localization')->words['viglink_forums_notice'], $registry->output->buildUrl('app=forums', 'admin') );
$this->settings = array( 'viglink_enabled' );
if ( !ipsRegistry::$settings['viglink_subid'] )
{
$this->settings[] = 'viglink_api_key';
}
$this->settings[] = 'viglink_groups';
$this->settings[] = 'viglink_norewrite';
}
}
/**
* Edit Settings
*/
public function editSettings()
{
$json = $this->_makeApiCall();
return ipsRegistry::getClass('output')->loadTemplate('cp_skin_applications')->viglinkConvert( $json['URL'] );
}
/**
* Save Settings
*/
public function saveSettings()
{
if ( isset( ipsRegistry::$request['viglink_manual'] ) )
{
IPSLib::updateSettings( array( 'viglink_enabled' => '1', 'viglink_api_key' => ipsRegistry::$request['viglink_api_key'], 'viglink_subid' => '' ) );
}
else
{
$json = $this->_makeApiCall();
IPSLib::updateSettings( array( 'viglink_enabled' => '1', 'viglink_api_key' => $json['API_KEY'], 'viglink_subid' => $json['SUBID'] ) );
}
ipsRegistry::getClass('output')->silentRedirect( ipsRegistry::$settings['_base_url'] . "app=core&amp;module=applications&amp;section=enhancements&amp;do=edit&amp;service=enhancements_core_viglink" );
return;
}
/**
* Make call to IPS to get API keys
*
* @return array
*/
private function _makeApiCall()
{
$subId = NULL;
if ( ipsRegistry::$settings['ipb_reg_number'] )
{
$exploded = explode( '-', ipsRegistry::$settings['ipb_reg_number'] );
if ( isset( $exploded[3] ) )
{
$subId = $exploded[3];
}
}
if ( $subId === NULL )
{
$subId = ipsRegistry::$settings['board_url'];
if ( strlen( $subId ) > 32 )
{
$subId = str_replace( array( 'http://', 'https://' ), '', $subId );
}
if ( strlen( $subId ) > 32 )
{
$subId = md5( $subId );
}
}
require_once IPS_KERNEL_PATH . 'classFileManagement.php';
$cfm = new classFileManagement();
$return = NULL;
if ( $return and $json = @json_decode( $return, TRUE ) and $json['SUCCESS'] == TRUE )
{
return $json;
}
else
{
ipsRegistry::getClass('output')->showError( ipsRegistry::getClass('class_localization')->words['enhancements_viglink_error'] );
}
}
}
@@ -0,0 +1,140 @@
<?php
/**
* @file twitter.php Community Enhancements - Windows Live
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 24 July 2012
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
* @version v3.4.5
* $Revision: 10952 $
*/
/**
*
* @class enhancements_core_windowslive
* @brief Community Enhancements - Windows Live
*/
class enhancements_core_windowslive
{
/**
* Constructor
*
* @param ipsRegistry
*/
public function __construct( $registry )
{
$this->title = $registry->getClass('class_localization')->words['enhancements_windowslive'];
$this->description = $registry->getClass('class_localization')->words['enhancements_windowslive_desc'];
$this->enabled = FALSE;
$loginMethods = ipsRegistry::cache()->getCache('login_methods');
foreach ( $loginMethods as $method )
{
if ( $method['login_folder_name'] == 'live' and $method['login_enabled'] )
{
$this->enabled = TRUE;
}
}
$this->html = $registry->output->loadTemplate( 'cp_skin_applications' );
}
/**
* Edit Settings
*/
public function editSettings()
{
ipsRegistry::getClass('class_permissions')->checkPermissionAutoMsg( 'login_manage' );
$method = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', 'from' => 'login_methods', 'where' => "login_folder_name='live'" ) );
if ( !$method['login_id'] )
{
ipsRegistry::getClass('output')->showError( sprintf( ipsRegistry::getClass('class_localization')->words['enhancements_windowslive_error'], ipsRegistry::$settings['_base_url'] . 'app=core&amp;module=tools&amp;section=login' ) );
}
if ( ipsRegistry::$request['downloadxml'] )
{
$clientId = ipsRegistry::$request['client_id'];
$clientSecret = ipsRegistry::$request['client_secret'];
header( "Content-Disposition: attachment; filename=\"Application-Key.xml\"" );
header( "Content-type: application/xml" );
echo <<<XML
<windowslivelogin>
<appid>{$clientId}</appid>
<secret>{$clientSecret}</secret>
<securityalgorithm>wsignin1.0</securityalgorithm>
</windowslivelogin>
XML;
exit;
}
$config = unserialize( $method['login_custom_config'] );
$settings = array( 'enabled' => $this->enabled );
if ( $config['key_file_location'] )
{
$settings['xml'] = $config['key_file_location'];
$xml = file_get_contents( $settings['xml'] );
preg_match( "/<appid>(.+?)<\/appid>/" , $xml, $matches );
$settings['client_id'] = $matches[1];
preg_match( "/<secret>(.+?)<\/secret>/" , $xml, $matches );
$settings['client_secret'] = $matches[1];
}
else
{
$exploded = explode( '/', rtrim( DOC_IPS_ROOT_PATH, '/' ) );
do
{
$popped = array_pop( $exploded );
}
while ( strstr( ipsRegistry::$settings['base_url'], $popped ) !== FALSE );
$exploded[] = $popped;
$settings['xml'] = implode( '/', $exploded ) . '/Application-Key.xml';
}
return $this->html->windowsLiveSetup( $settings );
}
/**
* Save Settings
*/
public function saveSettings()
{
ipsRegistry::getClass('class_permissions')->checkPermissionAutoMsg( 'login_manage' );
$login = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', 'from' => 'login_methods', 'where' => "login_folder_name='live'" ) );
if ( !$login['login_id'] )
{
ipsRegistry::getClass('output')->showError( sprintf( ipsRegistry::getClass('class_localization')->words['enhancements_windowslive_error'], ipsRegistry::$settings['_base_url'] . 'app=core&amp;module=tools&amp;section=login' ) );
}
if ( ipsRegistry::$request['disable'] )
{
ipsRegistry::DB()->update( 'login_methods', array( 'login_enabled' => 0 ), 'login_id=' . $login['login_id'] );
ipsRegistry::cache()->rebuildCache( 'login_methods' );
return;
}
if ( !is_file( ipsRegistry::$request['xml'] ) )
{
ipsRegistry::getClass('output')->showError( ipsRegistry::getClass('class_localization')->words['enhancements_windowslive_error2'] );
}
$config = unserialize( $login['login_custom_config'] );
$config['key_file_location'] = ipsRegistry::$request['xml'];
$toSave = array( 'login_custom_config' => serialize( $config ) );
$toSave['login_enabled'] = '1';
ipsRegistry::DB()->update( 'login_methods', $toSave, 'login_id=' . $login['login_id'] );
ipsRegistry::cache()->rebuildCache( 'login_methods' );
}
}
@@ -2,19 +2,19 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Sets up SEO templates * Sets up SEO templates
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2013-03-12 09:54:04 -0400 (Tue, 12 Mar 2013) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: mmecham $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license * @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 20th February 2002 * @since 20th February 2002
* @version $Rev: 10914 $ * @version $Rev: 12072 $
* *
*/ */
@@ -52,7 +52,20 @@ $_SEOTEMPLATES = array(
'in' => array( 'regex' => "#/register(/|$|\?)#i", 'in' => array( 'regex' => "#/register(/|$|\?)#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'register' ) ) ) ), 'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'register' ) ) ) ),
'section=lostpass' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=lostpass(&amp;|&|$)#i', 'lostpass/$3' ),
'in' => array( 'regex' => "#/lostpass(/|$|\?)#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'lostpass' ) ) ) ),
'section=login' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=login(&amp;|&|$)#i', 'login/$3' ),
'in' => array( 'regex' => "#/login(/|$|\?)#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'login' ) ) ) ),
'tags' => array( 'app' => 'core', 'tags' => array( 'app' => 'core',
'isPagesMode' => true,
'allowRedirect' => 0, 'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=search(&amp;|&)do=search(&amp;|&)search_tags=(\S+?)(&amp;|&)search_app=(\S+?)(&amp;|&|$)#i', 'tags/$6/$4/$7' ), 'out' => array( '#app=core(&amp;|&)module=search(&amp;|&)do=search(&amp;|&)search_tags=(\S+?)(&amp;|&)search_app=(\S+?)(&amp;|&|$)#i', 'tags/$6/$4/$7' ),
'in' => array( 'regex' => "#/tags/(\S+?)/(\S+?)/#i", 'in' => array( 'regex' => "#/tags/(\S+?)/(\S+?)/#i",
@@ -83,7 +96,7 @@ $_SEOTEMPLATES = array(
'section=rss2' => array( 'app' => 'core', 'section=rss2' => array( 'app' => 'core',
'allowRedirect' => 0, 'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=rss(&amp;|&)type=(\w+?)(&amp;|&)id=(\w+?)$#i', 'rss/$4/$6-#{__title__}/' ), 'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=rss(&amp;|&)type=(\w+?)(&amp;|&)id=(\w+?)$#i', 'rss/$4/$6-#{__title__}/' ),
'in' => array( 'regex' => "#/rss/(\w+?)/(\w+?)-#i", 'in' => array( 'regex' => "#/rss/(\w+?)/(\w+?)(?:-|/|$)#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'rss' ), array( 'type', '$1' ), array( 'id', '$2' ) ) ) ), 'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'rss' ), array( 'type', '$1' ), array( 'id', '$2' ) ) ) ),
# Changed section=rss2 id matching to use \w for more flexibility # Changed section=rss2 id matching to use \w for more flexibility
@@ -0,0 +1,106 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Sets up SEO templates
* Last Updated: $Date: 2013-03-12 09:54:04 -0400 (Tue, 12 Mar 2013) $
* </pre>
*
* @author $Author: mmecham $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 12072 $
*
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
/**
* SEO templates
*
* 'allowRedirect' is a flag to tell IP.Board whether to check the incoming link and if not formatted correctly, redirect the correct one
*
* OUT FORMAT REGEX:
* First array element is a regex to run to see if we've a match for the URL
* The second array element is the template to use the results of the parenthesis capture
*
* Special variable #{__title__} is replaced with the $title data passed to output->formatUrl( $url, $title)
*
* IMPORTANT: Remember that when these regex are used, the output has not been fully parsed so you will get:
* showuser={$data['member_id']} NOT showuser=1 so do not try and match numerics only!
*
* IN FORMAT REGEX
*
* This allows the registry to piece back together a URL based on the template regex
* So, for example: "/user/(\d+?)/", 'matches' => array( array( 'showuser' => '$1' ) )tells IP.Board to populate 'showuser' with the result
* of the parenthesis capture #1
*/
$_SEOTEMPLATES = array(
'section=register' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=register(&amp;|&|$)#i', 'register/$3' ),
'in' => array( 'regex' => "#/register(/|$|\?)#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'register' ) ) ) ),
'section=lostpass' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=lostpass(&amp;|&|$)#i', 'lostpass/$3' ),
'in' => array( 'regex' => "#/lostpass(/|$|\?)#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'lostpass' ) ) ) ),
'section=login' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=login(&amp;|&|$)#i', 'login/$3' ),
'in' => array( 'regex' => "#/login(/|$|\?)#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'login' ) ) ) ),
'tags' => array( 'app' => 'core',
'isPagesMode' => true,
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=search(&amp;|&)do=search(&amp;|&)search_tags=(\S+?)(&amp;|&)search_app=(\S+?)(&amp;|&|$)#i', 'tags/$6/$4/$7' ),
'in' => array( 'regex' => "#/tags/(\S+?)/(\S+?)/#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'search' ), array( 'do', 'search' ), array( 'search_tags', '$2' ), array( 'search_app', '$1' ) ) ) ),
'privacy' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=privacy(&amp;|&|$)#i', 'privacypolicy/$4/' ),
'in' => array( 'regex' => "#/privacypolicy/#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'privacy' ) ) ) ),
'likeunsubscribe' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=like(&amp;|&)do=unsubscribe(&amp;|&)key=(\S+?)(&amp;|&|$)#i', 'unsubscribe/$5/' ),
'in' => array( 'regex' => "#/unsubscribe/(\S+?)/$#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'like' ), array( 'do', 'unsubscribe' ), array( 'key', '$1' ) ) ) ),
'findcomment' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=comments(&amp;|&)do=findComment(&amp;|&)fromApp=(\S+?)(&amp;|&)parentId=(\d+?)(&amp;|&)commentId=(\d+?)(&amp;|&|$)#i', 'findComment/$5/$7-$9' ),
'in' => array( 'regex' => "#/findComment/(\S+?-\S+?)/(\d+?)-(\d+?)$#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'comments' ), array( 'do', 'findComment' ), array( 'fromApp', '$1' ), array( 'parentId', '$2' ), array( 'commentId', '$3' ) ) ) ),
'section=rss' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=rss(&amp;|&)type=(\w+?)$#i', 'rss/$4/' ),
'in' => array( 'regex' => "#/rss/(\w+?)/$#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'rss' ), array( 'type', '$1' ) ) ) ),
'section=rss2' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=rss(&amp;|&)type=(\w+?)(&amp;|&)id=(\w+?)$#i', 'rss/$4/$6/' ),
'in' => array( 'regex' => "#/rss/(\w+?)/(\w+?)(?:-|/|$)#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'rss' ), array( 'type', '$1' ), array( 'id', '$2' ) ) ) ),
# Changed section=rss2 id matching to use \w for more flexibility
);
@@ -6,7 +6,7 @@
* $License: http://www.invisionpower.com/company/standards.php#license$ * $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $ * $Author: mark $
* $LastChangedDate: 2011-12-08 16:43:34 +0000 (Thu, 08 Dec 2011) $ * $LastChangedDate: 2011-12-08 16:43:34 +0000 (Thu, 08 Dec 2011) $
* @version v3.3.4 * @version v3.4.5
* $Revision: 9971 $ * $Revision: 9971 $
*/ */
@@ -4,11 +4,11 @@
*~TERABYTE_DOC_READY~ *~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$ * $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$ * $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $ * $Author: AndyMillne $
* @since 3/8/2011 * @since 3/8/2011
* $LastChangedDate: 2011-05-12 22:28:10 -0400 (Thu, 12 May 2011) $ * $LastChangedDate: 2013-03-12 15:04:05 -0400 (Tue, 12 Mar 2013) $
* @version v3.3.4 * @version v3.4.5
* $Revision: 8754 $ * $Revision: 12074 $
*/ */
if ( ! defined( 'IN_IPB' ) ) if ( ! defined( 'IN_IPB' ) )
@@ -86,7 +86,12 @@ class navigation_core
$links = array(); $links = array();
$links[] = array( 'title' => $this->lang->words['view_new_posts'] , 'url' => $this->registry->output->buildUrl( 'app=core&amp;module=search&amp;do=viewNewContent&amp;search_app=forums', 'public') ); $links[] = array( 'title' => $this->lang->words['view_new_posts'] , 'url' => $this->registry->output->buildUrl( 'app=core&amp;module=search&amp;do=viewNewContent&amp;search_app=forums', 'public') );
$links[] = array( 'title' => $this->lang->words['online_user_link'] , 'url' => $this->registry->output->buildUrl( 'app=members&amp;module=online&amp;sort_order=desc', 'public') );
if ( $this->settings['allow_online_list'] )
{
$links[] = array( 'title' => $this->lang->words['online_user_link'] , 'url' => $this->registry->output->buildUrl( 'app=members&amp;module=online&amp;sort_order=desc', 'public') );
}
$links[] = array( 'title' => $this->lang->words['registered_users_link'], 'url' => $this->registry->output->buildSEOUrl( 'app=members&amp;module=list', 'public', 'false', 'members_list' ) ); $links[] = array( 'title' => $this->lang->words['registered_users_link'], 'url' => $this->registry->output->buildSEOUrl( 'app=members&amp;module=list', 'public', 'false', 'members_list' ) );
$links[] = array( 'title' => $this->lang->words['status_updates_link'] , 'url' => $this->registry->output->buildSEOUrl( 'app=members&amp;module=profile&amp;section=status', 'public', 'false', 'members_status_all' ) ); $links[] = array( 'title' => $this->lang->words['status_updates_link'] , 'url' => $this->registry->output->buildSEOUrl( 'app=members&amp;module=profile&amp;section=status', 'public', 'false', 'members_status_all' ) );
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Define the core notification types * Define the core notification types
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2013-05-21 20:51:17 -0400 (Tue, 21 May 2013) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 20th February 2002 * @since 20th February 2002
* @version $Rev: 10914 $ * @version $Rev: 12263 $
* *
*/ */
@@ -43,8 +43,8 @@ class core_notifications
return $_NOTIFY; return $_NOTIFY;
} }
public function report_center() public function report_center( $member )
{ {
return $this->memberData['access_report_center']; return $member['access_report_center'];
} }
} }
@@ -2,19 +2,19 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Report Center :: Default plugin * Report Center :: Default plugin
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $LastChangedDate: 2012-12-10 11:06:25 -0500 (Mon, 10 Dec 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: AndyMillne $
* @author Based on original "Report Center" by Luke Scott * @author Based on original "Report Center" by Luke Scott
* @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license * @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Rev: 10914 $ * @version $Rev: 11691 $
*/ */
if ( ! defined( 'IN_IPB' ) ) if ( ! defined( 'IN_IPB' ) )
@@ -386,18 +386,18 @@ EOF;
$the_report = $this->DB->fetch(); $the_report = $this->DB->fetch();
$rid = $the_report['id']; $rid = $the_report['id'];
$this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'] ), "id='{$rid}'" ); $this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'], 'updated_by' => $this->memberData['member_id'] ), "id='{$rid}'" );
} }
IPSText::getTextClass('bbcode')->parse_bbcode = 1; /* Load editor stuff */
IPSText::getTextClass('bbcode')->parse_html = 0; $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' );
IPSText::getTextClass('bbcode')->parse_emoticons = 1; $editor = new $classToLoad();
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'reports'; $editor->setLegacyMode(false);
$build_report = array( $build_report = array(
'rid' => $rid, 'rid' => $rid,
'report' => IPSText::getTextClass('bbcode')->preDbParse( $this->request['message'] ), 'report' => $editor->process( $this->request['message'] ),
'report_by' => $this->memberData['member_id'], 'report_by' => $this->memberData['member_id'],
'date_reported' => time(), 'date_reported' => time(),
); );
@@ -2,9 +2,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* RSS output plugin :: report center * RSS output plugin :: report center
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 6/24/2008 * @since 6/24/2008
* @version $Revision: 10914 $ * @version $Revision: 10721 $
*/ */
if ( ! defined( 'IN_IPB' ) ) if ( ! defined( 'IN_IPB' ) )
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Config file * Config file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $author$ * @author $author$
@@ -14,7 +14,7 @@
* @package IP.Board * @package IP.Board
* @subpackage Forums * @subpackage Forums
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Rev: 10914 $ * @version $Rev: 10721 $
*/ */
if ( ! defined( 'IN_IPB' ) ) if ( ! defined( 'IN_IPB' ) )
@@ -2,9 +2,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Basic Forum Search * Basic Forum Search
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -13,7 +13,7 @@
* @package IP.Board * @package IP.Board
* @subpackage Forums * @subpackage Forums
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Rev: 10914 $ * @version $Rev: 10721 $
*/ */
if ( ! defined( 'IN_IPB' ) ) if ( ! defined( 'IN_IPB' ) )
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Returns HTML for the form (optional class, not required) * Returns HTML for the form (optional class, not required)
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $author$ * @author $author$
@@ -14,7 +14,7 @@
* @package IP.Board * @package IP.Board
* @subpackage Forums * @subpackage Forums
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Rev: 10914 $ * @version $Rev: 10721 $
*/ */
if ( ! defined( 'IN_IPB' ) ) if ( ! defined( 'IN_IPB' ) )
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Formats forum search results * Formats forum search results
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $author$ * @author $author$
@@ -14,7 +14,7 @@
* @package IP.Board * @package IP.Board
* @subpackage Forums * @subpackage Forums
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Rev: 10914 $ * @version $Rev: 10721 $
*/ */
if ( ! defined( 'IN_IPB' ) ) if ( ! defined( 'IN_IPB' ) )
@@ -3,11 +3,11 @@
* @file plugin_attachments.php Shared media plugin: attachments * @file plugin_attachments.php Shared media plugin: attachments
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$ * $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$ * $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: rtissier $ * $Author: mmecham $
* @since 3/8/2011 * @since 3/8/2011
* $LastChangedDate: 2011-03-16 19:10:59 -0400 (Wed, 16 Mar 2011) $ * $LastChangedDate: 2013-04-03 08:07:11 -0400 (Wed, 03 Apr 2013) $
* @version v3.3.4 * @version v3.4.5
* $Revision: 8108 $ * $Revision: 12145 $
*/ */
if ( ! defined( 'IN_IPB' ) ) if ( ! defined( 'IN_IPB' ) )
@@ -119,7 +119,8 @@ class plugin_core_attachments
$where = " AND attach_file LIKE '%{$string}%'"; $where = " AND attach_file LIKE '%{$string}%'";
} }
$count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'attachments', 'where' => "attach_member_id={$this->memberData['member_id']}" . $where ) ); /* Exclude PMs */
$count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'attachments', 'where' => "attach_rel_module != 'msg' AND attach_member_id={$this->memberData['member_id']}" . $where ) );
$rows = array(); $rows = array();
$pages = $this->registry->output->generatePagination( array( 'totalItems' => $count['total'], $pages = $this->registry->output->generatePagination( array( 'totalItems' => $count['total'],
@@ -131,7 +132,7 @@ class plugin_core_attachments
'ajaxLoad' => 'mymedia_content', 'ajaxLoad' => 'mymedia_content',
'baseUrl' => "app=core&amp;module=ajax&amp;section=media&amp;do=loadtab&amp;tabapp=core&amp;tabplugin=attachments&amp;search=" . urlencode($string) ) ); 'baseUrl' => "app=core&amp;module=ajax&amp;section=media&amp;do=loadtab&amp;tabapp=core&amp;tabplugin=attachments&amp;search=" . urlencode($string) ) );
$this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_member_id={$this->memberData['member_id']}" . $where, 'order' => 'attach_date DESC', 'limit' => array( $st, $each ) ) ); $this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module != 'msg' AND attach_member_id={$this->memberData['member_id']}" . $where, 'order' => 'attach_date DESC', 'limit' => array( $st, $each ) ) );
$outer = $this->DB->execute(); $outer = $this->DB->execute();
while( $r = $this->DB->fetch($outer) ) while( $r = $this->DB->fetch($outer) )
@@ -0,0 +1,92 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_blog_entries extends ipseoSitemapPlugin
{
public function generate()
{
if(!IPSLib::appIsInstalled('blog') || $this->settings['sitemap_priority_blog_entries'] == 0)
{
return;
}
// Check whether groups can access blog at all:
$guestGroup = $this->DB->buildAndFetch(array( 'select' => 'g_blog_settings',
'from' => 'groups',
'where' => 'g_id = ' . $this->settings['guest_group']));
// Default is to not allow access unless explicitly given:
if(is_null($guestGroup['g_blog_settings']))
{
return;
}
$settings = unserialize($guestGroup['g_blog_settings']);
// Not allowed to access unless g_blog_allowview = 1
if(!is_array($settings) || intval($settings['g_blog_allowview']) != 1)
{
return;
}
$max = $this->settings['sitemap_count_blog_entries'];
if(!ipSeo_SitemapGenerator::isCronJob() && ($max > 10000 || $max == -1))
{
$max = 10000;
}
elseif(ipSeo_SitemapGenerator::isCronJob() && $max == -1)
{
$max = 50000000;
}
// Get blogs:
$addedCount = 0;
$limitCount = 0;
while($addedCount < $max)
{
if(ipSeo_SitemapGenerator::isCronJob())
{
sleep(0.25);
}
$query = $this->DB->build(array( 'select' => 'e.entry_id, b.blog_id, e.entry_name_seo, e.entry_last_update',
'from' => array('blog_entries' => 'e'),
'add_join' => array(array('type'=>'left', 'from' => array('blog_blogs' => 'b'),
'where' => 'b.blog_id = e.blog_id')),
'where' => 'b.blog_private = 0
AND b.blog_disabled = 0
AND b.blog_allowguests = 1
AND b.blog_view_level = \'public\'
AND e.entry_status = \'published\'',
'order' => 'e.entry_id DESC',
'limit' => array($limitCount, 100)));
$outer = $this->DB->execute();
// Add blogs to sitemap:
while($entry = $this->DB->fetch($outer))
{
$url = $this->settings['board_url'] . '/index.php?app=blog&module=display&section=blog&blogid='.$entry['blog_id'].'&showentry=' . $entry['entry_id'];
$url = ipSeo_FURL::build($url, 'none', $entry['entry_name_seo'], 'showentry');
//$url = ipsRegistry::getClass('output')->buildSEOUrl($url, 'none', $entry['entry_name_seo'], 'showentry');
$addedCount = $this->sitemap->addURL($url, $entry['entry_last_update'], $this->settings['sitemap_priority_blog_entries']);
unset($url);
unset($entry);
}
$limitCount += 100;
// If we've got back less rows than expected, we've probably got no more to pull:
if($this->DB->getTotalRows($outer) < 100)
{
break;
}
}
}
}
@@ -0,0 +1,57 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_blogs extends ipseoSitemapPlugin
{
/**
* Generate sitemap entries:
*/
public function generate()
{
if(!IPSLib::appIsInstalled('blog') || $this->settings['sitemap_priority_blogs'] == 0)
{
return;
}
// Check whether groups can access blog at all:
$guestGroup = $this->DB->buildAndFetch(array( 'select' => 'g_blog_settings',
'from' => 'groups',
'where' => 'g_id = ' . $this->settings['guest_group']));
// Default is to not allow access unless explicitly given:
if(is_null($guestGroup['g_blog_settings']))
{
return;
}
$settings = unserialize($guestGroup['g_blog_settings']);
// Not allowed to access unless g_blog_allowview = 1
if(!is_array($settings) || intval($settings['g_blog_allowview']) != 1)
{
return;
}
// Get blogs:
$query = $this->DB->build(array( 'select' => 'blog_id, blog_seo_name, blog_last_udate',
'from' => 'blog_blogs',
'where' => 'blog_private = 0
AND blog_disabled = 0
AND blog_allowguests = 1
AND blog_view_level = \'public\''));
$this->DB->execute();
// Add blogs to sitemap:
while($blog = $this->DB->fetch())
{
$url = $this->settings['board_url'] . '/index.php?app=blog&blogid=' . $blog['blog_id'];
$url = ipSeo_FURL::build($url, 'none', $blog['blog_seo_name'], 'showblog');
//$url = ipsRegistry::getClass('output')->buildSEOUrl($url, 'none', $blog['blog_seo_name'], 'showblog');
$this->sitemap->addURL($url, $blog['blog_last_udate'], $this->settings['sitemap_priority_blogs']);
}
}
}
@@ -0,0 +1,92 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_calendar extends ipseoSitemapPlugin
{
/**
* Generate sitemap entries:
*/
public function generate()
{
//-----------------------------------------
// Is it enabled?
//-----------------------------------------
if(!IPSLib::appIsInstalled('calendar') || $this->settings['sitemap_priority_calendar'] == 0)
{
return;
}
//-----------------------------------------
// Which calendars can we access?
//-----------------------------------------
$calendars = array();
$this->DB->build( array(
'select' => 'c.cal_id',
'from' => array( 'cal_calendars' => 'c' ),
'add_join' => array( array(
'from' => array('permission_index' => 'p'),
'where' => "(p.app = 'calendar' AND p.perm_type = 'calendar' AND p.perm_type_id = c.cal_id)",
'type' => 'left'
) ),
'where' => $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p.perm_view' )
) );
$this->DB->execute();
while ( $row = $this->DB->fetch() )
{
$calendars[] = $row['cal_id'];
}
if ( empty( $calendars ) )
{
return;
}
//-----------------------------------------
// Get past events
//-----------------------------------------
$time = time();
$this->DB->build( array(
'select' => 'event_id, event_title_seo, event_start_date',
'from' => 'cal_events',
'where' => "event_end_date < {$time} AND " . $this->DB->buildWherePermission( $calendars, 'event_calendar_id', FALSE ) . ' AND ' . $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'event_perms' ),
'limit' => $this->settings['sitemap_count_calendar_past']
) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
$url = $this->settings['board_url'] . '/index.php?app=calendar&module=calendar&section=view&do=showevent&event_id=' . $row['event_id'];
$url = ipSeo_FURL::build( $url, 'none', $row['event_title_seo'], 'cal_event' );
$this->sitemap->addURL( $url, strtotime( $row['event_start_date'] ), $this->settings['sitemap_priority_calendar'] );
}
//-----------------------------------------
// Get future events
//-----------------------------------------
$this->DB->build( array(
'select' => 'event_id, event_title_seo, event_start_date',
'from' => 'cal_events',
'where' => "event_end_date > {$time} AND " . $this->DB->buildWherePermission( $calendars, 'event_calendar_id', FALSE ) . ' AND ' . $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'event_perms' ),
'limit' => $this->settings['sitemap_count_calendar_future']
) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
$url = $this->settings['board_url'] . '/index.php?app=calendar&module=calendar&section=view&do=showevent&event_id=' . $row['event_id'];
$url = ipSeo_FURL::build( $url, 'none', $row['event_title_seo'], 'cal_event' );
$this->sitemap->addURL( $url, strtotime( $row['event_start_date'] ), $this->settings['sitemap_priority_calendar'] );
}
}
}
@@ -0,0 +1,17 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_chat extends ipseoSitemapPlugin
{
public function generate()
{
if ( IPSLib::appIsInstalled( 'ipchat' ) and $this->settings['sitemap_priority_chat'] > 0 )
{
$this->sitemap->addURL( $this->settings['board_url'] . '/index.php?app=chat', time(), $this->settings['sitemap_priority_chat'] );
}
}
}
@@ -0,0 +1,68 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_content_database_categories extends ipseoSitemapPlugin
{
public function generate()
{
if(!IPSLib::appIsInstalled('ccs') || $this->settings['sitemap_priority_content_categories'] == 0)
{
return;
}
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('ccs') . '/sources/functions.php', 'ccsFunctions', 'ccs' );
$ccsFunctions = new $classToLoad($this->registry);
$permCheck1 = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'perm1.perm_view', true);
$permCheck2 = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'perm2.perm_view', true);
$permCheck3 = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p.page_view_perms', true);
$this->DB->build(array( 'select' => 'c.category_id, c.category_last_record_date, d.database_id, p.*',
'from' => array('ccs_database_categories' => 'c'),
'add_join' => array(
array(
'from' => array('ccs_databases' => 'd'),
'where' => "d.database_id = c.category_database_id",
'type' => 'left'),
array(
'from' => array('ccs_pages' => 'p'),
'where' => "( d.database_is_articles = 0
AND p.page_content LIKE CONCAT('%parse database=\"', d.database_key, '\"%')
OR
( d.database_is_articles = 1
AND p.page_content LIKE '%parse articles%'))",
'type' => 'left'),
array(
'from' => array('permission_index' => 'perm1'),
'where' => "(perm1.app = 'ccs' AND
(perm1.perm_type = 'databases' OR perm1.perm_type = 'database') AND
perm1.perm_type_id = d.database_id)",
'type' => 'left'),
array(
'from' => array('permission_index' => 'perm2'),
'where' => "(perm2.app = 'ccs' AND
(perm2.perm_type = 'categories' OR perm2.perm_type = 'cat') AND
perm2.perm_type_id = c.category_id)",
'type' => 'left')
),
'where' => " {$permCheck1} AND
(perm2.perm_view IS NULL OR perm2.perm_view = '' OR perm2.perm_2=',,' OR {$permCheck2}) AND
({$permCheck3})",
'order' => 'category_id DESC',
));
$result = $this->DB->execute();
while($category = $this->DB->fetch($result))
{
$pageUrl = $ccsFunctions->returnPageUrl($category) .'?';
$url = $ccsFunctions->getCategoriesClass($category['database_id'], false)->getCategoryUrl($pageUrl, $category['category_id']);
$this->sitemap->addURL($url, (int)$category['category_last_record_date'], $this->settings['sitemap_priority_content_categories']);
}
}
}
@@ -0,0 +1,169 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_content_database_records extends ipseoSitemapPlugin
{
public function generate()
{
if(!IPSLib::appIsInstalled('ccs') || $this->settings['sitemap_priority_content_records'] == 0)
{
return;
}
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('ccs') . '/sources/functions.php', 'ccsFunctions', 'ccs' );
$databaseToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('ccs') . '/sources/databases.php', 'databaseBuilder', 'ccs' );
$ccsFunctions = new $classToLoad($this->registry);
$permCheck1 = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'perm1.perm_2', true);
$permCheck2 = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'perm2.perm_2', true);
$permCheck3 = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p.page_view_perms', true);
$this->DB->build(array( 'select' => 'c.category_id, d.*, p.*',
'from' => array('ccs_database_categories' => 'c'),
'add_join' => array(
array(
'from' => array('ccs_databases' => 'd'),
'where' => "d.database_id = c.category_database_id",
'type' => 'left'),
array(
'from' => array('ccs_pages' => 'p'),
'where' => "( d.database_is_articles = 0
AND p.page_content LIKE CONCAT('%parse database=\"', d.database_key, '\"%')
OR
( d.database_is_articles = 1
AND p.page_content LIKE '%\{parse articles\}%'))",
'type' => 'left'),
array(
'from' => array('permission_index' => 'perm1'),
'where' => "(perm1.app = 'ccs' AND
(perm1.perm_type = 'databases' OR perm1.perm_type = 'database') AND
perm1.perm_type_id = d.database_id)",
'type' => 'left'),
array(
'from' => array('permission_index' => 'perm2'),
'where' => "(perm2.app = 'ccs' AND
(perm2.perm_type = 'categories' OR perm2.perm_type = 'cat') AND
perm2.perm_type_id = c.category_id)",
'type' => 'left')
),
'where' => " {$permCheck1} AND
(perm2.perm_2 IS NULL OR perm2.perm_2 = '' OR perm2.perm_2=',,' OR {$permCheck2}) AND
({$permCheck3})",
'order' => 'category_id DESC',
));
$result = $this->DB->execute();
$categories = array();
$databases = array();
while($category = $this->DB->fetch($result))
{
$categories[$category['category_id']] = $category['category_id'];
$databases[$category['database_id']] = $category;
$databases[$category['database_id']]['base_link'] = $ccsFunctions->returnPageUrl($category) .'?';
}
$_databases = $this->cache->getCache('ccs_databases');
foreach( $_databases as $_db )
{
if( isset($databases[ $_db['database_id'] ]) )
{
continue;
}
if ( ipsRegistry::getClass('permissions')->check( 'view', $_db, explode( ',', $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ) ) != TRUE )
{
$databases[ $_db['database_id'] ] = $_db;
$databases[ $_db['database_id'] ]['base_link'] = $ccsFunctions->returnDatabaseUrl( $_db['database_id'] );
}
}
/*if(!count($categories))
{
return;
}*/
$_cats = ( count($categories) ) ? implode( ',', $categories ) : 0;
$_hardLimit = !ipSeo_SitemapGenerator::isCronJob() ? 10000 : 500000000;
$addedCount = 0;
foreach($databases as $database)
{
if(ipSeo_SitemapGenerator::isCronJob())
{
sleep(1);
//print 'Processing database: ' . $database['database_name'] . PHP_EOL;
}
$db = new $databaseToLoad($this->registry);
$db->categories = $ccsFunctions->getCategoriesClass($database['database_id'], false);
$db->database = $database;
$db->fieldsClass = $this->registry->ccsFunctions->getFieldsClass();
$limitCount = 0;
while(1)
{
if(ipSeo_SitemapGenerator::isCronJob())
{
sleep(0.25);
}
if($addedCount >= $_hardLimit)
{
break;
}
$_published = null;
if( $database['database_is_articles'] )
{
$_cache = $this->cache->getCache('ccs_fields');
foreach( $_cache[ $database['database_id'] ] as $_field )
{
if( $_field['field_key'] == 'article_date' )
{
$_published = 'field_' . $_field['field_id'];
}
}
}
$this->DB->build(array( 'select' => '*',
'from' => $database['database_database'],
'where' => 'record_approved = 1 AND ( category_id IN ('.$_cats.') OR category_id=0)',
'order' => 'record_updated DESC',
'limit' => array($limitCount, 100)
));
$result = $this->DB->execute();
while($record = $this->DB->fetch($result))
{
if( $database['database_is_articles'] AND $record[ $_published ] > time() )
{
continue;
}
$record['_skipUpdateDynamic'] = true;
$url = $db->getRecordUrl($record);
$addedCount = $this->sitemap->addUrl($url, (int)$record['record_updated'], $this->settings['sitemap_priority_content_records']);
}
$limitCount += 100;
// If we've got back less rows than expected, we've probably got no more to pull:
if($this->DB->getTotalRows($result) < 100)
{
break;
}
}
}
}
}
@@ -0,0 +1,61 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_content_pages extends ipseoSitemapPlugin
{
public function generate()
{
if(!IPSLib::appIsInstalled('ccs'))
{
return;
}
$maxPages = 10000;
$curPages = 0;
while($curPages < $maxPages)
{
$permCheck = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'page_view_perms', true);
$this->DB->build(array(
'select' => '*',
'from' => 'ccs_pages',
'where' => "({$permCheck}) AND page_content_type = 'page'",
'order' => 'page_last_edited DESC',
'limit' => array($curPages, 100)));
$result = $this->DB->execute();
if($result)
{
// Add the resulting rows to the sitemap:
while($row = $this->DB->fetch($result))
{
if(!$this->registry->isClassLoaded('ccsFunctions'))
{
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('ccs') . '/sources/functions.php', 'ccsFunctions', 'ccs' );
$this->registry->setClass('ccsFunctions', new $classToLoad($this->registry));
}
$url = $this->registry->ccsFunctions->returnPageUrl($row);
$priority = ($row['page_folder'] == '' && $row['page_seo_name'] == $this->settings['ccs_default_page']) ? $this->settings['sitemap_priority_ccs_index'] : $this->settings['sitemap_priority_ccs_page'];
$this->sitemap->addURL($url, $row['page_last_edited'], $priority);
}
// If we've got back less rows than expected, we've probably got no more to pull:
$pulledRows = $this->DB->getTotalRows($result);
$curPages += $pulledRows;
if($pulledRows < 100)
{
break;
}
}
}
}
}
@@ -0,0 +1,17 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_core extends ipseoSitemapPlugin
{
public function generate()
{
if($this->settings['sitemap_priority_index'] > 0)
{
$this->sitemap->addURL($this->settings['board_url'] . '/', time(), $this->settings['sitemap_priority_index']);
}
}
}
@@ -0,0 +1,39 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_downloads_categories extends ipseoSitemapPlugin
{
public function generate()
{
if(!IPSLib::appIsInstalled('downloads') || $this->settings['sitemap_priority_downloads_categories'] == 0)
{
return;
}
// Get categories:
$permCheck = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p.perm_view', true);
$this->DB->build(array( 'select' => 'c.cid, c.cname_furl',
'from' => array('downloads_categories' => 'c'),
'add_join' => array( array(
'from' => array('permission_index' => 'p'),
'where' => "(p.app = 'downloads' AND p.perm_type = 'cat' AND p.perm_type_id = c.cid)",
'type' => 'left')),
'where' => "c.copen = 1 AND ({$permCheck})"));
$this->DB->execute();
// Add to sitemap:
while($cat = $this->DB->fetch())
{
$url = $this->settings['board_url'] . '/index.php?app=downloads&showcat=' . $cat['cid'];
$url = ipSeo_FURL::build($url, 'none', $cat['cname_furl'], 'idmshowcat');
//$url = ipsRegistry::getClass('output')->buildSEOUrl($url, 'none', $cat['cname_furl'], 'idmshowcat');
$this->sitemap->addURL($url, null, $this->settings['sitemap_priority_downloads_categories']);
}
}
}
@@ -0,0 +1,69 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_downloads_files extends ipseoSitemapPlugin
{
public function generate()
{
if(!IPSLib::appIsInstalled('downloads') || $this->settings['sitemap_priority_downloads_files'] == 0)
{
return;
}
$addedCount = 0;
$limitCount = 0;
while($addedCount < $this->settings['sitemap_count_downloads_files'])
{
if(ipSeo_SitemapGenerator::isCronJob())
{
sleep(0.5);
}
// Get files:
$permCheck = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p.perm_2', true );
$this->DB->build(array( 'select' => 'f.file_id, f.file_name_furl, f.file_updated',
'from' => array('downloads_files' => 'f'),
'add_join' => array(
array(
'from' => array('downloads_categories' => 'c'),
'where' => "c.cid = f.file_cat",
'type' => 'left'),
array(
'from' => array('permission_index' => 'p'),
'where' => "(p.app = 'downloads' AND p.perm_type = 'cat' AND p.perm_type_id = c.cid)",
'type' => 'left'),
),
'where' => "f.file_broken = 0 AND file_open = 1 AND c.copen = 1 AND ({$permCheck})",
'order' => 'f.file_updated DESC',
'limit' => array($limitCount, 100)));
$result = $this->DB->execute();
// Add blogs to sitemap:
while($file = $this->DB->fetch($result))
{
if ( ! $file['file_updated'] )
{
$file['file_updated'] = $file['file_submitted'];
}
$url = $this->settings['board_url'] . '/index.php?app=downloads&showfile=' . $file['file_id'];
$url = ipSeo_FURL::build($url, 'none', $file['file_name_furl'], 'idmshowfile');
//$url = ipsRegistry::getClass('output')->buildSEOUrl($url, 'none', $file['file_name_furl'], 'idmshowfile');
$addedCount = $this->sitemap->addURL($url, $file['file_updated'], $this->settings['sitemap_priority_downloads_files']);
}
$limitCount += 100;
// If we've got back less rows than expected, we've probably got no more to pull:
if($this->DB->getTotalRows($result) < 100)
{
break;
}
}
}
}
@@ -0,0 +1,49 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_forums extends ipseoSitemapPlugin
{
public function generate()
{
if($this->settings['sitemap_priority_forums'] == 0)
{
return;
}
// Get categories:
$permCheck = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p.perm_view', true);
$this->DB->build(array( 'select' => 'f.*',
'from' => array('forums' => 'f'),
'add_join' => array( array(
'from' => array('permission_index' => 'p'),
'where' => "(p.perm_type = 'forum' AND p.perm_type_id = f.id)",
'type' => 'left')),
'where' => $permCheck));
$result = $this->DB->execute();
if($result)
{
// Add the resulting rows to the sitemap:
while($row = $this->DB->fetch( $result ))
{
if ( $row['ipseo_priority'] == '0' )
{
continue;
}
$priority = ( $row['ipseo_priority'] == '' ) ? $this->settings['sitemap_priority_forums'] : $row['ipseo_priority'];
$url = $this->settings['board_url'] . '/index.php?showforum=' . $row['id'];
$url = ipSeo_FURL::build($url, 'none', $row['name_seo'], 'showforum');
//$url = ipsRegistry::getClass('output')->buildSEOUrl( $url, 'none', $row['name_seo'], 'showforum' );
$mod = intval($row['last_post']) == 0 ? time() : $row['last_post'];
$this->sitemap->addURL( $url, $mod, $priority );
}
}
}
}
@@ -0,0 +1,57 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_gallery_albums extends ipseoSitemapPlugin
{
public function generate()
{
$galleryClassFile = IPSLib::getAppDir('gallery') . '/sources/classes/gallery.php';
if(!IPSLib::appIsInstalled('gallery') || $this->settings['sitemap_priority_gallery_albums'] == 0 || !is_file($galleryClassFile))
{
return;
}
$classToLoad = IPSLib::loadLibrary( $galleryClassFile, 'ipsGallery', 'gallery' );
$this->registry->setClass( 'gallery', new $classToLoad( $this->registry ) );
$limitCount = 0;
while(1)
{
if(ipSeo_SitemapGenerator::isCronJob())
{
sleep(0.5);
}
$filters = array(
'sortOrder' => 'desc',
'sortKey' => 'date',
'offset' => $limitCount,
'limit' => 100,
'isViewable' => true,
'memberData' => array( 'member_id' => 0 )
);
$albums = $this->registry->gallery->helper('albums')->fetchAlbumsByFilters( $filters );
foreach($albums as $album)
{
$url = "{$this->settings['board_url']}/index.php?app=gallery&album={$album['album_id']}";
$url = ipSeo_FURL::build( $url, 'none', $album['album_name_seo'], 'viewalbum' );
$addedCount = $this->sitemap->addUrl( $url, $album['album_last_img_date'], $this->settings['sitemap_priority_gallery_albums'] );
}
$limitCount += 100;
if(count($albums) < 100)
{
break;
}
}
}
}
@@ -0,0 +1,69 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_gallery_images extends ipseoSitemapPlugin
{
public function generate()
{
$galleryClassFile = IPSLib::getAppDir('gallery') . '/sources/classes/gallery.php';
if(!IPSLib::appIsInstalled('gallery') || $this->settings['sitemap_priority_gallery_images'] == 0 || !is_file($galleryClassFile))
{
return;
}
$classToLoad = IPSLib::loadLibrary( $galleryClassFile, 'ipsGallery', 'gallery' );
$this->registry->setClass( 'gallery', new $classToLoad( $this->registry ) );
$max = $this->settings['sitemap_count_gallery_images'];
if(!ipSeo_SitemapGenerator::isCronJob() && ($max > 10000 || $max == -1))
{
$max = 10000;
}
elseif(ipSeo_SitemapGenerator::isCronJob() && $max == -1)
{
$max = 500000000;
}
$addedCount = 0;
$limitCount = 0;
while($addedCount < $max)
{
if(ipSeo_SitemapGenerator::isCronJob())
{
sleep(0.5);
}
$filters = array(
'sortOrder' => 'desc',
'sortKey' => 'date',
'offset' => $limitCount,
'limit' => 100,
'getLatestComment' => 1,
);
$memberId = 0;
$images = $this->registry->gallery->helper('image')->fetchImages( $memberId, $filters );
foreach($images as $image)
{
$url = "{$this->settings['board_url']}/index.php?app=gallery&image={$image['image_id']}";
$url = ipSeo_FURL::build( $url, 'none', $image['image_caption_seo'], 'viewimage' );
$lastMod = is_null($image['comment_post_date']) ? $image['image_date'] : $image['comment_post_date'];
$addedCount = $this->sitemap->addUrl($url, $lastMod, $this->settings['sitemap_priority_gallery_images']);
}
$limitCount += 100;
if(count($images) < 100)
{
break;
}
}
}
}
@@ -0,0 +1,32 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_nexus_categories extends ipseoSitemapPlugin
{
public function generate()
{
if(!IPSLib::appIsInstalled('nexus') || $this->settings['sitemap_priority_nexus_categories'] == 0)
{
return;
}
// Get categories:
$this->DB->build(array( 'select' => 'pg_id, pg_name, pg_seo_name',
'from' => 'nexus_package_groups',
) );
$this->DB->execute();
// Add to sitemap:
while( $row = $this->DB->fetch() )
{
$url = $this->settings['board_url'] . '/index.php?app=nexus&module=payments&cat=' . $row['pg_id'];
$url = ipSeo_FURL::build( $url, 'none', $row['pg_seo_name'], 'storecat' );
$this->sitemap->addURL( $url, null, $this->settings['sitemap_priority_nexus_categories'] );
}
}
}
@@ -0,0 +1,33 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_nexus_products extends ipseoSitemapPlugin
{
public function generate()
{
if(!IPSLib::appIsInstalled('nexus') || $this->settings['sitemap_priority_nexus_products'] == 0)
{
return;
}
// Get categories:
$this->DB->build(array( 'select' => 'p_id, p_name, p_seo_name',
'from' => 'nexus_packages',
'where' => 'p_store=1 AND ' . $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p_member_groups' ),
) );
$this->DB->execute();
// Add to sitemap:
while( $row = $this->DB->fetch() )
{
$url = $this->settings['board_url'] . '/index.php?app=nexus&module=payments&section=store&do=item&id=' . $row['p_id'];
$url = ipSeo_FURL::build( $url, 'none', $row['p_seo_name'], 'storeitem' );
$this->sitemap->addURL( $url, null, $this->settings['sitemap_priority_nexus_products'] );
}
}
}
@@ -0,0 +1,194 @@
<?php
if(!IN_IPB)
{
die('This file is not designed to be accessed directly.');
}
class sitemap_core_topics extends ipseoSitemapPlugin
{
public function generate()
{
if($this->settings['sitemap_priority_topics'] == 0)
{
return;
}
$maxTopics = (int)ipsRegistry::$settings['sitemap_recent_topics'];
if(!ipSeo_SitemapGenerator::isCronJob() && ($maxTopics > 10000 || $maxTopics == -1))
{
$maxTopics = 10000;
}
elseif(ipSeo_SitemapGenerator::isCronJob() && $maxTopics == -1)
{
$maxTopics = 50000000;
}
$curTopics = 0;
$limitTopics = 0;
if(ipSeo_SitemapGenerator::isCronJob())
{
//print 'Done: ';
}
while($curTopics < $maxTopics)
{
if(ipSeo_SitemapGenerator::isCronJob())
{
//print $curTopics . ', ';
sleep(0.5);
}
$permCheck = $this->DB->buildWherePermission( array( $this->caches['group_cache'][ $this->settings['guest_group'] ]['g_perm_id'] ), 'p.perm_2', true);
$this->DB->build( array(
'select' => 't.*, f.ipseo_priority',
'from' => array( 'topics' => 't' ),
'add_join' => array(
array(
'from' => array( 'permission_index' => 'p' ),
'where' => "(p.perm_type = 'forum' AND p.perm_type_id = t.forum_id)",
'type' => 'left'
),
array(
'from' => array( 'forums' => 'f' ),
'where' => "f.id=t.forum_id",
'type' => 'left'
),
),
'where' => "{$permCheck} AND " . $this->registry->getClass('class_forums')->fetchTopicHiddenQuery( array( 'visible' ), '' ),
'limit' => array( $limitTopics, 100 )
) );
$result = $this->DB->execute();
if($result)
{
/*$_one = 0;
$_two = 0;
$_three = 0;*/
// Add the resulting rows to the sitemap:
while($row = $this->DB->fetch($result))
{
if ( $row['ipseo_priority'] == '0' )
{
continue;
}
if(!$this->settings['sitemap_topic_pages'] || $row['posts'] <= $this->settings['display_max_posts'])
{
$url = $this->settings['board_url'] . '/index.php?showtopic=' . $row['tid'];
$url = ipSeo_FURL::build($url, 'none', $row['title_seo'], 'showtopic');
//$url = ipsRegistry::getClass('output')->buildSEOUrl($url, 'none', $row['title_seo'], 'showtopic');
if($this->settings['sitemap_priority_topics'] == 100)
{
$priority = $this->calculatePriority($row);
}
else
{
$priority = $this->settings['sitemap_priority_topics'];
}
$curTopics = $this->sitemap->addURL($url, $row['last_post'], $priority);
}
else
{
$j = 1;
for($i = 0; $i <= $row['posts']; $i += $this->settings['display_max_posts'])
{
$url = $this->settings['board_url'] . '/index.php?showtopic=' . $row['tid'] . ( ( $j == 1 ) ? '' : '&page=' . $j );
$url = ipSeo_FURL::build($url, 'none', $row['title_seo'], 'showtopic');
//$url = ipsRegistry::getClass('output')->buildSEOUrl($url, 'none', $row['title_seo'], 'showtopic');
if($this->settings['sitemap_priority_topics'] == 100)
{
$priority = $this->calculatePriority($row, true);
}
else
{
$priority = $this->settings['sitemap_priority_topics'];
}
$curTopics = $this->sitemap->addURL($url, $row['last_post'], $priority);
$j++;
}
}
/*$_one += $one;
$_two += $two;
$_three += $three;*/
}
$limitTopics += 100;
// If we've got back less rows than expected, we've probably got no more to pull:
if($this->DB->getTotalRows($result) < 100)
{
break;
}
}
}
if(ipSeo_SitemapGenerator::isCronJob())
{
//print PHP_EOL;
}
}
protected function calculatePriority($topic, $subPage = false)
{
$priority = $subPage ? 0.4 : 0.6;
// Modify if forum has a special setting
if ( $topic['ipseo_priority'] != '' )
{
$priority += ( $topic['ipseo_priority'] - $priority );
}
// Boost topics where start date is today:
if($topic['start_date'] > (time() - 86400))
{
$priority = $priority + 0.1;
}
// Drop closed topics, but only if not pinned.
if(!$topic['pinned'] && $topic['state'] != 'open')
{
$priority = $priority - 0.2;
}
// Boost pinned topics:
if($topic['pinned'])
{
$priority = $priority + 0.1;
}
// Boost topics with more than one page of posts:
if($topic['posts'] > $this->settings['display_max_posts'])
{
$priority = $priority + 0.1;
}
// Extra boost for topics with more than ten pages of posts:
if($topic['posts'] > ($this->settings['display_max_posts'] * 10))
{
$priority = $priority + 0.2;
}
if($priority > 1)
{
$priority = 1.0;
}
elseif($priority < 0)
{
$priority = 0.0;
}
return $priority;
}
}
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Sphinx template file * Sphinx template file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @package IP.Board * @package IP.Board
* @subpackage Forums * @subpackage Forums
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Rev: 10914 $ * @version $Rev: 10721 $
* @since 3.0.0 * @since 3.0.0
* *
*/ */
@@ -74,7 +74,7 @@ index <!--SPHINX_CONF_PREFIX-->core_tags_search_main
mlock = 0 mlock = 0
morphology = none morphology = none
min_word_len = 2 min_word_len = 2
charset_type = sbcs charset_type = utf-8
html_strip = 0 html_strip = 0
#infix_fields = tag_text #infix_fields = tag_text
#min_infix_len = 3 #min_infix_len = 3
@@ -3,19 +3,19 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Core user control panel plugin * Core user control panel plugin
* Last Updated: $Date: 2012-06-13 14:36:10 -0400 (Wed, 13 Jun 2012) $ * Last Updated: $Date: 2013-05-02 17:05:35 -0400 (Thu, 02 May 2013) $
* </pre> * </pre>
* *
* @author $Author: AndyMillne $ * @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license * @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 20th February 2002 * @since 20th February 2002
* @version $Rev: 10917 $ * @version $Rev: 12216 $
* *
*/ */
@@ -34,7 +34,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
* *
* @var string * @var string
*/ */
public $tab_name = "Settings"; public $tab_name = "Настройки";
/** /**
* Default area code * Default area code
@@ -96,6 +96,11 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
{ {
$this->_isFBUser = true; $this->_isFBUser = true;
} }
if( !$this->memberData['g_edit_profile'] )
{
$this->defaultAreaCode = 'email';
}
} }
/** /**
@@ -116,11 +121,14 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
$array = array(); $array = array();
$array[] = array( 'url' => 'area=profileinfo', if( $this->memberData['g_edit_profile'] )
'title' => ipsRegistry::instance()->getClass('class_localization')->words['change_settings'], {
'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'profileinfo' ? 1 : 0, $array[] = array( 'url' => 'area=profileinfo',
'area' => 'profileinfo' 'title' => ipsRegistry::instance()->getClass('class_localization')->words['change_settings'],
); 'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'profileinfo' ? 1 : 0,
'area' => 'profileinfo'
);
}
if ( $this->memberData['gbw_allow_customization'] AND ! $this->memberData['bw_disable_customization'] ) if ( $this->memberData['gbw_allow_customization'] AND ! $this->memberData['bw_disable_customization'] )
{ {
@@ -148,7 +156,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
$sig_restrictions = explode( ':', $this->memberData['g_signature_limits'] ); $sig_restrictions = explode( ':', $this->memberData['g_signature_limits'] );
if ( ! $sig_restrictions[0] OR ( $sig_restrictions[0] AND $this->memberData['g_sig_unit'] ) ) if ( ( ! $sig_restrictions[0] OR ( $sig_restrictions[0] AND $this->memberData['g_sig_unit'] ) ) AND $this->memberData['g_edit_profile'] )
{ {
$array[] = array( 'url' => 'area=signature', $array[] = array( 'url' => 'area=signature',
'title' => ipsRegistry::instance()->getClass('class_localization')->words['m_sig_info'], 'title' => ipsRegistry::instance()->getClass('class_localization')->words['m_sig_info'],
@@ -181,6 +189,15 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
); );
} }
if ( IPSLib::vkontakte_enabled() === TRUE )
{
$array[] = array( 'url' => 'area=vkontakte',
'title' => ipsRegistry::instance()->getClass('class_localization')->words['m_vkontakte'],
'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'vkontakte' ? 1 : 0,
'area' => 'vkontakte'
);
}
if ( $this->memberData['g_attach_max'] != -1 ) if ( $this->memberData['g_attach_max'] != -1 )
{ {
$array[] = array( $array[] = array(
@@ -248,6 +265,9 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
case 'facebookRemove': case 'facebookRemove':
$html = $this->customEvent_facebookRemove(); $html = $this->customEvent_facebookRemove();
break; break;
case 'vkontakteRemove':
$html = $this->customEvent_vkontakteRemove();
break;
case 'twitterRemove': case 'twitterRemove':
$html = $this->customEvent_twitterRemove(); $html = $this->customEvent_twitterRemove();
break; break;
@@ -603,6 +623,39 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
$this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=global&section=login&do=logout&k=" . $this->member->form_hash ); $this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=global&section=login&do=logout&k=" . $this->member->form_hash );
} }
/**
* Custom Event: Remove vk link
*
* @return @e void
*/
public function customEvent_vkontakteRemove()
{
//-----------------------------------------
// Check secure hash...
//-----------------------------------------
if ( $this->request['secure_key'] != $this->member->form_hash )
{
$this->registry->output->showError( 'authorization_error', 100, true, null, 403 );
}
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/vkontakte/connect.php', 'vkontakte_connect' );
$vkontakte = new $classToLoad( $this->registry );
//-----------------------------------------
// Okay...
//-----------------------------------------
if ( $this->memberData['vk_uid'] )
{
/* Remove the link */
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'vk_uid' => 0, 'vk_token' => '' ) ) );
}
/* Log the user out */
$this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=global&section=login&do=logout&k=" . $this->member->form_hash );
}
/** /**
* Custom Event: Create facebook link * Custom Event: Create facebook link
* *
@@ -779,7 +832,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
// Return // Return
//----------------------------------------- //-----------------------------------------
$this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&amp;module=usercp&amp;tab=core&amp;area=ignoredusers&amp;do=show" ); $this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&amp;module=usercp&amp;tab=core&amp;area=ignoredusers&amp;do=show&amp;st={$this->request['st']}" );
} }
/** /**
@@ -818,6 +871,11 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
// Where to go, what to see? // Where to go, what to see?
//----------------------------------------- //-----------------------------------------
if( !$current_area AND !$this->memberData['g_edit_profile'] )
{
$current_area = 'email';
}
switch( $current_area ) switch( $current_area )
{ {
default: default:
@@ -839,6 +897,9 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
case 'twitter': case 'twitter':
return $this->formTwitter(); return $this->formTwitter();
break; break;
case 'vkontakte':
return $this->formVkontakte();
break;
case 'customize': case 'customize':
return $this->formCustomize(); return $this->formCustomize();
break; break;
@@ -878,7 +939,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
} }
/* Grab current options */ /* Grab current options */
$options = unserialize( $this->memberData['pp_customization'] ); $options = IPSLib::safeUnserialize( $this->memberData['pp_customization'] );
$options = is_array( $options ) ? $options : array(); $options = is_array( $options ) ? $options : array();
/* Build input */ /* Build input */
@@ -902,6 +963,64 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
return $this->registry->getClass('output')->getTemplate('ucp')->membersProfileCustomize( $options, $input, $inlineMsg ); return $this->registry->getClass('output')->getTemplate('ucp')->membersProfileCustomize( $options, $input, $inlineMsg );
} }
/**
* Show the vkontakte form
*
* @author Matt Mecham
* @param string Any inline message to show
* @return string Processed HTML
*/
public function formVkontakte( $inlineMsg='' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
if( !IPSLib::vkontakte_enabled() )
{
$this->registry->getClass('output')->showError( 'twitter_disabled', 1005.1 );
}
//-----------------------------------------
// Twitter user logged in?
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/vkontakte/connect.php', 'vkontakte_connect' );
$vkontakte = new $classToLoad( $this->registry, $this->memberData['vk_token'], $this->memberData['vk_uid'] );
//-----------------------------------------
// Thaw bitfield options
//-----------------------------------------
$bwOptions = IPSBWOptions::thaw( $this->memberData['vk_bwoptions'], 'vkontakte' );
//-----------------------------------------
// Merge..
//-----------------------------------------
if ( is_array( $bwOptions ) )
{
foreach( $bwOptions as $k => $v )
{
$this->memberData[ $k ] = $v;
}
}
$this->hide_form_and_save_button = 1;
$userData = $vkontakte->fetchUserData();
if ( isset( $userData['status']['text'] ) )
{
if ( IPS_DOC_CHAR_SET != 'UTF-8' )
{
$userData['status']['text'] = IPSText::utf8ToEntities( $userData['status']['text'] );
}
}
return $this->registry->getClass('output')->getTemplate('vkontakte')->membersVkontakteConnect( $this->memberData['vk_uid'], $userData );
}
/** /**
* Show the twitter form * Show the twitter form
* *
@@ -1176,6 +1295,9 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' ); $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' );
$this->editor = new $classToLoad(); $this->editor = new $classToLoad();
/* HTML checkbox language strings */
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_post' ), 'forums' );
//----------------------------------------- //-----------------------------------------
// Check to make sure that we can edit profiles.. // Check to make sure that we can edit profiles..
//----------------------------------------- //-----------------------------------------
@@ -1223,23 +1345,27 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
$t_sig = ''; $t_sig = '';
/* Set content in editor */ /* Set content in editor */
$this->editor->setLegacyMode(false);
$this->editor->setAllowBbcode( true ); $this->editor->setAllowBbcode( true );
$this->editor->setAllowSmilies( false ); $this->editor->setAllowSmilies( true );
$this->editor->setAllowHtml( $this->memberData['g_dohtml'] ); $this->editor->setAllowHtml( $this->memberData['g_dohtml'] );
$this->editor->setContent( $this->memberData['signature'], 'signatures' ); $this->editor->setIsHtml( $this->memberData['bw_html_sig'] );
$this->editor->setBbcodeSection('signatures');
$this->editor->setContent( $this->memberData['signature'] );
/* Current signature preview */ /* Load parser */
IPSText::getTextClass('bbcode')->parse_bbcode = 1; $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser' );
IPSText::getTextClass('bbcode')->parse_smilies = 0; $parser = new $classToLoad();
IPSText::getTextClass('bbcode')->parse_html = $this->memberData['g_dohtml'];
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'signatures';
IPSText::getTextClass('bbcode')->parsing_mgroup = $this->memberData['member_group_id'];
IPSText::getTextClass('bbcode')->parsing_mgroup_others = $this->memberData['mgroup_others'];
$signature = IPSText::getTextClass('bbcode')->preDisplayParse( $this->memberData['signature'] ); $parser->set( array( 'memberData' => $this->memberData,
'parseBBCode' => 1,
'parseHtml' => ( $this->memberData['g_dohtml'] && $this->memberData['bw_html_sig'] ),
'parseArea' => 'signatures',
'parseEmoticons' => 1 ) );
return $this->registry->getClass('output')->getTemplate('ucp')->membersSignatureForm( $this->editor->show( 'Post', array( 'noSmilies' => true ) ), $sig_restrictions, $signature ); $signature = $parser->display( $this->memberData['signature'] );
return $this->registry->getClass('output')->getTemplate('ucp')->membersSignatureForm( $this->editor->show( 'Post', array( 'noSmilies' => false ) ), $sig_restrictions, $signature );
} }
@@ -1706,11 +1832,21 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
$cache = $this->cache->getCache('attachtypes'); $cache = $this->cache->getCache('attachtypes');
/* Load topic class */
if ( ! $this->registry->isClassLoaded('topics') )
{
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/topics.php", 'app_forums_classes_topics', 'forums' );
$this->registry->setClass( 'topics', new $classToLoad( $this->registry ) );
}
while ( $row = $this->DB->fetch( $outer ) ) while ( $row = $this->DB->fetch( $outer ) )
{ {
if ( IPSMember::checkPermissions('read', $row['forum_id'] ) != TRUE ) $row['_link'] = true;
if ( ! $this->registry->topics->canView( $row ) )
{ {
$row['title'] = $this->lang->words['attach_topicmoved']; $row['title'] = $this->lang->words['attach_topicmoved'];
$row['_link'] = false;
} }
//----------------------------------------- //-----------------------------------------
@@ -1963,7 +2099,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
$bg_color = trim( str_replace( '#', '', $this->request['bg_color'] ) ); $bg_color = trim( str_replace( '#', '', $this->request['bg_color'] ) );
/* reset custom */ /* reset custom */
$custom = unserialize( $this->memberData['pp_customization'] ); $custom = IPSLib::safeUnserialize( $this->memberData['pp_customization'] );
/* Bug #21578 */ /* Bug #21578 */
if( ! $bg_color && $custom['bg_color'] ) if( ! $bg_color && $custom['bg_color'] )
@@ -2010,7 +2146,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
if ( $img['status'] == 'fail' ) if ( $img['status'] == 'fail' )
{ {
return array( 0 => $this->lang->words[ 'pp_' . $img['error'] ] ); return array( 0 => sprintf( $this->lang->words[ 'pp_' . $img['error'] ], $img['maxSize'] ) );
} }
else if ( $img['final_location'] ) else if ( $img['final_location'] )
{ {
@@ -2029,7 +2165,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
/* Save it */ /* Save it */
if ( ! $this->memberData['bw_disable_customization'] AND $this->memberData['gbw_allow_customization'] ) if ( ! $this->memberData['bw_disable_customization'] AND $this->memberData['gbw_allow_customization'] )
{ {
IPSMember::save( $this->memberData['member_id'], array( 'extendedProfile' => array( 'pp_customization' => serialize( $custom ) ) ) ); IPSMember::save( $this->memberData['member_id'], array( 'extendedProfile' => array( 'pp_profile_update' => IPS_UNIX_TIME_NOW, 'pp_customization' => serialize( $custom ) ) ) );
} }
return TRUE; return TRUE;
@@ -2237,6 +2373,9 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
/* Load editor stuff */ /* Load editor stuff */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' ); $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' );
$this->editor = new $classToLoad(); $this->editor = new $classToLoad();
$this->editor->setLegacyMode(false);
$isHtml = intval( $this->request['sig_htmlstatus'] );
//----------------------------------------- //-----------------------------------------
// Check to make sure that we can edit profiles.. // Check to make sure that we can edit profiles..
@@ -2254,26 +2393,31 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
// Now we have safe HTML and bbcode // Now we have safe HTML and bbcode
//----------------------------------------- //-----------------------------------------
/* Set content in editor */
$this->editor->setAllowBbcode( true );
$this->editor->setAllowSmilies( true );
$this->editor->setIsHtml( $this->memberData['g_dohtml'] && $isHtml );
$this->editor->setBbcodeSection('signatures');
$this->editor->setContent( $this->memberData['signature'] );
$signature = $this->editor->process( $_POST['Post'] ); $signature = $this->editor->process( $_POST['Post'] );
//----------------------------------------- //-----------------------------------------
// Parse post // Parse post
//----------------------------------------- //-----------------------------------------
IPSText::getTextClass( 'bbcode' )->parse_smilies = 0; /* Load parser */
IPSText::getTextClass( 'bbcode' )->parse_html = $this->memberData['g_dohtml']; $classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser' );
IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1; $parser = new $classToLoad();
IPSText::getTextClass( 'bbcode' )->parsing_section = 'signatures';
$signature = IPSText::getTextClass('bbcode')->preDbParse( $signature ); $parser->testForParsingLimits( $signature, array( 'quote', 'emoticons', 'urls' ) );
$testSignature = IPSText::getTextClass('bbcode')->preDisplayParse( $signature ); if ( is_array( $parser->getErrors() ) && count( $parser->getErrors() ) )
if ( IPSText::getTextClass( 'bbcode' )->error )
{ {
$this->lang->loadLanguageFile( array( 'public_post' ), 'forums' ); $this->lang->loadLanguageFile( array( 'public_post' ), 'forums' );
$this->registry->getClass('output')->showError( IPSText::getTextClass( 'bbcode' )->error, 10210 ); $_error = array_pop( $parser->getErrors() );
$this->registry->getClass('output')->showError( $_error, 10210 );
} }
//----------------------------------------- //-----------------------------------------
@@ -2288,7 +2432,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
if( isset($sig_restrictions[1]) and $sig_restrictions[1] !== '' ) if( isset($sig_restrictions[1]) and $sig_restrictions[1] !== '' )
{ {
if( substr_count( strtolower($signature), "[img]" ) > $sig_restrictions[1] ) if( $parser->getImageCount( $signature ) > $sig_restrictions[1] )
{ {
$sig_errors[] = sprintf( $this->lang->words['sig_toomanyimages'], $sig_restrictions[1] ); $sig_errors[] = sprintf( $this->lang->words['sig_toomanyimages'], $sig_restrictions[1] );
} }
@@ -2300,7 +2444,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
if( isset($sig_restrictions[4]) and $sig_restrictions[4] !== '' ) if( isset($sig_restrictions[4]) and $sig_restrictions[4] !== '' )
{ {
if( substr_count( strtolower($signature), "[url" ) > $sig_restrictions[4] ) if( $parser->getUrlCount( $signature ) > $sig_restrictions[4] )
{ {
$sig_errors[] = sprintf( $this->lang->words['sig_toomanyurls'], $sig_restrictions[4] ); $sig_errors[] = sprintf( $this->lang->words['sig_toomanyurls'], $sig_restrictions[4] );
} }
@@ -2315,21 +2459,24 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
} }
} }
$this->settings['signature_line_length'] = $this->settings['signature_line_length'] > 0 ? $this->settings['signature_line_length'] : 200;
/* You can't wordwrap on HTML http://community.invisionpower.com/resources/bugs.html/_/ip-board/signature-url-bbcode-r41254 */
//$signature = wordwrap( $signature, $this->settings['signature_line_length'], '</p>', true );
// http://community.invisionpower.com/tracker/issue-35105-signature-restriction-minor-bug
$signature = preg_replace( '#^\s*(</p>)+#i', '', $signature );
$signature = preg_replace( '#(</p>)+?\s*$#i', '', $signature );
//----------------------------------------- //-----------------------------------------
// Max number of lines of text... // Max number of lines of text...
//----------------------------------------- //-----------------------------------------
if( isset($sig_restrictions[5]) and $sig_restrictions[5] !== '' ) if( isset($sig_restrictions[5]) and $sig_restrictions[5] !== '' )
{ {
$this->settings['signature_line_length'] = $this->settings['signature_line_length'] > 0 ? $this->settings['signature_line_length'] : 200; $lineCount = substr_count( $signature, "</p>" ) + substr_count( $signature, "br>" );
$testSig = wordwrap( $signature, $this->settings['signature_line_length'], '<br />' ); if( $lineCount >= $sig_restrictions[5] )
// http://community.invisionpower.com/tracker/issue-35105-signature-restriction-minor-bug
$testSig = preg_replace( '#^\s*(<br />)+#i', '', $testSig );
$testSig = preg_replace( '#(<br />)+?\s*$#i', '', $testSig );
if( substr_count( $testSig, "<br />" ) >= $sig_restrictions[5] )
{ {
$sig_errors[] = sprintf( $this->lang->words['sig_toomanylines'], $sig_restrictions[5] ); $sig_errors[] = sprintf( $this->lang->words['sig_toomanylines'], $sig_restrictions[5] );
} }
@@ -2341,21 +2488,26 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
if( isset($sig_restrictions[2]) and $sig_restrictions[2] !== '' AND isset($sig_restrictions[3]) and $sig_restrictions[3] !== '' ) if( isset($sig_restrictions[2]) and $sig_restrictions[2] !== '' AND isset($sig_restrictions[3]) and $sig_restrictions[3] !== '' )
{ {
preg_match_all( '/\[img\](.+?)\[\/img\]/i', $signature, $allImages ); preg_match_all( '/\<img([^>]+?)>/i', $signature, $allImages );
if( count($allImages[1]) ) if( count($allImages[1]) )
{ {
foreach( $allImages[1] as $foundImage ) foreach( $allImages[1] as $foundImage )
{ {
$imageProperties = @getimagesize( $foundImage ); preg_match( '#src=[\'"]([^\'"]+?)[\'"]#i', $foundImage, $url );
$imageProperties = @getimagesize( $url[1] );
if( is_array($imageProperties) AND count($imageProperties) ) if( is_array($imageProperties) AND count($imageProperties) )
{ {
if( $imageProperties[0] > $sig_restrictions[2] OR $imageProperties[1] > $sig_restrictions[3] ) if( $imageProperties[0] > $sig_restrictions[2] OR $imageProperties[1] > $sig_restrictions[3] )
{ {
$sig_errors[] = sprintf( $this->lang->words['sig_imagetoobig'], $foundImage, $sig_restrictions[2], $sig_restrictions[3] ); $sig_errors[] = sprintf( $this->lang->words['sig_imagetoobig'], $url[1], $sig_restrictions[2], $sig_restrictions[3] );
} }
} }
else
{
$sig_errors[] = $this->lang->words['sig_imagenotretrievable'];
}
} }
} }
} }
@@ -2365,14 +2517,18 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
$this->registry->getClass('output')->showError( implode( '<br />', $sig_errors ), 10211 ); $this->registry->getClass('output')->showError( implode( '<br />', $sig_errors ), 10211 );
} }
/* Save HTML status */
$members_bitoptions = IPSBWOptions::thaw( $this->memberData['members_bitoptions'], 'members', 'global' );
$members_bitoptions['bw_html_sig'] = $isHtml;
//----------------------------------------- //-----------------------------------------
// Write it to the DB. // Write it to the DB.
//----------------------------------------- //-----------------------------------------
IPSMember::save( $this->memberData['member_id'], array( 'extendedProfile' => array( 'signature' => $signature ) ) ); IPSMember::save( $this->memberData['member_id'], array( 'members' => $members_bitoptions, 'extendedProfile' => array( 'signature' => $signature ) ) );
/* Update cache */ /* Update cache */
IPSContentCache::update( $this->memberData['member_id'], 'sig', $testSignature ); IPSContentCache::update( $this->memberData['member_id'], 'sig', $parser->display( $signature ) );
return TRUE; return TRUE;
} }
@@ -2386,8 +2542,12 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
public function saveProfileInfo() public function saveProfileInfo()
{ {
/* Load editor stuff */ /* Load editor stuff */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' ); if( $this->request['updateAboutMe'] )
$this->editor = new $classToLoad(); {
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' );
$this->editor = new $classToLoad();
$this->editor->setLegacyMode(false);
}
//----------------------------------------- //-----------------------------------------
// INIT // INIT
@@ -2462,7 +2622,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
// and if one is entered, update it. // and if one is entered, update it.
//----------------------------------------- //-----------------------------------------
if( isset( $this->request['member_title'] ) and ( $this->settings['post_titlechange'] ) and ( $this->memberData['posts'] >= $this->settings['post_titlechange']) ) if( isset( $this->request['member_title'] ) and ( $this->settings['post_titlechange'] == -1 or ( $this->settings['post_titlechange'] and $this->memberData['posts'] >= $this->settings['post_titlechange'] ) ) )
{ {
$core['title'] = IPSText::getTextClass('bbcode')->stripBadWords( $this->request['member_title'] ); $core['title'] = IPSText::getTextClass('bbcode')->stripBadWords( $this->request['member_title'] );
} }
@@ -2516,7 +2676,10 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
} }
/* About me */ /* About me */
$extendedProfile['pp_about_me'] = $this->editor->process( $_POST['Post'] ); if( $this->request['updateAboutMe'] )
{
$extendedProfile['pp_about_me'] = $this->editor->process( $_POST['Post'] );
}
/* Open ID & times*/ /* Open ID & times*/
$timeZone = IPSText::alphanumericalClean( $this->request['timeZone'], '+.' ); $timeZone = IPSText::alphanumericalClean( $this->request['timeZone'], '+.' );
@@ -2524,7 +2687,11 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
/* Add into array */ /* Add into array */
$core['time_offset'] = $timeZone; $core['time_offset'] = $timeZone;
$core['dst_in_use'] = $this->settings['time_dst_auto_correction'] ? ( ( $this->request['dstOption'] AND intval($this->request['dstCheck']) == 0 ) ? intval($this->request['dstOption']) : 0 ) : $this->memberData['dst_in_use'];
/* http://community.invisionpower.com/resources/bugs.html/_/ip-board/cannot-uncheck-my-timezone-is-currently-in-dst-checkbox-in-profile-r41510 */
//$core['dst_in_use'] = $this->settings['time_dst_auto_correction'] ? ( ( $this->request['dstOption'] AND intval($this->request['dstCheck']) == 0 ) ? intval($this->request['dstOption']) : 0 ) : $this->memberData['dst_in_use'];
$core['dst_in_use'] = $this->settings['time_dst_auto_correction'] ? ( ( $this->request['dstOption'] AND intval($this->request['dstCheck']) == 0 ) ? intval($this->request['dstOption']) : 0 ) : intval($this->request['dstOption']);
$core['members_auto_dst'] = $this->settings['time_dst_auto_correction'] ? intval($this->request['dstCheck']) : $this->memberData['members_auto_dst']; $core['members_auto_dst'] = $this->settings['time_dst_auto_correction'] ? intval($this->request['dstCheck']) : $this->memberData['members_auto_dst'];
//----------------------------------------- //-----------------------------------------
@@ -2716,7 +2883,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
// Update the DB // Update the DB
//----------------------------------------- //-----------------------------------------
IPSMember::updatePassword( $this->memberData['email'], $md5_pass ); IPSMember::updatePassword( $this->memberData['member_id'], $md5_pass );
IPSLib::runMemberSync( 'onPassChange', $this->memberData['member_id'], $new_pass ); IPSLib::runMemberSync( 'onPassChange', $this->memberData['member_id'], $new_pass );
@@ -2834,6 +3001,82 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
$chk_pass = trim($this->request['new_pass_2']); $chk_pass = trim($this->request['new_pass_2']);
$isRemote = ( ! $this->memberData['bw_local_password_set'] AND $this->memberData['members_created_remote'] ) ? true : false; $isRemote = ( ! $this->memberData['bw_local_password_set'] AND $this->memberData['members_created_remote'] ) ? true : false;
if ( $cur_pass OR $new_pass )
{
if( $this->memberData['g_access_cp'] )
{
return array( 0 => $this->lang->words['admin_emailpassword'] );
}
if ( $isRemote === false AND ( ! $_POST['current_pass'] OR ( empty($new_pass) ) or ( empty($chk_pass) ) ) )
{
return array( 0 => $this->lang->words['complete_entire_form'] );
}
//-----------------------------------------
// Do the passwords actually match?
//-----------------------------------------
if ( $new_pass != $chk_pass )
{
return array( 0 => $this->lang->words['passwords_not_matchy'] );
}
//-----------------------------------------
// Check password...
//-----------------------------------------
if ( $isRemote === false )
{
if ( $this->_checkPassword( $cur_pass ) !== TRUE )
{
return array( 0 => $this->lang->words['current_pw_bad'] );
}
}
else
{
/* This is INIT in _checkPassword */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$this->han_login = new $classToLoad( $this->registry );
$this->han_login->init();
}
//-----------------------------------------
// Create new password...
//-----------------------------------------
$md5_pass = md5($new_pass);
//-----------------------------------------
// han_login was loaded during check_password
//-----------------------------------------
$this->han_login->changePass( $this->memberData['email'], $md5_pass, $new_pass, $this->memberData );
if ( $this->han_login->return_code AND $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' )
{
return array( 0 => $this->lang->words['hanlogin_pw_failed'] );
}
//-----------------------------------------
// Update the DB
//-----------------------------------------
IPSMember::updatePassword( $this->memberData['email'], $md5_pass );
IPSLib::runMemberSync( 'onPassChange', $this->memberData['member_id'], $new_pass );
//-----------------------------------------
// Update members log in key...
//-----------------------------------------
$key = IPSMember::generateAutoLoginKey();
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'member_login_key' => $key, 'bw_local_password_set' => 1 ) ) );
$this->ok_message = $this->lang->words['pw_change_successful'];
}
if ( $_emailOne or $_emailTwo ) if ( $_emailOne or $_emailTwo )
{ {
//----------------------------------------- //-----------------------------------------
@@ -3021,9 +3264,9 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
IPSText::getTextClass( 'email' )->buildMessage( array( IPSText::getTextClass( 'email' )->buildMessage( array(
'NAME' => $this->memberData['members_display_name'], 'NAME' => $this->memberData['members_display_name'],
'THE_LINK' => $this->settings['base_url']."app=core&module=global&section=register&do=auto_validate&type=newemail&uid=".$this->memberData['member_id']."&aid=".$validate_key, 'THE_LINK' => $this->registry->getClass('output')->buildSEOUrl("app=core&module=global&section=register&do=auto_validate&type=newemail&uid=".$this->memberData['member_id']."&aid=".$validate_key, 'publicNoSession', 'false' ),
'ID' => $this->memberData['member_id'], 'ID' => $this->memberData['member_id'],
'MAN_LINK' => $this->settings['base_url']."app=core&module=global&section=register&do=07", 'MAN_LINK' => $this->registry->getClass('output')->buildSEOUrl("app=core&module=global&section=register&do=07", 'publicNoSession', 'false'),
'CODE' => $validate_key, 'CODE' => $validate_key,
) ); ) );
@@ -3051,81 +3294,6 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
$this->ok_message = $this->lang->words['ok_email_changed']; $this->ok_message = $this->lang->words['ok_email_changed'];
} }
} }
else if ( $cur_pass OR $new_pass )
{
if( $this->memberData['g_access_cp'] )
{
return array( 0 => $this->lang->words['admin_emailpassword'] );
}
if ( $isRemote === false AND ( ! $_POST['current_pass'] OR ( empty($new_pass) ) or ( empty($chk_pass) ) ) )
{
return array( 0 => $this->lang->words['complete_entire_form'] );
}
//-----------------------------------------
// Do the passwords actually match?
//-----------------------------------------
if ( $new_pass != $chk_pass )
{
return array( 0 => $this->lang->words['passwords_not_matchy'] );
}
//-----------------------------------------
// Check password...
//-----------------------------------------
if ( $isRemote === false )
{
if ( $this->_checkPassword( $cur_pass ) !== TRUE )
{
return array( 0 => $this->lang->words['current_pw_bad'] );
}
}
else
{
/* This is INIT in _checkPassword */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$this->han_login = new $classToLoad( $this->registry );
$this->han_login->init();
}
//-----------------------------------------
// Create new password...
//-----------------------------------------
$md5_pass = md5($new_pass);
//-----------------------------------------
// han_login was loaded during check_password
//-----------------------------------------
$this->han_login->changePass( $this->memberData['email'], $md5_pass, $new_pass, $this->memberData );
if ( $this->han_login->return_code AND $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' )
{
return array( 0 => $this->lang->words['hanlogin_pw_failed'] );
}
//-----------------------------------------
// Update the DB
//-----------------------------------------
IPSMember::updatePassword( $this->memberData['email'], $md5_pass );
IPSLib::runMemberSync( 'onPassChange', $this->memberData['member_id'], $new_pass );
//-----------------------------------------
// Update members log in key...
//-----------------------------------------
$key = IPSMember::generateAutoLoginKey();
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'member_login_key' => $key, 'bw_local_password_set' => 1 ) ) );
$this->ok_message = $this->lang->words['pw_change_successful'];
}
return TRUE; return TRUE;
} }
@@ -6,9 +6,9 @@
* $License: http://www.invisionpower.com/company/standards.php#license$ * $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $ (Original: Mark) * $Author: bfarber $ (Original: Mark)
* @since - * @since -
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * $LastChangedDate: 2013-05-01 17:35:09 -0400 (Wed, 01 May 2013) $
* @version v3.3.4 * @version v3.4.5
* $Revision: 10914 $ * $Revision: 12211 $
*/ */
if ( ! defined( 'IN_IPB' ) ) if ( ! defined( 'IN_IPB' ) )
@@ -49,10 +49,12 @@ class warnings_core
require_once( IPS_ROOT_PATH . 'sources/classes/comments/bootstrap.php' );/*noLibHook*/ require_once( IPS_ROOT_PATH . 'sources/classes/comments/bootstrap.php' );/*noLibHook*/
$comments = classes_comments_bootstrap::controller( $warning['wl_content_id1'] ); $comments = classes_comments_bootstrap::controller( $warning['wl_content_id1'] );
$parent = $comments->remapFromLocal( $comments->fetchParent( $exploded[0] ), 'parent' ); $parent = $comments->fetchParent( $exploded[0] );
if ( ! empty($parent['parent_id']) ) if ( ! is_null($parent) )
{ {
$parent = $comments->remapFromLocal( $parent, 'parent' );
return array( 'url' => ipsRegistry::getClass('output')->buildUrl( "app=core&module=global&section=comments&fromApp={$warning['wl_content_id1']}&do=findComment&parentId={$exploded[0]}&comment_id={$exploded[1]}" ), 'title' => $parent['parent_title'] ); return array( 'url' => ipsRegistry::getClass('output')->buildUrl( "app=core&module=global&section=comments&fromApp={$warning['wl_content_id1']}&do=findComment&parentId={$exploded[0]}&comment_id={$exploded[1]}" ), 'title' => $parent['parent_title'] );
} }
} }
@@ -335,11 +335,11 @@ function IPB3TemplateDiffResults()
if ( json['change_data_type'] == 'css' ) if ( json['change_data_type'] == 'css' )
{ {
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow: auto;max-height: 575px;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>"; content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow: auto;max-height: 535px;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
} }
else else
{ {
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_group'] + ' &gt; ' + json['change_data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow: auto;max-height: 575px;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>"; content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_group'] + ' &gt; ' + json['change_data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow: auto;max-height: 535px;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
} }
max = document.viewport.getHeight(); max = document.viewport.getHeight();
@@ -20,7 +20,7 @@ ACPHomepage = {
{ {
if ( $('members_display_name').value == "" ) if ( $('members_display_name').value == "" )
{ {
alert("You must enter a username!"); alert("Нужно ввести имя пользователя!");
return false; return false;
} }
+8 -8
View File
@@ -85,11 +85,11 @@ function IPBCSS()
} }
else else
{ {
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText ); alert( "Похоже у нас проблемы: " + t.responseText );
} }
}, },
onException: function( f,e ){ alert( "Exception: " + e ); }, onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); } onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
} ); } );
}; };
@@ -143,7 +143,7 @@ function IPBCSS()
} }
else else
{ {
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText ); alert( "Похоже у нас проблемы: " + t.responseText );
} }
}, },
onException: function( f,e ){ alert( "Exception: " + e ); }, onException: function( f,e ){ alert( "Exception: " + e ); },
@@ -159,14 +159,14 @@ function IPBCSS()
/* Make sure we're mean it... */ /* Make sure we're mean it... */
if ( $('tplate_cssRow_' + css_id ).hasClassName( 'tplateRow_new') ) if ( $('tplate_cssRow_' + css_id ).hasClassName( 'tplateRow_new') )
{ {
if ( ! confirm( "REMOVE CSS file?\n This will remove this template bit in ALL skins!" ) ) if ( ! confirm( "Удалить CSS файл ?\nФайл будет удален из ВСЕХ стилей!" ) )
{ {
return false; return false;
} }
} }
else else
{ {
if ( ! confirm( "Revert CSS file?\n All changes WILL be lost!" ) ) if ( ! confirm( "Отменить изменения в CSS файле ?\nВсе изменения будут утеряны!" ) )
{ {
return false; return false;
} }
@@ -202,7 +202,7 @@ function IPBCSS()
} }
else else
{ {
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText ); alert( "Похоже у нас проблемы: " + t.responseText );
} }
}, },
onException: function( f,e ){ alert( "Exception: " + e ); }, onException: function( f,e ){ alert( "Exception: " + e ); },
@@ -239,7 +239,7 @@ function IPBCSS()
} }
else else
{ {
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText ); alert( "Похоже у нас проблемы: " + t.responseText );
} }
}, },
onException: function( f,e ){ alert( "Exception: " + e ); }, onException: function( f,e ){ alert( "Exception: " + e ); },
@@ -217,14 +217,14 @@ function IPBTemplateDiff()
*/ */
this.timeOutAjax = function( t ) this.timeOutAjax = function( t )
{ {
if ( confirm( "No response from the webserver.\nDo you wish to continue waiting?" ) ) if ( confirm( "Нет ответа от сервера.\nХотите подождать?" ) )
{ {
return true; return true;
} }
else else
{ {
t.transport.abort(); t.transport.abort();
alert( "Request Cancelled" ); alert( "Запрос отменен" );
} }
}; };
@@ -265,7 +265,7 @@ function IPBTemplateDiff()
if ( json['error'] ) if ( json['error'] )
{ {
alert( "An error occurred: " . json['error'] ); alert( "Ошибка: " . json['error'] );
return false; return false;
} }
@@ -166,7 +166,7 @@ function IPBTemplateSandR()
else else
{ {
$('replaceButton').disabled = false; $('replaceButton').disabled = false;
$('replaceButton').value = "Replace Selected"; $('replaceButton').value = "Заменить выбранные";
} }
} }
} }
@@ -103,7 +103,7 @@ function IPBTemplates()
} }
else else
{ {
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText ); alert( "Ошибка: " + t.responseText );
} }
}, },
onException: function( f,e ){ alert( "Exception: " + e ); }, onException: function( f,e ){ alert( "Exception: " + e ); },
@@ -169,7 +169,7 @@ function IPBTemplates()
} }
else else
{ {
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText ); alert( "Ошибка: " + t.responseText );
} }
}, },
onException: function( f,e ){ alert( "Exception: " + e ); }, onException: function( f,e ){ alert( "Exception: " + e ); },
@@ -222,7 +222,7 @@ function IPBTemplates()
if ( json['errors'] ) if ( json['errors'] )
{ {
/* Something inline would be very nice here.. rather than this ugly alert */ /* Something inline would be very nice here.. rather than this ugly alert */
alert("Error:: " + json['errors'] ); alert("Ошибка: " + json['errors'] );
} }
else else
{ {
@@ -232,7 +232,7 @@ function IPBTemplates()
} }
else else
{ {
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText ); alert( "Ошибка: " + t.responseText );
} }
}, },
onException: function( f,e ){ alert( "Exception: " + e ); }, onException: function( f,e ){ alert( "Exception: " + e ); },
@@ -248,14 +248,14 @@ function IPBTemplates()
/* Make sure we're mean it... */ /* Make sure we're mean it... */
if ( $('tplate_templaterow_' + template_id ).hasClassName( 'tplateRow_new') ) if ( $('tplate_templaterow_' + template_id ).hasClassName( 'tplateRow_new') )
{ {
if ( ! confirm( "REMOVE template bit?\n This will remove this template bit in ALL skins!" ) ) if ( ! confirm( "Удалить шаблон?\n Произойдет удаление шаблона из ВСЕХ стилей!" ) )
{ {
return false; return false;
} }
} }
else else
{ {
if ( ! confirm( "Revert template bit?\n All changes WILL be lost!" ) ) if ( ! confirm( "Откатить изменения?\n Все изменения БУДУТ УТРАЧЕНЫ!" ) )
{ {
return false; return false;
} }
@@ -301,7 +301,7 @@ function IPBTemplates()
} }
else else
{ {
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText ); alert( "Ошибка: " + t.responseText );
} }
}, },
onException: function( f,e ){ alert( "Exception: " + e ); }, onException: function( f,e ){ alert( "Exception: " + e ); },
@@ -338,7 +338,7 @@ function IPBTemplates()
} }
else else
{ {
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText ); alert( "Ошибка: " + t.responseText );
} }
}, },
onException: function( f,e ){ alert( "Exception: " + e ); }, onException: function( f,e ){ alert( "Exception: " + e ); },
@@ -0,0 +1,138 @@
<?php
/**
* @file bookmarks.php AJAX storage of bookmarks
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2012 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* @since 7th August 2012
* $LastChangedDate: 2011-03-10 21:00:38 +0000 (Thu, 10 Mar 2011) $
* @version v3.4.5
* $Revision: 8021 $
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
/**
*
* @class AJAX storage of bookmarks
* @brief AJAX storage of tab order preference
*
*/
class admin_core_ajax_bookmarks extends ipsAjaxCommand
{
private $_classBookmark;
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$registry->getClass('class_localization')->loadLanguageFile( array( 'admin_global' ), 'core' );
require_once( IPS_ROOT_PATH . 'sources/classes/admin/bookmarks.php' );
$this->_classBookmark = new classes_admin_bookmarks();
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'add':
$this->_add();
break;
case 'managePane':
$this->_managePane();
break;
case 'delete':
$this->_delete();
break;
case 'save':
$this->_save();
break;
}
}
/**
* Save all from manage screen
*/
protected function _save()
{
$home = intval( $this->request['home'] );
$names = $_POST['names'];
$position = array();
if ( is_array( $_GET['bookmark'] ) )
{
foreach( $_GET['bookmark'] as $id )
{
$position[ $id ] = count( $position ) + 1;
}
}
if ( is_array( $names ) )
{
foreach( $names as $id => $name )
{
$this->_classBookmark->update( $id, array( 'title' => $name, 'position' => intval( $position[ $id ] ) ) );
}
}
$this->_classBookmark->setAsHome( $home );
$this->returnJsonArray( array( 'status' => 'ok', 'json' => json_decode( $this->_classBookmark->asJson(), true ) ) );
}
/**
* Remove a book mark
*/
protected function _delete()
{
$id = intval( $this->request['id'] );
$this->_classBookmark->removeBookmark( $id );
$this->returnJsonArray( array( 'status' => 'ok', 'json' => json_decode( $this->_classBookmark->asJson(), true ) ) );
}
/**
* Manage panel
*/
protected function _managePane()
{
$bookmarks = $this->_classBookmark->getBookmarks();
/* Return it then */
$this->returnHtml( $this->registry->output->global_template->manageBookmarks( $bookmarks ) );
}
/**
* Add a book mark
*/
protected function _add()
{
$title = $this->request['title'];
$url = $this->request['url'];
$home = intval( $this->request['home'] );
try
{
$this->_classBookmark->addBookmark( $url, $title, $home );
$this->returnJsonArray( array( 'status' => 'ok', 'json' => json_decode( $this->_classBookmark->asJson(), true ) ) );
}
catch( Exception $err )
{
$this->returnJsonArray( array( 'status' => 'fail', 'msg' => $err->getMessage() ) );
}
}
}
@@ -2,9 +2,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Template comparison * Template comparison
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33 * @since Friday 19th May 2006 17:33
* @version $Revision: 10914 $ * @version $Revision: 10721 $
*/ */
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* AJAX Functions For applications/core/js/ipb3CSS.js file * AJAX Functions For applications/core/js/ipb3CSS.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33 * @since Friday 19th May 2006 17:33
* @version $Revision: 10914 $ * @version $Revision: 10721 $
*/ */
@@ -0,0 +1,31 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Handles Admin ajax functions for IP.Board Text Editor
* Author: Matt "Matt Mecham" Mecham
* Last Updated: $LastChangedDate: 2012-05-29 14:05:10 +0100 (Tue, 29 May 2012) $
* </pre>
*
* @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Gallery
* @link http://www.invisionpower.com
* @version $Rev: 10807 $
*
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
require_once( IPSLib::getAppDir('core') . '/modules_public/ajax/editor.php' );
class admin_core_ajax_editor extends public_core_ajax_editor
{
}
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Login handler abstraction : AJAX Find Names functions * Login handler abstraction : AJAX Find Names functions
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52) * @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 10914 $ * @version $Revision: 10721 $
* @see public_core_ajax_findnames * @see public_core_ajax_findnames
* *
*/ */
@@ -73,7 +73,7 @@ class admin_core_ajax_findnames extends ipsAjaxCommand
$this->DB->build( array( 'select' => 'm.members_display_name, m.name, m.member_id, m.member_group_id', $this->DB->build( array( 'select' => 'm.members_display_name, m.name, m.member_id, m.member_group_id',
'from' => array( 'members' => 'm' ), 'from' => array( 'members' => 'm' ),
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( strtolower( $name ) ) . "%'", 'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( mb_strtolower( $name ) ) . "%'",
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC', 'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
'limit' => array( 0, 15 ), 'limit' => array( 0, 15 ),
'add_join' => array( array( 'select' => 'p.*', 'add_join' => array( array( 'select' => 'p.*',
@@ -2,19 +2,19 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Hooks (AJAX) * Hooks (AJAX)
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2013-02-15 17:36:04 -0500 (Fri, 15 Feb 2013) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license * @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 1st march 2002 * @since 1st march 2002
* @version $Revision: 10914 $ * @version $Revision: 11998 $
*/ */
if ( ! defined( 'IN_IPB' ) ) if ( ! defined( 'IN_IPB' ) )
@@ -208,7 +208,7 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
/* Return data ;o */ /* Return data ;o */
$minVersions = $this->registry->output->formDropdown( "minVersion[{$i}]", $versions ); $minVersions = $this->registry->output->formDropdown( "minVersion[{$i}]", $versions );
$maxVersions = $this->registry->output->formDropdown( "minVersion[{$i}]", $versions ); $maxVersions = $this->registry->output->formDropdown( "maxVersion[{$i}]", $versions );
$this->returnHtml( "{$this->lang->words['a_min']}: {$minVersions}<br /><br />{$this->lang->words['a_max']}: {$maxVersions}" ); $this->returnHtml( "{$this->lang->words['a_min']}: {$minVersions}<br /><br />{$this->lang->words['a_max']}: {$maxVersions}" );
} }
@@ -3,18 +3,18 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Live Search * Live Search
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-12-06 10:19:49 -0500 (Thu, 06 Dec 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: mark $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license * @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Rev: 10914 $ * @version $Rev: 11685 $
* *
*/ */
@@ -106,7 +106,7 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
return $results; return $results;
} }
$term = strtolower($term); $term = mb_strtolower($term);
$this->DB->build( array('select' => 'm.*, pp.*, g.g_title', $this->DB->build( array('select' => 'm.*, pp.*, g.g_title',
'from' => array('members' => 'm'), 'from' => array('members' => 'm'),
@@ -128,11 +128,11 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
$member = $r = IPSMember::buildProfilePhoto( $member ); $member = $r = IPSMember::buildProfilePhoto( $member );
$r = array(); $r = array();
if( $member['members_l_display_name'] AND strpos( $term, $member['members_l_display_name'] ) !== false ) if( $member['members_l_display_name'] AND mb_strpos( $term, $member['members_l_display_name'] ) !== false )
{ {
$r['_matched'] = 'members_display_name'; $r['_matched'] = 'members_display_name';
} }
else if( $member['members_l_username'] AND strpos( $term, $member['members_l_username'] ) !== false ) else if( $member['members_l_username'] AND mb_strpos( $term, $member['members_l_username'] ) !== false )
{ {
$r['_matched'] = 'name'; $r['_matched'] = 'name';
} }
@@ -169,7 +169,7 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
return $results; return $results;
} }
$term = strtolower($term); $term = mb_strtolower($term);
$this->registry->class_localization->loadLanguageFile( array( 'admin_groups' ), 'members' ); $this->registry->class_localization->loadLanguageFile( array( 'admin_groups' ), 'members' );
$this->registry->class_localization->loadLanguageFile( array( 'admin_forums' ), 'forums' ); $this->registry->class_localization->loadLanguageFile( array( 'admin_forums' ), 'forums' );
@@ -179,7 +179,7 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
foreach( $this->lang->words as $k => $v ) foreach( $this->lang->words as $k => $v )
{ {
if( strpos( $k, 'gf_' ) !== false AND strpos( $v, $term ) !== false ) if( strpos( $k, 'gf_' ) !== false AND mb_strpos( $v, $term ) !== false )
{ {
IPSDebug::fireBug( 'info', array( 'Group key found: ' . $k . ': ' . $v ) ); IPSDebug::fireBug( 'info', array( 'Group key found: ' . $k . ': ' . $v ) );
@@ -197,7 +197,7 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
{ {
$_term = preg_quote( $term, '#' ); $_term = preg_quote( $term, '#' );
if ( preg_match( "#" . $_term . "#i", $data['g_title'] ) ) if ( preg_match( "#" . $_term . "#iu", $data['g_title'] ) )
{ {
$results['groups'][] = array( $results['groups'][] = array(
'name' => IPSMember::makeNameFormatted( $data['g_title'], $data['g_id'] ), 'name' => IPSMember::makeNameFormatted( $data['g_title'], $data['g_id'] ),
@@ -225,7 +225,7 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
return $results; return $results;
} }
$term = strtolower($term); $term = mb_strtolower($term);
$results['forums'] = false; $results['forums'] = false;
/* Fetch forums lib */ /* Fetch forums lib */
@@ -239,9 +239,9 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
{ {
$_term = preg_quote( $term, '#' ); $_term = preg_quote( $term, '#' );
if ( preg_match( "#" . $_term . "#i", $data['name'] ) ) if ( preg_match( "#" . $_term . "#iu", $data['name'] ) )
{ {
$data['extra'] = ( ( $data['posts'] == null ) ? 0 : $data['posts'] ) . " posts"; $data['extra'] = ( ( $data['posts'] == null ) ? 0 : $data['posts'] ) . " сообщений";
$data['url'] = $this->settings['_base_url']."&amp;app=forums&amp;module=forums&amp;section=forums&amp;do=edit&amp;f=".$data['id']; $data['url'] = $this->settings['_base_url']."&amp;app=forums&amp;module=forums&amp;section=forums&amp;do=edit&amp;f=".$data['id'];
$results['forums'][] = $data; $results['forums'][] = $data;
} }
@@ -265,7 +265,7 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
return $results; return $results;
} }
$term = strtolower($term); $term = mb_strtolower($term);
if( !IN_DEV ) if( !IN_DEV )
{ {
@@ -313,7 +313,7 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
return $results; return $results;
} }
$textTerm = $this->DB->addSlashes( strtolower( $term ) ); $textTerm = $this->DB->addSlashes( mb_strtolower( $term ) );
$intTerm = intval( $term ); $intTerm = intval( $term );
$encodedTerm = urlencode( $encodedTerm ); $encodedTerm = urlencode( $encodedTerm );
@@ -378,7 +378,7 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
$transaction = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'nexus_transactions', 'where' => "t_id={$intTerm}" ) ); $transaction = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'nexus_transactions', 'where' => "t_id={$intTerm}" ) );
if ( $transaction['t_id'] ) if ( $transaction['t_id'] )
{ {
$tempResults['transactions'] = array( 'name' => $transaction['t_id'], 'url' => $this->settings['_base_url']."&amp;app=nexus&amp;module=payments&amp;section=transactions&amp;do=view&amp;id={$transaction['i_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/transaction.png' ); $tempResults['transactions'] = array( 'name' => $transaction['t_id'], 'url' => $this->settings['_base_url']."&amp;app=nexus&amp;module=payments&amp;section=transactions&amp;do=view&amp;id={$transaction['t_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/transaction.png' );
} }
} }
@@ -542,13 +542,13 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
$item['url'] = "section={$item['section']}&amp;" . $item['url']; $item['url'] = "section={$item['section']}&amp;" . $item['url'];
} }
if( isset($item['keywords']) AND stripos( $item['keywords'], $term ) !== false ) if( isset($item['keywords']) AND mb_stripos( $item['keywords'], $term ) !== false )
{ {
$item['name'] = $item['title']; $item['name'] = $item['title'];
$item['url'] = $this->settings['_base_url']."&amp;app={$app}&amp;module={$item['module']}&amp;{$item['url']}"; $item['url'] = $this->settings['_base_url']."&amp;app={$app}&amp;module={$item['module']}&amp;{$item['url']}";
$results['location'][] = $item; $results['location'][] = $item;
} }
else if( stripos( $item['title'], $term ) !== false ) else if( mb_stripos( $item['title'], $term ) !== false )
{ {
$item['name'] = $item['title']; $item['name'] = $item['title'];
$item['url'] = $this->settings['_base_url']."&amp;app={$app}&amp;module={$item['module']}&amp;{$item['url']}"; $item['url'] = $this->settings['_base_url']."&amp;app={$app}&amp;module={$item['module']}&amp;{$item['url']}";
@@ -3,21 +3,21 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* AJAX Functions For applications/core/js/ipb3CSS.js file * AJAX Functions For applications/core/js/ipb3CSS.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-24 16:20:59 -0400 (Thu, 24 May 2012) $
* </pre> * </pre>
* *
* Author: Matt Mecham * Author: Matt Mecham
* *
* @author $Author: bfarber $ * @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license * @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33 * @since Friday 19th May 2006 17:33
* @version $Revision: 10914 $ * @version $Revision: 10792 $
*/ */
@@ -3,7 +3,7 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* AJAX Functions For applications/core/js/ipb3CSS.js file * AJAX Functions For applications/core/js/ipb3CSS.js file
* Last Updated: $Date: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $ * Last Updated: $Date: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $
* </pre> * </pre>
@@ -7,7 +7,7 @@
* $Author: bfarber $ * $Author: bfarber $
* @since 8th Feb 2011 * @since 8th Feb 2011
* $LastChangedDate: 2011-03-10 16:00:38 -0500 (Thu, 10 Mar 2011) $ * $LastChangedDate: 2011-03-10 16:00:38 -0500 (Thu, 10 Mar 2011) $
* @version v3.3.4 * @version v3.4.5
* $Revision: 8021 $ * $Revision: 8021 $
*/ */
@@ -3,21 +3,21 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* AJAX Functions For applications/core/js/ipb3Templates.js file * AJAX Functions For applications/core/js/ipb3Templates.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-11-30 10:02:12 -0500 (Fri, 30 Nov 2012) $
* </pre> * </pre>
* *
* Author: Matt Mecham * Author: Matt Mecham
* *
* @author $Author: bfarber $ * @author $Author: mmecham $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license * @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33 * @since Friday 19th May 2006 17:33
* @version $Revision: 10914 $ * @version $Revision: 11668 $
*/ */
@@ -137,6 +137,7 @@ class admin_core_ajax_templatediff extends ipsAjaxCommand
$return['data_content'] = $this->skinFunctions->fetchOriginalItem( $return ); $return['data_content'] = $this->skinFunctions->fetchOriginalItem( $return );
break; break;
case 'custom': case 'custom':
$return['data_set_id'] = $session['merge_set_id'];
$return['data_content'] = $this->skinFunctions->fetchCustomItem( $return ); $return['data_content'] = $this->skinFunctions->fetchCustomItem( $return );
break; break;
case 'new': case 'new':
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* AJAX Functions For applications/core/js/ipb3Templates.js file * AJAX Functions For applications/core/js/ipb3Templates.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* Author: Matt Mecham * Author: Matt Mecham
@@ -17,7 +17,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33 * @since Friday 19th May 2006 17:33
* @version $Revision: 10914 $ * @version $Revision: 10721 $
*/ */
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* AJAX Functions For applications/core/js/ipb3Templates.js file * AJAX Functions For applications/core/js/ipb3Templates.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* Author: Matt Mecham * Author: Matt Mecham
@@ -17,7 +17,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33 * @since Friday 19th May 2006 17:33
* @version $Revision: 10914 $ * @version $Revision: 10721 $
*/ */
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* AJAX Functions For applications/core/js/ipb3CSS.js file * AJAX Functions For applications/core/js/ipb3CSS.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* Author: Matt Mecham * Author: Matt Mecham
@@ -17,7 +17,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33 * @since Friday 19th May 2006 17:33
* @version $Revision: 10914 $ * @version $Revision: 10721 $
*/ */
@@ -6,9 +6,9 @@
* $License: http://www.invisionpower.com/company/standards.php#license$ * $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $ * $Author: bfarber $
* @since 15 January 2007 * @since 15 January 2007
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * $LastChangedDate: 2013-05-07 22:02:49 -0400 (Tue, 07 May 2013) $
* @version v3.3.4 * @version v3.4.5
* $Revision: 10914 $ * $Revision: 12236 $
*/ */
if ( ! defined( 'IN_ACP' ) ) if ( ! defined( 'IN_ACP' ) )
@@ -1085,6 +1085,7 @@ class admin_core_applications_applications extends ipsCommand
$this->moduleRecache(); $this->moduleRecache();
$this->applicationsMenuDataRecache();
//----------------------------------------- //-----------------------------------------
// List... // List...
@@ -1163,8 +1164,8 @@ class admin_core_applications_applications extends ipsCommand
//----------------------------------------- //-----------------------------------------
$form['sys_module_title'] = $this->registry->output->formInput( 'sys_module_title', $_POST['sys_module_title'] ? $_POST['sys_module_title'] : $module['sys_module_title'] ); $form['sys_module_title'] = $this->registry->output->formInput( 'sys_module_title', $_POST['sys_module_title'] ? $_POST['sys_module_title'] : $module['sys_module_title'], '', 30, 'text', '', '', 32 );
$form['sys_module_description'] = $this->registry->output->formInput( 'sys_module_description', $_POST['sys_module_description'] ? $_POST['sys_module_description'] : $module['sys_module_description'] ); $form['sys_module_description'] = $this->registry->output->formInput( 'sys_module_description', $_POST['sys_module_description'] ? $_POST['sys_module_description'] : $module['sys_module_description'], '', 30, 'text', '', '', 100 );
$form['sys_module_key'] = $this->registry->output->formInput( 'sys_module_key', $_POST['sys_module_key'] ? $_POST['sys_module_key'] : $module['sys_module_key'] ); $form['sys_module_key'] = $this->registry->output->formInput( 'sys_module_key', $_POST['sys_module_key'] ? $_POST['sys_module_key'] : $module['sys_module_key'] );
$form['sys_module_version'] = $this->registry->output->formInput( 'sys_module_version', $_POST['sys_module_version'] ? $_POST['sys_module_version'] : $module['sys_module_version'] ); $form['sys_module_version'] = $this->registry->output->formInput( 'sys_module_version', $_POST['sys_module_version'] ? $_POST['sys_module_version'] : $module['sys_module_version'] );
$form['sys_module_protected'] = $this->registry->output->formYesNo( 'sys_module_protected', $_POST['sys_module_protected'] ? $_POST['sys_module_protected'] : $module['sys_module_protected'] ); $form['sys_module_protected'] = $this->registry->output->formYesNo( 'sys_module_protected', $_POST['sys_module_protected'] ? $_POST['sys_module_protected'] : $module['sys_module_protected'] );
@@ -1534,7 +1535,9 @@ class admin_core_applications_applications extends ipsCommand
if ( $match[1] ) if ( $match[1] )
{ {
$this->DB->dropTable( preg_replace( '#^' . ipsRegistry::dbFunctions()->getPrefix() . "(\S+)#", "\\1", $match[1] ) ); $_table = preg_replace( '#^' . ipsRegistry::dbFunctions()->getPrefix() . "(\S+)#", "\\1", $match[1] );
$this->DB->dropTable( $_table );
} }
else else
{ {
@@ -1546,7 +1549,14 @@ class admin_core_applications_applications extends ipsCommand
if ( $match[1] and $match[2] ) if ( $match[1] and $match[2] )
{ {
$this->DB->dropField( preg_replace( '#^' . ipsRegistry::dbFunctions()->getPrefix() . "(\S+)#", "\\1", $match[1] ), $match[2] ); $_table = preg_replace( '#^' . ipsRegistry::dbFunctions()->getPrefix() . "(\S+)#", "\\1", $match[1] );
$_field = $match[2];
/* check for field */
if ( $this->DB->checkForField( $_field, $_table ) )
{
$this->DB->dropField( $_table, $_field );
}
} }
} }
} }
@@ -1621,6 +1631,7 @@ class admin_core_applications_applications extends ipsCommand
} }
$this->DB->delete( 'rc_reports_index', 'rc_class=' . $plugin['com_id'] ); $this->DB->delete( 'rc_reports_index', 'rc_class=' . $plugin['com_id'] );
$this->DB->delete( 'rc_classes', 'com_id=' . $plugin['com_id'] );
} }
//----------------------------------------- //-----------------------------------------
@@ -1786,11 +1797,11 @@ class admin_core_applications_applications extends ipsCommand
/* Loop through skin directories */ /* Loop through skin directories */
try try
{ {
foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'cache/skin_cache/' ) as $dir ) foreach( new DirectoryIterator( IPS_CACHE_PATH . 'cache/skin_cache/' ) as $dir )
{ {
if ( preg_match( "/^(cacheid_)/", $dir->getFileName() ) ) if ( preg_match( "/^(cacheid_)/", $dir->getFileName() ) )
{ {
foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'cache/skin_cache/' . $dir->getFileName() . '/' ) as $file ) foreach( new DirectoryIterator( IPS_CACHE_PATH . 'cache/skin_cache/' . $dir->getFileName() . '/' ) as $file )
{ {
if ( ! $file->isDot() ) if ( ! $file->isDot() )
{ {
@@ -1823,10 +1834,14 @@ class admin_core_applications_applications extends ipsCommand
if ( $match == 'contains' ) if ( $match == 'contains' )
{ {
$this->DB->delete( 'skin_templates', "template_group LIKE '%{$name}%'" ); $this->DB->delete( 'skin_templates', "template_group LIKE '%{$name}%'" );
$this->DB->delete( 'skin_templates_previous', "p_template_group LIKE '%{$name}%'" );
$this->DB->delete( 'skin_cache', "cache_type='phptemplate' AND cache_value_1 LIKE '%{$name}%'" );
} }
else else
{ {
$this->DB->delete( 'skin_templates', "template_group='{$name}'" ); $this->DB->delete( 'skin_templates', "template_group='{$name}'" );
$this->DB->delete( 'skin_templates_previous', "p_template_group='{$name}'" );
$this->DB->delete( 'skin_cache', "cache_type='phptemplate' AND cache_value_1='{$name}'" );
} }
} }
} }
@@ -2314,8 +2329,6 @@ XML;
$_groups[] = array( $gid, $gdata['g_title'] ); $_groups[] = array( $gid, $gdata['g_title'] );
} }
sort( $_groups );
$form['app_tab_groups'] = $this->registry->output->formMultiDropdown( 'app_tab_groups[]', $_groups, isset( $_POST['app_tab_groups'] ) ? $_POST['app_tab_groups'] : explode( ',', $application['app_tab_groups'] ), 7 ); $form['app_tab_groups'] = $this->registry->output->formMultiDropdown( 'app_tab_groups[]', $_groups, isset( $_POST['app_tab_groups'] ) ? $_POST['app_tab_groups'] : explode( ',', $application['app_tab_groups'] ), 7 );
/* Setup the global caches MDD */ /* Setup the global caches MDD */
@@ -2555,7 +2568,7 @@ XML;
} }
} }
if ( $info['name'] ) if ( $info['name'] && $info['key'] != "ipseo" )
{ {
$uninstalled[$_file] = array( 'title' => $info['name'], 'author' => $info['author'], 'path' => $filepath, 'okToGo' => $okToGo, 'directory' => $_file ); $uninstalled[$_file] = array( 'title' => $info['name'], 'author' => $info['author'], 'path' => $filepath, 'okToGo' => $okToGo, 'directory' => $_file );
} }
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Blog Application * Blog Application
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 27th Aug 2004 * @since 27th Aug 2004
* @version $Revision: 10914 $ * @version $Revision: 10721 $
* *
*/ */
@@ -2,9 +2,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Blog Application * Blog Application
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -13,7 +13,7 @@
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Revision: 10914 $ * @version $Revision: 10721 $
*/ */
if ( ! defined( 'IN_ACP' ) ) if ( ! defined( 'IN_ACP' ) )
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Download Manager Application * Download Manager Application
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 17 February 2003 * @since 17 February 2003
* @version $Revision: 10914 $ * @version $Revision: 10721 $
* *
*/ */
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $ * $Author: ips_terabyte $
* @since 20th February 2002 * @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $ * $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4 * @version v3.4.5
* $Revision: 8655 $ * $Revision: 8655 $
*/ */
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Download Manager Application * Download Manager Application
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since Who knows... * @since Who knows...
* @version $Revision: 10914 $ * @version $Revision: 10721 $
* *
*/ */
@@ -0,0 +1,178 @@
<?php
/**
* @file applications.php Community Enhancements
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 24 July 2012
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
* @version v3.4.5
* $Revision: 10952 $
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
/**
*
* @class admin_core_applications_enhancements
* @brief Community Enhancements
*/
class admin_core_applications_enhancements extends ipsCommand
{
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$this->html = $this->registry->output->loadTemplate( 'cp_skin_applications' );
$this->registry->class_localization->loadLanguageFile( array( 'admin_applications' ) );
switch( $this->request['do'] )
{
case 'edit':
$this->edit();
break;
case 'save':
$this->save();
break;
default:
$this->manage();
break;
}
$this->registry->getClass( 'output' )->html_main .= $this->registry->getClass( 'output' )->global_template->global_frame_wrapper();
$this->registry->getClass( 'output' )->sendOutput();
}
/**
* Manage
*/
public function manage()
{
$enhancements = array();
foreach ( IPSLib::getEnabledApplications() as $app )
{
if ( is_dir( IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/enhancements' ) )
{
$dir = new DirectoryIterator( IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/enhancements' );
foreach ( $dir as $file )
{
if ( $file->isFile() and !$file->isDot() and substr( $file, 0, 1 ) !== '.' and substr( $file, -4 ) === '.php' )
{
$className = "enhancements_{$app['app_directory']}_" . str_replace( '.php', '', $file->getFilename() );
/* Backup system isn't ready */
if ( $className == 'enhancements_core_ipsbackup' )
{
continue;
}
$classToLoad = IPSLib::loadLibrary( $file->getPathName(), $className );
$enhancements[ $className ] = new $classToLoad( $this->registry );
}
}
}
}
uasort( $enhancements, create_function( '$a, $b', 'return $a->title > $b->title;' ) );
$this->registry->output->html .= $this->html->communityEnhancements( $enhancements );
}
/**
* Edit
*/
public function edit()
{
$exploded = explode( '_', $this->request['service'] );
if ( !IPSLib::appIsInstalled( $exploded[1] ) or !is_file( IPSLib::getAppDir( $exploded[1] ) . '/extensions/enhancements/' . $exploded[2] . '.php' ) )
{
$this->registry->output->showError( $this->lang->words['err_no_enhancement'], 111800 );
}
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $exploded[1] ) . '/extensions/enhancements/' . $exploded[2] . '.php', $this->request['service'] );
$class = new $classToLoad( $this->registry );
if ( method_exists( $class, 'check' ) )
{
$class->check();
}
if ( isset( $class->settings ) and !empty( $class->settings ) )
{
$settingsClass = IPSLib::loadActionOverloader( IPSLib::getAppDir('core') . '/modules_admin/settings/settings.php', 'admin_core_settings_settings' );
$settingsClass = new $settingsClass();
$settingsClass->makeRegistryShortcuts( $this->registry );
$settingsClass->html = $this->registry->output->loadTemplate('cp_skin_settings');
$html = '';
$imploded = implode( ', ', array_map( create_function( '$v', 'return "\'{$v}\'";' ), $class->settings ) );
$settings = array();
$this->DB->build( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => "conf_key IN( {$imploded} )", 'order' => 'conf_position' ) );
$e = $this->DB->execute();
while ( $row = $this->DB->fetch( $e ) )
{
$html .= $settingsClass->_processSettingEntry( $row );
}
$this->registry->output->html .= $this->html->communityEnhancementsSettings( $class, $html );
}
else
{
$this->registry->output->html .= $class->editSettings();
}
}
/**
* Save
*/
public function save()
{
$exploded = explode( '_', $this->request['service'] );
if ( !IPSLib::appIsInstalled( $exploded[1] ) or !is_file( IPSLib::getAppDir( $exploded[1] ) . '/extensions/enhancements/' . $exploded[2] . '.php' ) )
{
$this->registry->output->showError( $this->lang->words['err_no_enhancement'], 111801 );
}
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $exploded[1] ) . '/extensions/enhancements/' . $exploded[2] . '.php', $this->request['service'] );
$class = new $classToLoad( $this->registry );
if ( method_exists( $class, 'check' ) )
{
$class->check();
}
if ( isset( $class->settings ) and !empty( $class->settings ) )
{
$toSave = array();
foreach ( $class->settings as $key )
{
$toSave[ $key ] = $_POST[ $key ];
}
IPSLib::updateSettings( $toSave, TRUE );
}
else
{
$output = $class->saveSettings();
if ( $output and is_string( $output ) )
{
$this->registry->output->html .= $output;
return;
}
}
$this->registry->output->redirect( "{$this->settings['base_url']}app=core&amp;module=applications&amp;section=enhancements", $this->lang->words['enhancements_saved'] );
}
}
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Gallery Application * Gallery Application
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since Who knows... * @since Who knows...
* @version $Revision: 10914 $ * @version $Revision: 10721 $
* *
*/ */
@@ -2,9 +2,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Hooks Management * Hooks Management
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2013-05-20 16:38:23 -0400 (Mon, 20 May 2013) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 3.0.0 * @since 3.0.0
* @version $Revision: 10914 $ * @version $Revision: 12261 $
*/ */
if ( ! defined( 'IN_ACP' ) ) if ( ! defined( 'IN_ACP' ) )
@@ -78,6 +78,11 @@ class admin_core_applications_hooks extends ipsCommand
// lang already loaded by hookFunctions // lang already loaded by hookFunctions
//$this->registry->class_localization->loadLanguageFile( array( 'admin_applications' ), 'core' ); //$this->registry->class_localization->loadLanguageFile( array( 'admin_applications' ), 'core' );
if( defined('NO_WRITE_HOOKS') )
{
$this->registry->output->showError( $this->lang->words['no_write_hooks'] );
}
//----------------------------------------- //-----------------------------------------
// Set up stuff // Set up stuff
//----------------------------------------- //-----------------------------------------
@@ -789,6 +794,7 @@ class admin_core_applications_hooks extends ipsCommand
$replacements[] = array( $replacements[] = array(
'replacement_key' => $_r['replacement_key'], 'replacement_key' => $_r['replacement_key'],
'replacement_content' => $_r['replacement_content'], 'replacement_content' => $_r['replacement_content'],
'replacement_master_key' => $_r['replacement_master_key'],
); );
} }
} }
@@ -1164,6 +1170,7 @@ class admin_core_applications_hooks extends ipsCommand
{ {
foreach( $langPacks as $lang_id ) foreach( $langPacks as $lang_id )
{ {
$langbit['lang_id'] = $lang_id; $langbit['lang_id'] = $lang_id;
// See if it exists // See if it exists
@@ -1179,9 +1186,11 @@ class admin_core_applications_hooks extends ipsCommand
$this->DB->insert( 'core_sys_lang_words', $langbit ); $this->DB->insert( 'core_sys_lang_words', $langbit );
$languageInserted++; $languageInserted++;
$word_id = $this->DB->getInsertId(); $word_id = $this->DB->getInsertId();
$extra_data['language'][ $langbit['word_pack'] ][] = $langbit['word_key'];
} }
$extra_data['language'][ $langbit['word_app'] . "_" . $langbit['word_pack'] ][] = $langbit['word_key'];
} }
} }
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir('core') . '/modules_admin/languages/manage_languages.php', 'admin_core_languages_manage_languages' ); $classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir('core') . '/modules_admin/languages/manage_languages.php', 'admin_core_languages_manage_languages' );
@@ -1192,6 +1201,7 @@ class admin_core_applications_hooks extends ipsCommand
{ {
$langLib->cacheToDisk( $langId ); $langLib->cacheToDisk( $langId );
} }
} }
//----------------------------------------- //-----------------------------------------
@@ -1397,7 +1407,7 @@ class admin_core_applications_hooks extends ipsCommand
foreach( $replacements as $entry ) foreach( $replacements as $entry )
{ {
if ( !isset( $bits[ $entry['replacement_master_key'] ] ) ) if ( !isset( $entry['replacement_master_key'] ) or !isset( $bits[ $entry['replacement_master_key'] ] ) )
{ {
$entry['replacement_master_key'] = 'root'; $entry['replacement_master_key'] = 'root';
} }
@@ -1494,6 +1504,8 @@ class admin_core_applications_hooks extends ipsCommand
{ {
$this->DB->return_die = true; $this->DB->return_die = true;
$alter['default'] = ( !isset($alter['default']) || $alter['default'] === "" ) ? NULL : $alter['default'];
switch( $alter['altertype'] ) switch( $alter['altertype'] )
{ {
case 'remove': case 'remove':
@@ -1662,6 +1674,7 @@ EOF;
$hookData['hook_extra_data'] = unserialize( $hookData['hook_extra_data'] ); $hookData['hook_extra_data'] = unserialize( $hookData['hook_extra_data'] );
/* Output */ /* Output */
$this->registry->output->extra_nav[] = array( $this->settings['base_url'] . $this->form_code . 'do=hooks_overview', $this->lang->words['menu__manage_hooks'] );
$this->registry->output->html .= $this->html->hooksExport( $hookData ); $this->registry->output->html .= $this->html->hooksExport( $hookData );
} }
@@ -2217,7 +2230,23 @@ EOF;
$return = $checker->getFileContents( $url ); $return = $checker->getFileContents( $url );
/* Return the content (if valid) or return 'no update' */ /* Return the content (if valid) or return 'no update' */
return ( strpos( $return, '0' ) === 0 || strpos( $return, '1' ) === 0 ) ? explode( '|', $return ) : array( 0 ); $return = ( strpos( $return, '0' ) === 0 || strpos( $return, '1' ) === 0 ) ? explode( '|', $return ) : array( 0 );
/* Replace {IPSID} id necessary */
if ( strpos( $return[1], '{IPSID}' ) )
{
if ( ipsRegistry::$settings['ipb_reg_number'] )
{
$exploded = explode( '-', ipsRegistry::$settings['ipb_reg_number'] );
$return[1] = str_replace( '{IPSID}', $exploded[3], $return[1] );
}
else
{
$return[1] = "https://www.invisionpower.com/clients";
}
}
return $return;
} }
/** /**
@@ -3014,6 +3043,7 @@ EOF;
$form['jsDataPoints'] = IPSText::br2nl( $this->registry->output->formDropdown( "position[#{index}]", $r['hook_data']['type'] == 'foreach' ? $entryPoints['foreach'] : $entryPoints['if'] ) ); $form['jsDataPoints'] = IPSText::br2nl( $this->registry->output->formDropdown( "position[#{index}]", $r['hook_data']['type'] == 'foreach' ? $entryPoints['foreach'] : $entryPoints['if'] ) );
/* Output */ /* Output */
$this->registry->output->extra_nav[] = array( $this->settings['base_url'] . $this->form_code . 'do=hooks_overview', $this->lang->words['menu__manage_hooks'] );
$this->registry->output->html .= $this->html->hookForm( $form, $action, $hookData, $files, $requirements ); $this->registry->output->html .= $this->html->hookForm( $form, $action, $hookData, $files, $requirements );
} }
@@ -3276,6 +3306,7 @@ EOF;
} }
/* Output */ /* Output */
$this->registry->output->extra_nav[] = array( $this->settings['base_url'] . $this->form_code . 'do=hooks_overview', $this->lang->words['menu__manage_hooks'] );
$this->registry->output->html .= $this->html->hookDetails( $hookData, $files ); $this->registry->output->html .= $this->html->hookDetails( $hookData, $files );
} }
@@ -3428,6 +3459,7 @@ EOF;
$errors = $this->checkHookRequirements( $hookData ); $errors = $this->checkHookRequirements( $hookData );
/* Output */ /* Output */
$this->registry->output->extra_nav[] = array( $this->settings['base_url'] . $this->form_code . 'do=hooks_overview', $this->lang->words['menu__manage_hooks'] );
$this->registry->output->html .= $this->html->hookRequirements( $hookData, $errors, $this->cachedVersions ); $this->registry->output->html .= $this->html->hookRequirements( $hookData, $errors, $this->cachedVersions );
} }
@@ -2,9 +2,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Nexus Application * Nexus Application
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -13,7 +13,7 @@
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Revision: 10914 $ * @version $Revision: 10721 $
*/ */
if ( ! defined( 'IN_ACP' ) ) if ( ! defined( 'IN_ACP' ) )
@@ -2,9 +2,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Application Installation * Application Installation
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -13,7 +13,7 @@
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Rev: 10914 $ * @version $Rev: 10721 $
*/ */
if ( ! defined( 'IN_ACP' ) ) if ( ! defined( 'IN_ACP' ) )
@@ -233,7 +233,16 @@ class admin_core_applications_setup extends ipsCommand
} }
/* Rebuild FURLs */ /* Rebuild FURLs */
if( is_file( $this->app_full_path . 'extensions/furlTemplates.php' ) ) $furltemplatesfile = $this->app_full_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 ) )
{ {
try try
{ {
@@ -598,7 +607,7 @@ class admin_core_applications_setup extends ipsCommand
if( preg_match( "#(.+?)_language_pack.xml#", $f->getFileName() ) ) if( preg_match( "#(.+?)_language_pack.xml#", $f->getFileName() ) )
{ {
$this->request['file_location'] = $_PATH . $f->getFileName(); $this->request['file_location'] = $_PATH . $f->getFileName();
$lang->imprtFromXML( true, true, true, $vars['app_directory'] ); $lang->imprtFromXML( true, true, true, $vars['app_directory'], false, 1 );
} }
} }
} catch ( Exception $e ) {} } catch ( Exception $e ) {}
@@ -2,10 +2,10 @@
<menu> <menu>
<tabitems> <tabitems>
<item> <item>
<title>Manage Applications &amp; Modules</title> <title>Управление Приложениями</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Manage Applications &amp; Modules</subitemtitle> <subitemtitle>Управление Приложениями</subitemtitle>
<subitemlang>manage_apps_modules</subitemlang> <subitemlang>manage_apps_modules</subitemlang>
<subsection>applications</subsection> <subsection>applications</subsection>
<subitemurl>do=applications_overview</subitemurl> <subitemurl>do=applications_overview</subitemurl>
@@ -15,10 +15,10 @@
</subitems> </subitems>
</item> </item>
<item> <item>
<title>Manage Hooks</title> <title>Управление Хуками</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Manage Hooks</subitemtitle> <subitemtitle>Управление Хуками</subitemtitle>
<subitemlang>manage_hooks</subitemlang> <subitemlang>manage_hooks</subitemlang>
<subsection>hooks</subsection> <subsection>hooks</subsection>
<subitemurl>do=hooks_overview</subitemurl> <subitemurl>do=hooks_overview</subitemurl>
@@ -27,5 +27,18 @@
</subitem> </subitem>
</subitems> </subitems>
</item> </item>
<item>
<title>Расширения</title>
<subitems>
<subitem>
<subitemtitle>Расширения</subitemtitle>
<subitemlang>community_enhancements</subitemlang>
<subsection>enhancements</subsection>
<subitemurl></subitemurl>
<subitemrolekey>enhancements_manage</subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitems>
</item>
</tabitems> </tabitems>
</menu> </menu>
@@ -1,62 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<permissions> <permissions>
<group> <group>
<grouptitle>Manage Applications</grouptitle> <grouptitle>Управление приложениями</grouptitle>
<grouplang>core_manage_apps</grouplang> <grouplang>core_manage_apps</grouplang>
<items> <items>
<item> <item>
<key>app_manage</key> <key>app_manage</key>
<string>Can manage applications?</string> <string>Может изменять/добавлять приложения?</string>
</item> </item>
<item> <item>
<key>app_delete</key> <key>app_delete</key>
<string>Can delete applications?</string> <string>Может удалять приложения?</string>
</item> </item>
<item> <item>
<key>app_install</key> <key>app_install</key>
<string>Can install new applications?</string> <string>Может устанавливать новые приложения?</string>
</item> </item>
<item> <item>
<key>build_sphinx</key> <key>build_sphinx</key>
<string>Can build sphinx.conf? WARNING: Exposes database login details</string> <string>Может создавать sphinx.conf? ВНИМАНИЕ: будут доступны данные для соединения с базой данных</string>
</item> </item>
</items> </items>
</group> </group>
<group> <group>
<grouptitle>Manage Modules</grouptitle> <grouptitle>Управление модулями</grouptitle>
<grouplang>core_manage_modules</grouplang> <grouplang>core_manage_modules</grouplang>
<items> <items>
<item> <item>
<key>module_manage</key> <key>module_manage</key>
<string>Can edit/add application modules?</string> <string>Может изменять/добавлять модули?</string>
</item> </item>
<item> <item>
<key>module_delete</key> <key>module_delete</key>
<string>Can delete application modules?</string> <string>Может удалять модули приложений?</string>
</item> </item>
</items> </items>
</group> </group>
<group> <group>
<grouptitle>Purchase Applications</grouptitle> <grouptitle>Покупка приложений</grouptitle>
<grouplang>core_purchase_app</grouplang> <grouplang>core_purchase_app</grouplang>
<items> <items>
<item> <item>
<key>purchase_app</key> <key>purchase_app</key>
<string>Can view pages to purchase additional applications?</string> <string>Может просматривать страницу с платными приложениями?</string>
</item> </item>
</items> </items>
</group> </group>
<group> <group>
<grouptitle>Manage Hooks</grouptitle> <grouptitle>Управление хуками</grouptitle>
<grouplang>core_manage_hooks</grouplang> <grouplang>core_manage_hooks</grouplang>
<items> <items>
<item> <item>
<key>hooks_manage</key> <key>hooks_manage</key>
<string>Can manage hooks?</string> <string>Может добавлять/изменять хуки?</string>
</item> </item>
<item> <item>
<key>hooks_delete</key> <key>hooks_delete</key>
<string>Can remove hooks?</string> <string>Может удалять хуки?</string>
</item>
</items>
</group>
<group>
<grouptitle>Расширения для Сообщества</grouptitle>
<grouplang>core_community_enhancements</grouplang>
<items>
<item>
<key>enhancements_manage</key>
<string>Может управлять расширениями?</string>
</item> </item>
</items> </items>
</group> </group>
@@ -0,0 +1,41 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Attachment Poster
* Last Updated: $Date: 2012-05-21 21:37:50 +0100 (Mon, 21 May 2012) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 10777 $
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
class admin_core_attach_attach extends ipsCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen/redirects]
*/
public function doExecute( ipsRegistry $registry )
{
/* Attachment Controller Class */
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/controller.php', 'classes_attach_controller' );
$controller = new $classToLoad( $registry );
$controller->run( $this->request['do'] );
}
}
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $ * $Author: ips_terabyte $
* @since 20th February 2002 * @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $ * $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4 * @version v3.4.5
* $Revision: 8655 $ * $Revision: 8655 $
*/ */
@@ -2,19 +2,19 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Diagnostic tools * Diagnostic tools
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2013-04-15 17:26:30 -0400 (Mon, 15 Apr 2013) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license * @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 1st march 2002 * @since 1st march 2002
* @version $Revision: 10914 $ * @version $Revision: 12179 $
*/ */
if ( ! defined( 'IN_ACP' ) ) if ( ! defined( 'IN_ACP' ) )
@@ -31,21 +31,21 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
* *
* @var object Skin templates * @var object Skin templates
*/ */
protected $html; public $html;
/** /**
* Shortcut for url * Shortcut for url
* *
* @var string URL shortcut * @var string URL shortcut
*/ */
protected $form_code; public $form_code;
/** /**
* Shortcut for url (javascript) * Shortcut for url (javascript)
* *
* @var string JS URL shortcut * @var string JS URL shortcut
*/ */
protected $form_code_js; public $form_code_js;
/** /**
* Db tools * Db tools
@@ -163,16 +163,19 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
*/ */
public function _permissionsCheck() public function _permissionsCheck()
{ {
$checkdirs = array( PUBLIC_DIRECTORY . '/style_images', $checkdirs = array( IPS_PUBLIC_PATH . 'style_images',
PUBLIC_DIRECTORY . '/style_css', IPS_PUBLIC_PATH . 'style_css',
PUBLIC_DIRECTORY . '/style_emoticons', IPS_PUBLIC_PATH . 'style_emoticons',
'cache', IPS_CACHE_PATH . 'cache',
'cache/skin_cache', IPS_CACHE_PATH . 'cache/skin_cache',
'cache/lang_cache', IPS_CACHE_PATH . 'cache/lang_cache',
'cache/tmp', IPS_CACHE_PATH . 'cache/tmp',
'uploads', IPS_CACHE_PATH . 'cache/tmp/HTML',
'uploads/profile', IPS_CACHE_PATH . 'cache/tmp/URI',
rtrim( str_replace( DOC_IPS_ROOT_PATH, '', IPS_HOOKS_PATH ), '/\\' ), IPS_CACHE_PATH . 'cache/tmp/CSS',
$this->settings['upload_dir'],
$this->settings['upload_dir'] . '/profile',
IPS_HOOKS_PATH,
); );
//----------------------------------------- //-----------------------------------------
@@ -183,12 +186,12 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
{ {
foreach( $this->cache->getCache('lang_data') as $v ) foreach( $this->cache->getCache('lang_data') as $v )
{ {
$this_lang = 'cache/lang_cache/' . $v['lang_id']; $this_lang = IPS_CACHE_PATH . 'cache/lang_cache/' . $v['lang_id'];
$checkdirs[] = $this_lang; $checkdirs[] = $this_lang;
try try
{ {
foreach( new DirectoryIterator( rtrim( DOC_IPS_ROOT_PATH, '/\\' ) . '/' . $this_lang ) as $file ) foreach( new DirectoryIterator( $this_lang ) as $file )
{ {
if( $file->isFile() ) if( $file->isFile() )
{ {
@@ -205,12 +208,12 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
while( $v = $this->DB->fetch() ) while( $v = $this->DB->fetch() )
{ {
$this_lang = 'cache/lang_cache/' . $v['lang_id']; $this_lang = IPS_CACHE_PATH . 'cache/lang_cache/' . $v['lang_id'];
$checkdirs[] = $this_lang; $checkdirs[] = $this_lang;
try try
{ {
foreach( new DirectoryIterator( rtrim( DOC_IPS_ROOT_PATH, '/\\' ) . '/' . $this_lang ) as $file ) foreach( new DirectoryIterator( $this_lang ) as $file )
{ {
if( $file->isFile() ) if( $file->isFile() )
{ {
@@ -229,7 +232,7 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
{ {
foreach( $this->cache->getCache('emoticons') as $v ) foreach( $this->cache->getCache('emoticons') as $v )
{ {
$checkdirs[] = PUBLIC_DIRECTORY . '/style_emoticons/' . $v['emo_set']; $checkdirs[] = IPS_PUBLIC_PATH . 'style_emoticons/' . $v['emo_set'];
} }
} }
else else
@@ -239,7 +242,7 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
while( $v = $this->DB->fetch() ) while( $v = $this->DB->fetch() )
{ {
$checkdirs[] = PUBLIC_DIRECTORY . '/style_emoticons/' . $v['emo_set']; $checkdirs[] = IPS_PUBLIC_PATH . 'style_emoticons/' . $v['emo_set'];
} }
} }
@@ -258,7 +261,7 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
continue; continue;
} }
$checkdirs[] = 'cache/skin_cache/cacheid_' . $v['set_id']; $checkdirs[] = IPS_CACHE_PATH . 'cache/skin_cache/cacheid_' . $v['set_id'];
$skin_dirs[] = $v['set_skin_set_id']; $skin_dirs[] = $v['set_skin_set_id'];
} }
} }
@@ -269,7 +272,7 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
while( $v = $this->DB->fetch() ) while( $v = $this->DB->fetch() )
{ {
$checkdirs[] = 'cache/skin_cache/cacheid_' . $v['set_id']; $checkdirs[] = IPS_CACHE_PATH . 'cache/skin_cache/cacheid_' . $v['set_id'];
$skin_dirs[] = $v['set_skin_set_id']; $skin_dirs[] = $v['set_skin_set_id'];
} }
} }
@@ -295,22 +298,31 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
$checkdirs = array_unique($checkdirs); $checkdirs = array_unique($checkdirs);
$output = array(); $output = array();
foreach( $checkdirs as $dir_to_check ) foreach( $checkdirs as $dir_to_check )
{ {
if( !file_exists( rtrim( DOC_IPS_ROOT_PATH, '/\\' ) . '/' . $dir_to_check ) ) if( !file_exists( $dir_to_check ) )
{ {
# Could be skin files from custom skins for components they don't own # Could be skin files from custom skins for components they don't own
# or they could be using safe_mode skins # or they could be using safe_mode skins
# Make sure skin_cache still shows up though... # Make sure skin_cache still shows up though...
/* tmp/ folders are created automatically. We don't need to make sure they exist but if they do they should still be writable */
if( strpos( $dir_to_check, 'tmp/' ) )
{
continue;
}
if( !strpos( $dir_to_check, 'skin_' ) OR !strpos( $dir_to_check, '.php' ) ) if( !strpos( $dir_to_check, 'skin_' ) OR !strpos( $dir_to_check, '.php' ) )
{ {
$output[] = "<span style='color:red;font-weight:bold;'>{$this->lang->words['d_p404']} ". rtrim( DOC_IPS_ROOT_PATH, '/\\' ) . "/{$dir_to_check}</span>"; $output[] = "<span style='color:red;font-weight:bold;'>{$this->lang->words['d_p404']} {$dir_to_check}</span>";
} }
} }
else else
{ {
$output[] = ( is_writable( DOC_IPS_ROOT_PATH . '/' . $dir_to_check ) ) ? "<span style='color:green;'>" . rtrim( DOC_IPS_ROOT_PATH, '/\\' ) . "/{$dir_to_check} {$this->lang->words['d_pyes']}</span>" : "<span style='color:red;font-weight:bold;'>{$this->lang->words['d_pno']} ". rtrim( DOC_IPS_ROOT_PATH, '/\\' ) . "/{$dir_to_check}</span>"; $output[] = ( is_writable( $dir_to_check ) ) ? "<span style='color:green;'>{$dir_to_check} {$this->lang->words['d_pyes']}</span>" : "<span style='color:red;font-weight:bold;'>{$this->lang->words['d_pno']} {$dir_to_check}</span>";
} }
} }
@@ -727,6 +739,7 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
{ {
$tasks = @shell_exec( "tasklist" ); $tasks = @shell_exec( "tasklist" );
$tasks = str_replace( " ", "&nbsp;", $tasks ); $tasks = str_replace( " ", "&nbsp;", $tasks );
$tasks = mb_convert_encoding($tasks, IPS_DOC_CHAR_SET, 'CP866');
} }
else if( strtolower( PHP_OS ) == 'darwin' ) else if( strtolower( PHP_OS ) == 'darwin' )
{ {
@@ -2,10 +2,10 @@
<menu> <menu>
<tabitems> <tabitems>
<item> <item>
<title>Overview</title> <title>Обзор Системы</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Overview</subitemtitle> <subitemtitle>Обзор Системы</subitemtitle>
<subitemlang>diag_overview</subitemlang> <subitemlang>diag_overview</subitemlang>
<subsection>diagnostics</subsection> <subsection>diagnostics</subsection>
<subitemurl></subitemurl> <subitemurl></subitemurl>
@@ -15,10 +15,10 @@
</subitems> </subitems>
</item> </item>
<item> <item>
<title>Whitespace Checker</title> <title>Проверка Пробелов</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Whitespace Checker</subitemtitle> <subitemtitle>Проверка Пробелов</subitemtitle>
<subitemlang>whitespace_checker</subitemlang> <subitemlang>whitespace_checker</subitemlang>
<subsection>diagnostics</subsection> <subsection>diagnostics</subsection>
<subitemurl>do=whitespace</subitemurl> <subitemurl>do=whitespace</subitemurl>
@@ -28,10 +28,10 @@
</subitems> </subitems>
</item> </item>
<item> <item>
<title>Permissions Checker</title> <title>Проверка Ограничений ФС</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Permissions Checker</subitemtitle> <subitemtitle>Проверка Ограничений ФС</subitemtitle>
<subitemlang>permissions_checker</subitemlang> <subitemlang>permissions_checker</subitemlang>
<subsection>diagnostics</subsection> <subsection>diagnostics</subsection>
<subitemurl>do=filepermissions</subitemurl> <subitemurl>do=filepermissions</subitemurl>
@@ -41,10 +41,10 @@
</subitems> </subitems>
</item> </item>
<item> <item>
<title>Connection Checker</title> <title>Проверка Соединений</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Connection Checker</subitemtitle> <subitemtitle>Проверка Соединений</subitemtitle>
<subitemlang>connection_checker</subitemlang> <subitemlang>connection_checker</subitemlang>
<subsection>diagnostics</subsection> <subsection>diagnostics</subsection>
<subitemurl>do=connections</subitemurl> <subitemurl>do=connections</subitemurl>
@@ -54,10 +54,10 @@
</subitems> </subitems>
</item> </item>
<item> <item>
<title>Database Checker</title> <title>Прверка БД</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Database Checker</subitemtitle> <subitemtitle>Проверка БД</subitemtitle>
<subitemlang>db_checker</subitemlang> <subitemlang>db_checker</subitemlang>
<subsection>diagnostics</subsection> <subsection>diagnostics</subsection>
<subitemurl>do=dbchecker</subitemurl> <subitemurl>do=dbchecker</subitemurl>
@@ -67,10 +67,10 @@
</subitems> </subitems>
</item> </item>
<item> <item>
<title>Database Index Checker</title> <title>Проверка Индексов БД</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Database Index Checker</subitemtitle> <subitemtitle>Проверка Индексов БД</subitemtitle>
<subitemlang>dbi_checker</subitemlang> <subitemlang>dbi_checker</subitemlang>
<subsection>diagnostics</subsection> <subsection>diagnostics</subsection>
<subitemurl>do=dbindex</subitemurl> <subitemurl>do=dbindex</subitemurl>
@@ -80,10 +80,10 @@
</subitems> </subitems>
</item> </item>
<item> <item>
<title>Email Tester</title> <title>Тест Email</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Email Tester</subitemtitle> <subitemtitle>Тест Email</subitemtitle>
<subitemlang>email_checker</subitemlang> <subitemlang>email_checker</subitemlang>
<subsection>diagnostics</subsection> <subsection>diagnostics</subsection>
<subitemurl>do=email</subitemurl> <subitemurl>do=email</subitemurl>
@@ -1,32 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<permissions> <permissions>
<group> <group>
<grouptitle>Diagnostic Tools</grouptitle> <grouptitle>Инструменты диагностики</grouptitle>
<grouplang>core_diag_tools</grouplang> <grouplang>core_diag_tools</grouplang>
<items> <items>
<item> <item>
<key>index_checker</key> <key>index_checker</key>
<string>Can use the database index checker? Warning: Allows ability to run database queries indirectly.</string> <string>Может проверять индексы таблиц базы? Внимание: позволяет выполнять запросы к базе.</string>
</item> </item>
<item> <item>
<key>database_checker</key> <key>database_checker</key>
<string>Can use the database checker? Warning: Allows ability to run database queries indirectly.</string> <string>Может использовать проверку базы данных? Внимание: позволяет выполнять запросы к базе.</string>
</item> </item>
<item> <item>
<key>whitespace_checker</key> <key>whitespace_checker</key>
<string>Can use the whitespace checker?</string> <string>Может проверять файлы на лишние пробелы?</string>
</item> </item>
<item> <item>
<key>connection_checker</key> <key>connection_checker</key>
<string>Can use the connection checker?</string> <string>Может использовать проверку сетевых соединений?</string>
</item> </item>
<item> <item>
<key>permission_checker</key> <key>permission_checker</key>
<string>Can use the permissions checker?</string> <string>Может проверять файлы и директории на правильность расстановки прав доступа?</string>
</item> </item>
<item> <item>
<key>email_checker</key> <key>email_checker</key>
<string>Can use the email tester?</string> <string>Может проверять работу почты?</string>
</item> </item>
</items> </items>
</group> </group>
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $ * $Author: ips_terabyte $
* @since 20th February 2002 * @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $ * $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4 * @version v3.4.5
* $Revision: 8655 $ * $Revision: 8655 $
*/ */
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Quick help - shows popups with help information * Quick help - shows popups with help information
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 1st march 2002 * @since 1st march 2002
* @version $Revision: 10914 $ * @version $Revision: 10721 $
* *
*/ */
@@ -2,10 +2,10 @@
<menu> <menu>
<tabitems> <tabitems>
<item> <item>
<title>Documentation</title> <title>Документация</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Documentation</subitemtitle> <subitemtitle>Документация</subitemtitle>
<subitemlang>help_documentation</subitemlang> <subitemlang>help_documentation</subitemlang>
<subsection>quickhelp</subsection> <subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=docs</subitemurl> <subitemurl>do=redirect&amp;id=docs</subitemurl>
@@ -14,10 +14,10 @@
</subitems> </subitems>
</item> </item>
<item> <item>
<title>Technical Support</title> <title>Техническая поддержка</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Technical Support</subitemtitle> <subitemtitle>Техническая поддержка</subitemtitle>
<subitemlang>help_support</subitemlang> <subitemlang>help_support</subitemlang>
<subsection>quickhelp</subsection> <subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=support</subitemurl> <subitemurl>do=redirect&amp;id=support</subitemurl>
@@ -26,10 +26,10 @@
</subitems> </subitems>
</item> </item>
<item> <item>
<title>Additional Resources</title> <title>Дополнительные Ресурсы</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Additional Resources</subitemtitle> <subitemtitle>Дополнительные Ресурсы</subitemtitle>
<subitemlang>help_resources</subitemlang> <subitemlang>help_resources</subitemlang>
<subsection>quickhelp</subsection> <subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=resources</subitemurl> <subitemurl>do=redirect&amp;id=resources</subitemurl>
@@ -38,10 +38,10 @@
</subitems> </subitems>
</item> </item>
<item> <item>
<title>IPS Contact Information</title> <title>Контактная Информация</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>IPS Contact Information</subitemtitle> <subitemtitle>Контактная Информация</subitemtitle>
<subitemlang>help_contact</subitemlang> <subitemlang>help_contact</subitemlang>
<subsection>quickhelp</subsection> <subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=contact</subitemurl> <subitemurl>do=redirect&amp;id=contact</subitemurl>
@@ -50,10 +50,10 @@
</subitems> </subitems>
</item> </item>
<item> <item>
<title>Feature Requests</title> <title>Запрос Функций</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Feature Requests</subitemtitle> <subitemtitle>Запрос Функций</subitemtitle>
<subitemlang>help_features</subitemlang> <subitemlang>help_features</subitemlang>
<subsection>quickhelp</subsection> <subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=features</subitemurl> <subitemurl>do=redirect&amp;id=features</subitemurl>
@@ -62,10 +62,10 @@
</subitems> </subitems>
</item> </item>
<item> <item>
<title>Report a Bug</title> <title>Сообщить об Ошибке</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Report a Bug</subitemtitle> <subitemtitle>Сообщить об Ошибке</subitemtitle>
<subitemlang>help_bugs</subitemlang> <subitemlang>help_bugs</subitemlang>
<subsection>quickhelp</subsection> <subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=bugs</subitemurl> <subitemurl>do=redirect&amp;id=bugs</subitemurl>
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $ * $Author: ips_terabyte $
* @since 20th February 2002 * @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $ * $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4 * @version v3.4.5
* $Revision: 8655 $ * $Revision: 8655 $
*/ */
@@ -3,18 +3,18 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Language Pack Management * Language Pack Management
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $LastChangedDate: 2013-05-29 10:48:49 -0400 (Wed, 29 May 2013) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license * @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @version $Rev: 10914 $ * @version $Rev: 12276 $
*/ */
if ( ! defined( 'IN_ACP' ) ) if ( ! defined( 'IN_ACP' ) )
@@ -119,7 +119,7 @@ class admin_core_languages_manage_languages extends ipsCommand
break; break;
case 'edit_word_pack': case 'edit_word_pack':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'lang_packs' ); $this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'lang_words' );
$this->languageEditWordPack(); $this->languageEditWordPack();
break; break;
@@ -245,11 +245,11 @@ class admin_core_languages_manage_languages extends ipsCommand
/* Run query... */ /* Run query... */
if( !$langFrom ) if( !$langFrom )
{ {
$this->DB->update( 'members', array( 'language' => $langTo > 0 ? $langTo : '' ), "language='' OR language " . $this->DB->buildIsNull( true ) ); $this->DB->update( 'members', array( 'language' => $langTo > 0 ? $langTo : 0 ), "language=0 OR language " . $this->DB->buildIsNull( true ) );
} }
else else
{ {
$this->DB->update( 'members', array( 'language' => $langTo > 0 ? $langTo : '' ), "language='{$langFrom}'" ); $this->DB->update( 'members', array( 'language' => $langTo > 0 ? $langTo : 0 ), "language=" . intval( $langFrom ) );
} }
/* Done */ /* Done */
@@ -297,7 +297,7 @@ class admin_core_languages_manage_languages extends ipsCommand
$classFileManagement->emptyDirectory( $mainDir ); $classFileManagement->emptyDirectory( $mainDir );
/* Delete session */ /* Delete session */
$session = $this->DB->delete( 'cache_store', "cs_key='translate_session'" ); $this->cache->deleteCache( 'translate_session' );
/* Done */ /* Done */
$this->registry->output->global_message = $this->lang->words['ext_all_killed']; $this->registry->output->global_message = $this->lang->words['ext_all_killed'];
@@ -449,8 +449,7 @@ class admin_core_languages_manage_languages extends ipsCommand
$lang = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_lang', 'where' => 'lang_id=' . $langId ) ); $lang = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_lang', 'where' => 'lang_id=' . $langId ) );
/* Get current session if one */ /* Get current session if one */
$session = $this->DB->buildandFetch( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='translate_session'" ) ); $sessionData = $this->cache->getCache('translate_session');
$sessionData = ( strstr( $session['cs_value'], 'a:' ) ) ? unserialize( $session['cs_value'] ) : array();
/* No current session? */ /* No current session? */
if ( empty( $sessionData['lang_id'] ) OR ! count( $sessionData['files'] ) ) if ( empty( $sessionData['lang_id'] ) OR ! count( $sessionData['files'] ) )
@@ -459,7 +458,7 @@ class admin_core_languages_manage_languages extends ipsCommand
$classFileManagement->emptyDirectory( $mainDir ); $classFileManagement->emptyDirectory( $mainDir );
/* Ensure it's gone, gone */ /* Ensure it's gone, gone */
$this->DB->delete( 'cache_store', "cs_key='translate_session'" ); $this->cache->deleteCache( 'translate_session' );
$sessionData = $lang; $sessionData = $lang;
$sessionData['files'] = array(); $sessionData['files'] = array();
$header = "/*******************************************************\nNOTE: This is a translatable file generated by IP.Board " . IPB_VERSION . " (" . IPB_LONG_VERSION . ") on " . date( "r" ) . " by " . $this->memberData['members_display_name'] . "\nPLEASE set your text editor to save this document as UTF-8 regardless of your board's character-set\n*******************************************************/\n\n"; $header = "/*******************************************************\nNOTE: This is a translatable file generated by IP.Board " . IPB_VERSION . " (" . IPB_LONG_VERSION . ") on " . date( "r" ) . " by " . $this->memberData['members_display_name'] . "\nPLEASE set your text editor to save this document as UTF-8 regardless of your board's character-set\n*******************************************************/\n\n";
@@ -556,11 +555,7 @@ class admin_core_languages_manage_languages extends ipsCommand
ksort( $sessionData['files'] ); ksort( $sessionData['files'] );
/* Save session */ /* Save session */
$this->DB->insert( 'cache_store', array( 'cs_key' => 'translate_session', $this->cache->setCache( 'translate_session', $sessionData, array( 'array' => 1, 'donow' => 1 ) );
'cs_value' => serialize( $sessionData ),
'cs_array' => 1,
'cs_updated' => time() ) );
} }
else else
{ {
@@ -1003,7 +998,7 @@ class admin_core_languages_manage_languages extends ipsCommand
if ( preg_match( "#" . $_word . "_(.+?)_language_pack.xml#", $f->getFileName() ) ) if ( preg_match( "#" . $_word . "_(.+?)_language_pack.xml#", $f->getFileName() ) )
{ {
$this->request['file_location'] = $_PATH . $f->getFileName(); $this->request['file_location'] = $_PATH . $f->getFileName();
$this->imprtFromXML( 1, true, true, $next['key'] ); $this->imprtFromXML( 1, true, true, $next['key'], false, 1 );
} }
} }
} catch ( Exception $e ) {} } catch ( Exception $e ) {}
@@ -1205,6 +1200,22 @@ class admin_core_languages_manage_languages extends ipsCommand
$this->registry->output->showError( $this->lang->words['lang_pack_protected'] ); $this->registry->output->showError( $this->lang->words['lang_pack_protected'] );
} }
/* Got anything? */
if ( ! count( array_keys( $_POST['lang'] ) ) )
{
$this->registry->output->redirect( $this->settings['base_url'] . $this->form_code . "&amp;do=edit_word_pack&amp;word_pack={$this->request['pack']}&amp;id={$this->request['id']}&amp;search={$this->request['search']}&amp;filter={$this->request['filter']}&amp;st={$this->request['st']}", $this->lang->words['language_word_pack_edited'] );
}
//-----------------------------------------
// Get the words
//-----------------------------------------
$lang = $this->DB->buildAndFetchAll( array(
'select' => '*',
'from' => 'core_sys_lang_words',
'where' => "lang_id={$id} AND word_id IN(" . implode( ',', array_map( 'intval', array_keys( $_POST['lang'] ) ) ) . ')',
), 'word_id' );
//----------------------------------------- //-----------------------------------------
// Loop through language bits submitted // Loop through language bits submitted
//----------------------------------------- //-----------------------------------------
@@ -1213,13 +1224,22 @@ class admin_core_languages_manage_languages extends ipsCommand
{ {
foreach( $_POST['lang'] as $k => $v ) foreach( $_POST['lang'] as $k => $v )
{ {
if( $v ) if( $v != "" )
{ {
$v = IPSText::safeSlashes($v); $v = IPSText::safeSlashes($v);
$v = str_replace( '&#092;', '\\', $v ); $v = str_replace( '&#092;', '\\', $v );
if( $lang[ $k ]['word_pack'] == 'admin_js' OR $lang[ $k ]['word_pack'] == 'public_js' )
{
$v = str_replace( array( "\r\n", "\r" ), "", $v );
}
$this->DB->update( 'core_sys_lang_words', "word_custom='" . $this->DB->addSlashes( $v ) . "', word_custom_version=word_default_version", "word_id=" . intval($k), false, true ); $this->DB->update( 'core_sys_lang_words', "word_custom='" . $this->DB->addSlashes( $v ) . "', word_custom_version=word_default_version", "word_id=" . intval($k), false, true );
} }
elseif ( isset( $lang[ $k ] ) and $lang[ $k ]['word_custom'] )
{
$this->DB->update( 'core_sys_lang_words', array( 'word_custom' => '' ), "word_id=" . intval( $k ) );
}
} }
} }
@@ -1273,8 +1293,8 @@ class admin_core_languages_manage_languages extends ipsCommand
return; return;
} }
$this->request['word_app'] = strtolower($this->request['word_app']); $this->request['word_app'] = mb_strtolower($this->request['word_app']);
$this->request['word_pack_db'] = str_replace( '/', '_', strtolower($this->request['word_pack_db']) ); $this->request['word_pack_db'] = str_replace( '/', '_', mb_strtolower($this->request['word_pack_db']) );
if( $this->request['word_pack_db'] == 'admin_js' OR $this->request['word_pack_db'] == 'public_js' ) if( $this->request['word_pack_db'] == 'admin_js' OR $this->request['word_pack_db'] == 'public_js' )
{ {
@@ -1689,18 +1709,18 @@ class admin_core_languages_manage_languages extends ipsCommand
if( ! $this->request['lang_title'] ) if( ! $this->request['lang_title'] )
{ {
$errors[] = '<li>' . $this->lang->words['language_title_missing'] . '</li>'; $errors[] = $this->lang->words['language_title_missing'];
} }
if( ! $this->request['lang_short'] ) if( ! $this->request['lang_short'] )
{ {
$errors[] = '<li>' . $this->lang->words['language_locale_missing'] . '</li>'; $errors[] = $this->lang->words['language_locale_missing'];
} }
if( count( $errors ) ) if( count( $errors ) )
{ {
$this->registry->output->global_message = '<ul>'. implode( '', $errors ).'</ul>'; $this->registry->output->global_message = implode( ', ', $errors );
$this->lang_info_form( $mode ); $this->languageInformationForm( $mode );
return; return;
} }
@@ -2143,7 +2163,7 @@ class admin_core_languages_manage_languages extends ipsCommand
* @param bool $skip_charset Skips charset conversion in the XML file (useful during upgrade routine as strings don't need to be converted) * @param bool $skip_charset Skips charset conversion in the XML file (useful during upgrade routine as strings don't need to be converted)
* @return mixed * @return mixed
*/ */
public function imprtFromXML( $lang_id=0, $in_dev=0, $no_return=0, $app_override='', $skip_charset=false ) public function imprtFromXML( $lang_id=0, $in_dev=0, $no_return=0, $app_override='', $skip_charset=false, $ru = '' )
{ {
//----------------------------------------- //-----------------------------------------
// Set version.. // Set version..
@@ -2473,6 +2493,8 @@ class admin_core_languages_manage_languages extends ipsCommand
// Start looping // Start looping
//----------------------------------------- //-----------------------------------------
$_lastLookup = '';
foreach( $xml->fetchElements('lang') as $entry ) foreach( $xml->fetchElements('lang') as $entry )
{ {
$lang = $xml->fetchElementsFromRecord( $entry ); $lang = $xml->fetchElementsFromRecord( $entry );
@@ -2491,7 +2513,7 @@ class admin_core_languages_manage_languages extends ipsCommand
'word_pack' => $lang['word_pack'], 'word_pack' => $lang['word_pack'],
'word_key' => $lang['word_key'], 'word_key' => $lang['word_key'],
'word_default' => $lang['word_default'], 'word_default' => $lang['word_default'],
'word_custom' => $in_dev ? '' : $lang['word_custom'], 'word_custom' => $in_dev && !$ru ? '' : $lang['word_custom'],
'word_js' => intval($lang['word_js']), 'word_js' => intval($lang['word_js']),
'word_default_version' => $lang['word_default_version'] ? $lang['word_default_version'] : $LATESTVERSION['long'], 'word_default_version' => $lang['word_default_version'] ? $lang['word_default_version'] : $LATESTVERSION['long'],
'word_custom_version' => $lang['word_custom_version'], 'word_custom_version' => $lang['word_custom_version'],
@@ -2522,6 +2544,13 @@ class admin_core_languages_manage_languages extends ipsCommand
else if( ! $app_override ) else if( ! $app_override )
{ {
if( $_lastLookup != md5( $db_array['word_app'] . '-' . $db_array['word_pack'] ) )
{
unset( $lang_entries );
}
$_lastLookup = md5( $db_array['word_app'] . '-' . $db_array['word_pack'] );
$this->DB->build( array( $this->DB->build( array(
'select' => '*', 'select' => '*',
'from' => 'core_sys_lang_words', 'from' => 'core_sys_lang_words',
@@ -2758,6 +2787,12 @@ class admin_core_languages_manage_languages extends ipsCommand
{ {
$content['word_js'] = $r['word_js']; $content['word_js'] = $r['word_js'];
} }
if( $r['word_custom'] )
{
$content['word_custom']=$r['word_custom'];
$content['word_custom_version'] = ($r['word_custom_version'])?$r['word_custom_version']:( $r['word_default_version'] )?$r['word_default_version']:$LATESTVERSION['long'];
}
} }
else else
{ {
@@ -2,10 +2,10 @@
<menu> <menu>
<tabitems> <tabitems>
<item> <item>
<title>Manage Languages</title> <title>Языки Системы</title>
<subitems> <subitems>
<subitem> <subitem>
<subitemtitle>Manage Languages</subitemtitle> <subitemtitle>Языки Системы</subitemtitle>
<subitemlang>languages</subitemlang> <subitemlang>languages</subitemlang>
<subsection>manage_languages</subsection> <subsection>manage_languages</subsection>
<subitemurl></subitemurl> <subitemurl></subitemurl>
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<permissions> <permissions>
<group> <group>
<grouptitle>Manage Languages</grouptitle> <grouptitle>Управление языками</grouptitle>
<grouplang>core_languages</grouplang> <grouplang>core_languages</grouplang>
<items> <items>
<item> <item>
<key>lang_words</key> <key>lang_words</key>
<string>Can add/edit the language bit texts?</string> <string>Может добавлять/изменять слова?</string>
</item> </item>
<item> <item>
<key>lang_packs</key> <key>lang_packs</key>
<string>Can add/edit language packs?</string> <string>Может добавлять/изменять языковые наборы?</string>
</item> </item>
<item> <item>
<key>lang_pack_info</key> <key>lang_pack_info</key>
<string>Can alter the language pack properties and information?</string> <string>Может изменять настройки и информацию языковых наборов?</string>
</item> </item>
</items> </items>
</group> </group>
@@ -2,19 +2,19 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* ACP Login/Logout Routines * ACP Login/Logout Routines
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $Date: 2013-03-20 10:14:51 -0400 (Wed, 20 Mar 2013) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: mmecham $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license * @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since Tuesday 17th August 2004 * @since Tuesday 17th August 2004
* @version $Revision: 10914 $ * @version $Revision: 12094 $
*/ */
if ( ! defined( 'IN_ACP' ) ) if ( ! defined( 'IN_ACP' ) )
@@ -126,8 +126,6 @@ class admin_core_login_manualResolver extends ipsCommand
// Check form details. // Check form details.
//----------------------------------------- //-----------------------------------------
$this->request['email'] = str_replace( '|', '&#124;', $this->request['email'] );
$username = ''; $username = '';
$email = ''; $email = '';
@@ -207,7 +205,7 @@ class admin_core_login_manualResolver extends ipsCommand
if ( $_POST['qstring'] ) if ( $_POST['qstring'] )
{ {
$extra_query = stripslashes( $_POST['qstring'] ); $extra_query = stripslashes( htmlspecialchars( $_POST['qstring'] ) );
$extra_query = str_replace( $this->settings['_original_base_url'] , "" , $extra_query ); $extra_query = str_replace( $this->settings['_original_base_url'] , "" , $extra_query );
$extra_query = str_ireplace( "?index." . $this->settings['php_ext'] , "" , $extra_query ); $extra_query = str_ireplace( "?index." . $this->settings['php_ext'] , "" , $extra_query );
$extra_query = ltrim( $extra_query, '?' ); $extra_query = ltrim( $extra_query, '?' );
@@ -254,7 +252,28 @@ class admin_core_login_manualResolver extends ipsCommand
// Redirect... // Redirect...
//----------------------------------------- //-----------------------------------------
$url = $this->settings['_original_base_url'] . '/' . CP_DIRECTORY . '/index.php?adsess=' . $sess_id . '&' . $extra_query; if ( $extra_query )
{
$url = $this->settings['_original_base_url'] . '/' . CP_DIRECTORY . '/index.php?adsess=' . $sess_id . '&' . $extra_query;
}
else
{
/* Load main page? */
require_once( IPS_ROOT_PATH . 'sources/classes/admin/bookmarks.php' );
$bookmarks = new classes_admin_bookmarks();
$bookmarks->setMember( $mem['member_id'] );
$home = $bookmarks->getHomeUrl();
if ( $home !== false )
{
$url = $this->settings['_original_base_url'] . '/' . CP_DIRECTORY . '/index.php?adsess=' . $sess_id . '&' . $home;
}
else
{
$url = $this->settings['_original_base_url'] . '/' . CP_DIRECTORY . '/index.php?adsess=' . $sess_id;
}
}
$this->_writeToLog( $this->request['username'], 'ok' ); $this->_writeToLog( $this->request['username'], 'ok' );
@@ -291,6 +310,26 @@ class admin_core_login_manualResolver extends ipsCommand
*/ */
public function loginForm( $message='' ) public function loginForm( $message='' )
{ {
//-----------------------------------------
// Hang on, do we need the upgrader?
//-----------------------------------------
if ( !IN_DEV AND ( !defined('SKIP_UPGRADE_CHECK') OR !SKIP_UPGRADE_CHECK ) )
{
require_once( IPS_ROOT_PATH . 'setup/sources/base/setup.php' );/*noLibHook*/
foreach( ipsRegistry::$applications as $app_dir => $app )
{
$_a = ( $app_dir == 'forums' or $app_dir == 'members' ) ? 'core' : $app_dir;
$numbers = IPSSetUp::fetchAppVersionNumbers( $_a );
if ( $numbers['latest'][0] and $numbers['latest'][0] > $numbers['current'][0] )
{
$this->registry->output->silentRedirect( $this->settings['base_acp_url'] . '/upgrade/index.php?_acpRedirect=1' );
return;
}
}
}
//----------------------------------------- //-----------------------------------------
// INIT // INIT
//----------------------------------------- //-----------------------------------------
@@ -358,7 +397,7 @@ class admin_core_login_manualResolver extends ipsCommand
ipsRegistry::getClass('output')->html_main = ipsRegistry::getClass('output')->global_template->log_in_form( $qs, $message, $replace == 'replace' ? true : false, $data ); ipsRegistry::getClass('output')->html_main = ipsRegistry::getClass('output')->global_template->log_in_form( $qs, $message, $replace == 'replace' ? true : false, $data );
ipsRegistry::getClass('output')->html_main = str_replace( '<%TITLE%>' , ipsRegistry::getClass('output')->html_title, ipsRegistry::getClass('output')->html_main ); ipsRegistry::getClass('output')->html_main = str_replace( '<%TITLE%>' , ipsRegistry::getClass('output')->html_title, ipsRegistry::getClass('output')->html_main );
@header("Content-type: text/html"); @header("Content-type: text/html;charset={$this->settings['gb_char_set']}");
print ipsRegistry::getClass('output')->html_main; print ipsRegistry::getClass('output')->html_main;
exit(); exit();
} }
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Admin logs * Admin logs
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 27th January 2004 * @since 27th January 2004
* @version $Rev: 10914 $ * @version $Rev: 10721 $
*/ */
if ( ! defined( 'IN_ACP' ) ) if ( ! defined( 'IN_ACP' ) )
@@ -4,11 +4,11 @@
*~TERABYTE_DOC_READY~ *~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$ * $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$ * $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $ * $Author: mark $
* @since 20th February 2002 * @since 20th February 2002
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * $LastChangedDate: 2012-04-02 11:17:19 -0400 (Mon, 02 Apr 2012) $
* @version v3.3.4 * @version v3.4.5
* $Revision: 10914 $ * $Revision: 10537 $
*/ */
$DEFAULT_SECTION = 'logsSplash'; $DEFAULT_SECTION = 'logsSplash';
@@ -3,9 +3,9 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Email error logs * Email error logs
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 27th January 2004 * @since 27th January 2004
* @version $Rev: 10914 $ * @version $Rev: 10721 $
*/ */
if ( ! defined( 'IN_ACP' ) ) if ( ! defined( 'IN_ACP' ) )
@@ -3,19 +3,19 @@
/** /**
* <pre> * <pre>
* Invision Power Services * Invision Power Services
* IP.Board v3.3.4 * IP.Board v3.4.5
* Error logs * Error logs
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * Last Updated: $LastChangedDate: 2013-02-01 20:54:48 -0500 (Fri, 01 Feb 2013) $
* </pre> * </pre>
* *
* @author $Author: bfarber $ * @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc. * @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license * @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board * @package IP.Board
* @subpackage Core * @subpackage Core
* @link http://www.invisionpower.com * @link http://www.invisionpower.com
* @since 27th January 2004 * @since 27th January 2004
* @version $Rev: 10914 $ * @version $Rev: 11930 $
*/ */
if ( ! defined( 'IN_ACP' ) ) if ( ! defined( 'IN_ACP' ) )
@@ -152,6 +152,7 @@ class admin_core_logs_errorlogs extends ipsCommand
$url_query[] = 'type=' . $this->request['type']; $url_query[] = 'type=' . $this->request['type'];
$url_query[] = 'string=' . urlencode( $string ); $url_query[] = 'string=' . urlencode( $string );
$url_query[] = 'match=' . $this->request['match'];
switch( $this->request['type'] ) switch( $this->request['type'] )
{ {
Loaded 100 of 1359 files, more files were not shown because too many files have changed in this diff. Show more