Version 3.4.6

This commit is contained in:
Neo committed 2025-12-19 00:40:53 -08:00
1 parent e4478369d8
commit b45ea0dffb
1568 files changed
+155104 -161665

No files matched your search

+23 -117
View File
@@ -2,21 +2,21 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Static Classes for IP.Board 3
*
* These classes are not required as objects. We have grouped
* together several singletons to prevent multiple file loads
* Last Updated: $Date: 2013-05-21 20:51:17 -0400 (Tue, 21 May 2013) $
* Last Updated: $Date: 2013-09-26 22:37:28 -0400 (Thu, 26 Sep 2013) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: rashbrook $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @since 12th March 2002
* @version $Revision: 12263 $
* @version $Revision: 12370 $
*
* @author Matt
*/
@@ -1330,17 +1330,6 @@ class IPSLib
return false;
}
/**
* Quickly determines if we've got VK enabled and set up
*
* @access public
* @return boolean
*/
static public function vkontakte_enabled()
{
return ( ipsRegistry::$settings['vk_enabled'] AND ipsRegistry::$settings['vk_api_id'] AND ipsRegistry::$settings['vk_secret'] ) ? TRUE : FALSE;
}
/**
* Central setlocale method so we can adjust as needed
*
@@ -1417,9 +1406,6 @@ class IPSLib
switch( $method )
{
case 'vkontakte':
return self::vkontakte_enabled();
break;
case 'facebook':
return self::fbc_enabled();
break;
@@ -1887,20 +1873,11 @@ EOF;
/* Loop over the applications and build */
foreach( $apps as $path => $app_dir )
{
$furltemplatesfile = IPS_ROOT_PATH . $path;
if(IPB_USE_ONLY_ID_FURL && is_file( $furltemplatesfile.'/extensions/furlTemplatesID.php'))
{
$furltemplatesfile.='/extensions/furlTemplatesID.php';
}
else
{
$furltemplatesfile.='/extensions/furlTemplates.php';
}
if ( is_file( $furltemplatesfile ) )
if ( is_file( IPS_ROOT_PATH . $path . '/extensions/furlTemplates.php' ) )
{
$_SEOTEMPLATES = array();
require( $furltemplatesfile );/*noLibHook*/
require( IPS_ROOT_PATH . $path . '/extensions/furlTemplates.php' );/*noLibHook*/
if ( is_array( $_SEOTEMPLATES ) && count( $_SEOTEMPLATES ) )
{
@@ -3483,22 +3460,6 @@ EOF;
*/
static public function hasActiveLicense( $allowPerpetual=true )
{
//return true;
$licenseData = ipsRegistry::cache()->getCache( 'licenseData' );
if ( ( ! $licenseData OR ! $licenseData['key']['_expires'] OR $licenseData['key']['_expires'] < IPS_UNIX_TIME_NOW OR $licenseData['key']['_expires'] == 9999999999 ) )
{
return false;
}
if ( $allowPerpetual !== true )
{
if ( stristr( $licenseData['name'], 'perpetual' ) )
{
return false;
}
}
return true;
}
@@ -4270,19 +4231,21 @@ class IPSCookie
* Abstract layer allows us to do some checking, etc
*
* @param string Cookie name
* @param boolean Use prefix?
* @return mixed
* @since 2.0
*/
static public function get($name)
static public function get( $name, $usePrefix = true )
{
$_name = ( $usePrefix ? ipsRegistry::$settings['cookie_id'].$name : $name );
/* Check internal data first */
if ( isset( self::$_cookiesSet[ $name ] ) )
{
return self::$_cookiesSet[ $name ];
}
else if ( isset( $_COOKIE[ipsRegistry::$settings['cookie_id'].$name] ) )
else if ( isset( $_COOKIE[ $_name ] ) )
{
$_value = $_COOKIE[ ipsRegistry::$settings['cookie_id'].$name ];
$_value = $_COOKIE[ $_name ];
$_couldBeJson = stripslashes( urldecode( $_value ) );
$_test = json_decode( $_couldBeJson, true );
@@ -4523,61 +4486,6 @@ class IPSText
return $string;
}
/**
* Convert russian mounth names to english
*
* @access public
* @param string Date
* @return string Converted date
*/
static public function monthNameRu2En( $text )
{
return str_replace( array('Январь','Февраль','Март','Апрель','Май','Июнь,','Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'), array('January','February','March','April','May','June','July','August','September','October','November','December'), $text );
}
static public function transliterate( $text )
{
return str_replace( array('а','б','в','г','д','е','ё','ж','з','и','й','к','л','м','н','о','п','р','с','т','у','ф','х','ц','ч','ш','щ','э','ю','я','ы','ь','ъ'), array('a','b','v','g','d','e','yo','zh','z','i','i','k','l','m','n','o','p','r','s','t','u','f','kh','tc','ch','sh','sch','e','iu','ia','y','',''), $text);
}
static public function makeSeoTransliterate( $text )
{
if (!IPB_USE_SEO_TRANSLIT )
{
return $text;
}
/*if ( IPB_USE_ONLY_ID_FURL )
{
return '-';
}*/
if ((is_array($text)) && (count($text)))
{
foreach( $text as $k => $v)
{
$text[$k] = self::makeSeoTransliterate( $v );
}
return $text;
}
else
{
$text = urldecode($text);
$text = self::transliterate( $text );
$text = preg_replace('#[^a-z0-9-]#', '', $text);
$text = urlencode($text);
}
return $text;
}
/**
* Make an SEO title for use in the URL
* We parse them even if friendly urls are off so that the data is there when you do switch it on
@@ -4628,7 +4536,7 @@ class IPSText
}
/* Finish off */
$text = mb_strtolower($text);
$text = strtolower($text);
if ( strtolower( IPS_DOC_CHAR_SET ) == 'utf-8' )
{
@@ -4646,8 +4554,6 @@ class IPSText
$text = preg_replace( "#-{2,}#", '-', $text );
$text = trim($text, '-');
$text = self::makeSeoTransliterate( $text );
IPSDebug::addMessage( "<span style='color:red'>makeSeoTitle ($text) called</span>" );
return ( $text ) ? $text : '-';
@@ -5278,11 +5184,19 @@ class IPSText
//$email = trim($email);
//$email = str_replace( " ", "", $email );
//-----------------------------------------
// Check we're not passing an array
// (path disclosure prevention)
//-----------------------------------------
if ( is_array( $email ) )
{
return FALSE;
}
//-----------------------------------------
// Check for more than 1 @ symbol
//-----------------------------------------
if ( substr_count( $email, '@' ) > 1 )
{
return FALSE;
@@ -6237,15 +6151,8 @@ class IPSText
* @see http://en.wikipedia.org/wiki/Space_(punctuation)
* @see http://www.ascii.cl/htmlcodes.htm
*/
if ( strtolower(IPS_DOC_CHAR_SET) == 'utf-8' )
{
$t = str_replace(chr(194).chr(160), chr(32), $t );
return $t;
}
else
{
$t = str_replace(chr(160), chr(32), $t );
$t = str_replace( chr(173), chr(32), $t );
$t = str_replace( chr(160), ' ', $t );
$t = str_replace( chr(173), ' ', $t );
//$t = str_replace( chr(240), ' ', $t ); -> latin small letter eth
@@ -6263,7 +6170,6 @@ class IPSText
//$t = str_replace( chr(0x2060), "", $t ); //Remove sneaky spaces
//$t = str_replace( chr(0xFEFF), "", $t ); //Remove sneaky spaces
}
}
return $t;
}
-172
View File
@@ -1,172 +0,0 @@
<?php
/**
* <pre>
* Invision Power Services / IPBmafia.Ru
* IP.Board v3.4.2 / darkLicenseActivationEmulator 1.1
* License emulator
* </pre>
*
* @author $Author: _Dark_ $
* @copyright (c) 2012 IPBmafia.Ru
* @package IP.Board
* @link http://www.ipbmafia.ru
* @version 1.1
*
*/
class darkLAE {
public static $settings = array(
/*
* if TRUE IP.Board copyright will be displayed in page footer
* if FALSE IP.Board copyright will be hidden
* если TRUE копирайт IP.Board будет отображен в футере страницы
* если FALSE копирайт IP.Board будет скрыт
*/
'ipboard_copyright_showing' => TRUE,
);
private static $licenseKey = 'darkLAE 1.1 (_Dark_, IPBmafia.Ru)';
public static function activateLicense() {
$response = array(
'result' => 'ok'
);
return json_encode($response);
}
public static function getLicenseKey() {
return self::$licenseKey;
}
public static function getLicenseData() {
return array(
'key' => array(
'_expires' => '9999999998',
'status_icon' => 'medal.png',
'status' => 'Ok',
'name' => 'Master License Key',
'msg' => 'Activated by darkLAE',
'expires' => '9999999999'
),
'addons' => array(
array(
'expires' => '',
'_expires' => 0,
'status_icon' => 'accept.png',
'status' => 'Ok',
'name' => 'IP.Board',
'msg' => ''
),
array(
'expires' => '',
'_expires' => 0,
'status_icon' => 'accept.png',
'status' => 'Ok',
'name' => 'IP.Nexus',
'msg' => ''
),
array(
'expires' => '',
'_expires' => 0,
'status_icon' => 'accept.png',
'status' => 'Ok',
'name' => 'IP.Content',
'msg' => ''
),
array(
'expires' => '',
'_expires' => 0,
'status_icon' => 'accept.png',
'status' => 'Ok',
'name' => 'IP.Gallery',
'msg' => ''
),
array(
'expires' => '',
'_expires' => 0,
'status_icon' => 'accept.png',
'status' => 'Ok',
'name' => 'IP.Blog',
'msg' => ''
),
array(
'expires' => '',
'_expires' => 0,
'status_icon' => 'accept.png',
'status' => 'Ok',
'name' => 'IP.Downloads',
'msg' => ''
),
array(
'expires' => '',
'_expires' => 0,
'status_icon' => 'cross.png',
'status' => 'Inactive',
'name' => 'IP.Chat',
'msg' => "Unfortunately, you can't use IP.Chat with nulled version."
),
array(
'expires' => '',
'_expires' => 0,
'status_icon' => 'accept.png',
'status' => 'Ok',
'name' => 'Copyright Removal',
'msg' => 'If you want disable copyright edit file /admin/sources/base/darkLAE.php at line 20.'
)
),
'ipbMain' => array(
array(
'expires' => '',
'_expires' => 0,
'status_icon' => 'information.png',
'status' => 'Inactive',
'name' => 'Standard Support',
'msg' => "You can't get support from the IPS Client Area, but you can ask for help at <a href='http://www.ipbmafia.ru' target='_blank'>IPBmafia.Ru</a>"
),
array(
'expires' => '',
'_expires' => 0,
'status_icon' => 'information.png',
'status' => 'Inactive',
'name' => 'Download Access',
'msg' => "You can't download new versions from the IPS Client Area, but you can download nulled versions at <a href='http://www.ipbmafia.ru' target='_blank'>IPBmafia.Ru</a>"
),
array(
'expires' => '',
'_expires' => 0,
'status_icon' => 'cross.png',
'status' => 'Inactive',
'name' => 'Spam Monitoring Service',
'msg' => "Unfortunately, you can't use Spam Monitoring Service with nulled version."
),
array(
'expires' => '',
'_expires' => 0,
'status_icon' => 'cross.png',
'status' => 'Inactive',
'name' => 'Mobile Push Notifications',
'msg' => "Unfortunately, you can't use Mobile Push Notifications with nulled version."
),
array(
'expires' => '',
'_expires' => 0,
'status_icon' => 'accept.png',
'status' => 'Ok',
'name' => 'Visual Skin Editor',
'msg' => ''
)
),
'skinGen' => 1,
'iphoneNotifications' => 0,
'cr' => (int) !self::$settings['ipboard_copyright_showing']
);
}
public static function getVisualSkinEditorJsonData() {
$json = <<<_Dark_
var IPS_SKIN_GEN_DATA = {"skinGroups":{"app_calendar":["App: Calendar",["app_calendar_td_selected","app_calendar_td_hover","app_calendar_td_blank","app_calendar_td_today"]],"app_gallery":["App: Gallery",["albumDetailTable_td"]],"global":["Global Styles",["body","a","content","desc","desclighter"]],"tables":["Table Content",["row1","row2","unread","unreadalt","tableheader","tableheader_a","ipb_table"]],"other":["Other Styles",["ipsbox","Bar Header","postblock","NoMessages","fieldsetSubmit","general_box","general_box_h3","ipsboxcontainer","maintitle","sideMenuActive","ipsVerticalTabbed_tabs_li","ipsVerticalTabbed_tabs_li_a","ipsVerticalTabbed_tabs_li_a_hover","ipsVerticalTabbed_tabs_li_active","ipsfilterbar_item","ipsfilterbar_active"]],"buttons":["Button Styles",["but_submit","but_submit_alt","but_topic","but_secondary"]],"header":["Header Elements",["registerLink","header","primarynav","primarynav_inactive","primarynav_active","searchbutton"]],"pagination":["Pagination",["paginationBackForward","paginationBackForwardHover","paginationBackActive"]],"sidebar":["Sidebar",["ipsSideBlock","ipsSideBlock_h3"]],"profiles":["Profile Page",["statusupdate"]],"app_blog":["App: Blog",["entry_header"]]},"colorizeGroups":{"base":["app_calendar_td_selected","app_calendar_td_hover","app_calendar_td_blank","app_calendar_td_today","albumDetailTable_td","body","content","row1","row2","unread","unreadalt","ipsbox","Bar Header","tableheader","tableheader_a","postblock","NoMessages","but_submit_alt","fieldsetSubmit","registerLink","header","primarynav","primarynav_inactive","primarynav_active","general_box","general_box_h3","ipsboxcontainer","maintitle","desc","desclighter","ipb_table","ipsVerticalTabbed_tabs_li","ipsVerticalTabbed_tabs_li_a","ipsVerticalTabbed_tabs_li_a_hover","ipsVerticalTabbed_tabs_li_active","ipsfilterbar_item","ipsfilterbar_active","but_secondary","paginationBackForward","ipsSideBlock","ipsSideBlock_h3","statusupdate","entry_header"],"text":["a"],"secondary":["but_submit","searchbutton","but_topic"],"tertiary":["sideMenuActive","paginationBackForwardHover","paginationBackActive"]},"classes":{"app_calendar_td_selected":["#calendar_table td.selected","Calendar Selected Cell","Used for selected cells in the monthly calendar",{"background":["#E2E9F0",""],"shadow":["#E2E9F0",""]}],"app_calendar_td_hover":["#calendar_table td.normal:hover","Calendar Cell Hover","Used for hovering over cells in the monthly calendar",{"background":["#EDF1F5",""]}],"app_calendar_td_blank":["#calendar_table td.blank","Calendar Blank Cell","Used for blank cells in the monthly calendar",{"background":["#dbe2e8",""],"border":["#dbe2e8",""]}],"app_calendar_td_today":["#calendar_table td.today","Calendar Today Cell","Used for todays cell in the monthly calendar",{"background":["#f1f6ec",""],"border":["#6f8f52",""],"color":["#6f8f52",""]}],"albumDetailTable_td":["#albumDetailTable td","Album Detail Table","Thick border for detail table",{"border":["#ebf0f3",""]}],"body":["html, body","Body","The page background",{"background":["#d8dde8",""],"color":["#5a5a5a",""]}],"a":["a","Links","Basic links",{"color":["#225985",""]}],"content":["#content","Main Content Area","The area that contains all page content",{"background":["#fff",""]}],"row1":[".row1, .post_block.row1","Table Row 1","Generic table row color 1",{"background":["#fff",""]}],"row2":[".row2, .post_block.row2","Table Row 2","Generic table row color 2",{"background":["#f1f6f9",""]}],"unread":[".unread","Unread Row","Unread row colour",{"background":["#f7fbfc",""]}],"unreadalt":[".unread .altrow, .unread.altrow","Unread Row (Alt)","Darker version of unread row, used to highlight certain table columns",{"background":["#E2E9F0",""]}],"ipsbox":[".ipsBox","Content Box","Used to wrap most content sections",{"background":["#ebf0f3",""]}],"Bar Header":[".bar","Bar Header","Used in post forms, etc",{"background":["#eff4f7",""]}],"tableheader":[".header","Table Header","Used for table headings",{"background":["#b6c7db",""],"color":["#1d3652",""]}],"tableheader_a":["body .ipb_table .header a,\tbody .topic_options a","Table Header Link","Used for links in table headings",{"color":["#1d3652",""]}],"postblock":[".post_block","Post Block","An individual post wrapper",{"background":["#fff",""],"border":["#D6E2EB",""]}],"NoMessages":[".no_messages","No Messages Box","Box for 'no data' type messages",{"background":["#f6f8fa",""],"border":false}],"but_submit":[".input_submit","Submit Button","The primary button that submits forms",{"background":["#212121",""],"border":["#5c5c5c",""],"color":["#fff",""],"boxshadow":["#5c5c5c"," inset 0 1px 0 0 "]}],"but_submit_alt":[".input_submit.alt","Alternate Submit Button","Secondary buttons for forms",{"background":["#e2e9f0",""],"border":["#dae2ea",""],"color":["#464646",""],"boxshadow":["#eff3f8"," inset 0 1px 0 0 "]}],"fieldsetSubmit":["body#ipboard_body fieldset.submit,body#ipboard_body p.submit","Submit\/Button Strip","Used in forms where the submit buttons Line truncated
_Dark_;
return $json;
}
}
?>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
+478 -478
View File
@@ -1,479 +1,479 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Primary controller
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @since 14th May 2003
* @version $Rev: 10721 $
*/
/**
* Class "Controller"
* A very simple public facing interface to resolve incoming data into
* a command class
*
* @author Matt Mecham
* @since Wednesday 14th May 2008
* @package IP.Board
*/
class ipsController
{
/**
* Registry reference
*
* @access protected
* @var object
*/
protected $registry;
/**
* Command
*
* @access public
* @var string
*/
static public $cmd;
/**
* Constructor
*
* @access private
* @return @e void
*/
private function __construct() { }
/**
* Public facing function to run the controller
*
* @access public
* @return @e void
*/
static public function run()
{
$instance = new ipsController();
$instance->init();
$instance->handleRequest();
}
/**
* Initialize ipsRegistry and this class
*
* @access protected
* @return @e void
*/
protected function init()
{
$this->registry = ipsRegistry::instance();
$this->registry->init();
}
/**
* Handle the incoming request using the command resolver
*
* @access protected
* @return @e void
*/
protected function handleRequest()
{
$cmd_r = new ipsController_CommandResolver();
try
{
self::$cmd = $cmd_r->getCommand( $this->registry );
}
catch( Exception $e )
{
$msg = $e->getMessage();
/* An error occured, so throw a 404 */
try
{
/* The following patch prevents links such as /admin/index.php?adsess=123&app=anyrandomnamehere&module=login&do=login-complete from loading
an ACP error screen complete with wrapper, which may expose the applications that are installed to an end user.
This issue was reported by Christopher Truncer via the IPS ticket system. */
if( IN_ACP AND !$this->registry->member()->getProperty('member_id') )
{
$this->registry->getClass('output')->silentRedirect( ipsRegistry::$settings['base_url'] );
}
$this->registry->getClass('output')->showError( 'incorrect_furl', 404, null, null, 404 );
}
catch( Exception $e )
{
print $msg;
exit();
}
}
IPSDebug::setMemoryDebugFlag( "Everything up until execute call", 0 );
self::$cmd->execute( $this->registry );
}
}
/**
* Class "Command Resolver"
* Resolves the incoming data
*
* @author Matt Mecham
* @since Wednesday 14th May 2008
* @package IP.Board
*/
class ipsController_CommandResolver
{
/**#@+
* Internal strings to remember
*
* @access protected
* @var string
*/
protected static $base_cmd;
protected static $default_cmd;
protected static $modules_dir = 'modules_public';
protected static $class_dir = 'public';
/**#@-*/
/**
* Constructor
*
* @access public
* @return @e void
*/
public function __construct()
{
if ( ! self::$base_cmd )
{
self::$base_cmd = ipsRegistry::$current_module == 'ajax' ? new ReflectionClass( 'ipsAjaxCommand' ) : new ReflectionClass( 'ipsCommand' );
self::$default_cmd = new ipsCommand_default();
self::$modules_dir = ( IPS_AREA != 'admin' ) ? 'modules_public' : 'modules_admin';
self::$class_dir = ( IPS_AREA != 'admin' ) ? 'public' : 'admin';
}
}
/**
* Retreive the command
*
* @access public
* @param object ipsRegistry reference
* @return object
*/
public function getCommand( ipsRegistry $registry )
{
$_NOW = IPSDebug::getMemoryDebugFlag();
$module = ipsRegistry::$current_module;
$section = ipsRegistry::$current_section;
$filepath = IPSLib::getAppDir( IPS_APP_COMPONENT ) . '/' . self::$modules_dir . '/' . $module . '/';
/* Bug Fix #21009 */
if ( ! ipsRegistry::$applications[ IPS_APP_COMPONENT ]['app_enabled'] )
{
throw new Exception( "The specified application has been disabled" );
}
if ( !IN_ACP and !IPSLib::moduleIsEnabled( $module, IPS_APP_COMPONENT ) and $module != 'ajax' )
{
throw new Exception( "The specified module has been disabled" );
}
/* Got a section? */
if ( ! $section )
{
if ( is_file( $filepath . 'defaultSection.php' ) )
{
$DEFAULT_SECTION = '';
include( $filepath . 'defaultSection.php' );/*noLibHook*/
if ( $DEFAULT_SECTION )
{
$section = $DEFAULT_SECTION;
ipsRegistry::$current_section = $section;
}
}
}
$_classname = self::$class_dir . '_' . IPS_APP_COMPONENT . '_' . $module . '_';
/* Rarely used, let's leave file_exists which is faster for non-existent files */
if ( file_exists( $filepath . 'manualResolver.php' ) )
{
$classname = IPSLib::loadActionOverloader( $filepath . 'manualResolver.php' , $_classname . 'manualResolver' );
}
else if ( is_file( $filepath . $section . '.php' ) )
{
$classname = IPSLib::loadActionOverloader( $filepath . $section . '.php' , $_classname . $section );
}
IPSDebug::setMemoryDebugFlag( "Controller getCommand executed" );
if ( class_exists( $classname ) )
{
$cmd_class = new ReflectionClass( $classname );
if ( $cmd_class->isSubClassOf( self::$base_cmd ) )
{
return $cmd_class->newInstance();
}
else
{
throw new Exception( "$section в $module не существует!" );
}
}
else
{
throw new Exception( "$classname does not exist!" );
}
# Fudge it to return just the default object
return clone self::$default_cmd;
}
}
abstract class ipsCommand
{
/**#@+
* Registry Object Shortcuts
*
* @access protected
* @var object
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $caches;
/**#@-*/
/**
* Constructor
*
* @access public
* @return @e void
*/
final public function __construct()
{
}
/**
* Make the registry shortcuts
*
* @access public
* @param object ipsRegistry reference
* @return @e void
*/
public function makeRegistryShortcuts( ipsRegistry $registry )
{
/* Make registry objects */
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->memberData = IPSMember::setUpModerator( $this->memberData );
}
/**
* Execute the command (call doExecute)
*
* @access public
* @param object ipsRegistry reference
* @return @e void
*/
public function execute( ipsRegistry $registry )
{
//$registry->getClass('class_permissions')
$this->makeRegistryShortcuts( $registry );
$this->doExecute( $registry );
}
/**
* Do execute method (must be overriden)
*
* @access protected
* @param object ipsRegistry reference
* @return @e void
*/
protected abstract function doExecute( ipsRegistry $registry );
}
/**
* Abstract class for handling ajax requests
*/
abstract class ipsAjaxCommand
{
/**#@+
* Registry Object Shortcuts
*
* @access protected
* @var object
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $caches;
protected $ajax;
/**#@-*/
/**
* Constructor
*
* @access public
* @return @e void
*/
final public function __construct()
{
}
/**
* Magic function to catch all the ajax methods
*
* @access public
* @param string $func Function name being called
* @param array $arguments Array of parameters
* @return mixed
*/
public function __call( $func, $arguments )
{
if( method_exists( $this->ajax, $func ) )
{
return call_user_func_array( array( $this->ajax, $func ), $arguments );
}
}
/**
* Creates all the registry shorctus
*
* @access public
* @param object ipsRegistry reference
* @return @e void
*/
public function makeRegistryShortcuts( ipsRegistry $registry )
{
/* Make registry objects */
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->memberData = IPSMember::setUpModerator( $this->memberData );
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' );
$this->ajax = new $classToLoad();
IPSDebug::fireBug( 'registerExceptionHandler' );
IPSDebug::fireBug( 'registerErrorHandler' );
}
/**
* Executes the ajax request, checks secure key
*
* @access public
* @param object ipsRegistry reference
* @return @e void
*/
public function execute( ipsRegistry $registry )
{
/* Setup Shortcuts First */
$this->makeRegistryShortcuts( $registry );
/* Check the secure key */
$this->request['secure_key'] = $this->request['secure_key'] ? $this->request['secure_key'] : $this->request['md5check'];
if( $this->request['secure_key'] != $this->member->form_hash )
{
IPSDebug::fireBug( 'error', array( "The security key did not match the member's form hash" ) );
$this->returnString( 'nopermission' );
}
$this->doExecute( $registry );
}
/**
* Do execute method (must be overriden)
*
* @access protected
* @param object ipsRegistry reference
* @return @e void
*/
protected abstract function doExecute( ipsRegistry $registry );
}
class ipsCommand_default extends ipsCommand
{
/**
* Do execute method
*
* @access protected
* @param object ipsRegistry reference
* @return @e void
*/
protected function doExecute( ipsRegistry $registry )
{
$modules_dir = ( IPS_AREA != 'admin' ) ? 'modules_public' : 'modules_admin';
$filepath = IPSLib::getAppDir( IPS_APP_COMPONENT ) . '/' . $modules_dir . '/' . ipsRegistry::$current_module . '/' . ipsRegistry::$current_section . '.php';
$filepath = str_replace( DOC_IPS_ROOT_PATH, '', $filepath );
//-----------------------------------------
// Redirect to board index
//-----------------------------------------
if ( ! (IPS_APP_COMPONENT == 'forums' AND ipsRegistry::$current_module == 'forums' AND ipsRegistry::$current_section == 'boards') )
{
if( IPB_THIS_SCRIPT == 'admin' )
{
$registry->output->silentRedirect( ipsRegistry::$settings['_base_url'] );
}
else
{
$registry->output->silentRedirect( ipsRegistry::$settings['_original_base_url'] );
}
}
//-----------------------------------------
// Uh oh, this is a big one.. (no forums app)
//-----------------------------------------
if ( ! is_file( $filepath ) )
{
$this->registry->getClass('output')->showError( array( 'command_file_missing', $filepath ), 401100, null, null, 404 );
}
else
{
$this->registry->getClass('output')->showError( array( 'command_class_incorrect', $filepath ), 401200, null, null, 404 );
}
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* Primary controller
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @since 14th May 2003
* @version $Rev: 10721 $
*/
/**
* Class "Controller"
* A very simple public facing interface to resolve incoming data into
* a command class
*
* @author Matt Mecham
* @since Wednesday 14th May 2008
* @package IP.Board
*/
class ipsController
{
/**
* Registry reference
*
* @access protected
* @var object
*/
protected $registry;
/**
* Command
*
* @access public
* @var string
*/
static public $cmd;
/**
* Constructor
*
* @access private
* @return @e void
*/
private function __construct() { }
/**
* Public facing function to run the controller
*
* @access public
* @return @e void
*/
static public function run()
{
$instance = new ipsController();
$instance->init();
$instance->handleRequest();
}
/**
* Initialize ipsRegistry and this class
*
* @access protected
* @return @e void
*/
protected function init()
{
$this->registry = ipsRegistry::instance();
$this->registry->init();
}
/**
* Handle the incoming request using the command resolver
*
* @access protected
* @return @e void
*/
protected function handleRequest()
{
$cmd_r = new ipsController_CommandResolver();
try
{
self::$cmd = $cmd_r->getCommand( $this->registry );
}
catch( Exception $e )
{
$msg = $e->getMessage();
/* An error occured, so throw a 404 */
try
{
/* The following patch prevents links such as /admin/index.php?adsess=123&app=anyrandomnamehere&module=login&do=login-complete from loading
an ACP error screen complete with wrapper, which may expose the applications that are installed to an end user.
This issue was reported by Christopher Truncer via the IPS ticket system. */
if( IN_ACP AND !$this->registry->member()->getProperty('member_id') )
{
$this->registry->getClass('output')->silentRedirect( ipsRegistry::$settings['base_url'] );
}
$this->registry->getClass('output')->showError( 'incorrect_furl', 404, null, null, 404 );
}
catch( Exception $e )
{
print $msg;
exit();
}
}
IPSDebug::setMemoryDebugFlag( "Everything up until execute call", 0 );
self::$cmd->execute( $this->registry );
}
}
/**
* Class "Command Resolver"
* Resolves the incoming data
*
* @author Matt Mecham
* @since Wednesday 14th May 2008
* @package IP.Board
*/
class ipsController_CommandResolver
{
/**#@+
* Internal strings to remember
*
* @access protected
* @var string
*/
protected static $base_cmd;
protected static $default_cmd;
protected static $modules_dir = 'modules_public';
protected static $class_dir = 'public';
/**#@-*/
/**
* Constructor
*
* @access public
* @return @e void
*/
public function __construct()
{
if ( ! self::$base_cmd )
{
self::$base_cmd = ipsRegistry::$current_module == 'ajax' ? new ReflectionClass( 'ipsAjaxCommand' ) : new ReflectionClass( 'ipsCommand' );
self::$default_cmd = new ipsCommand_default();
self::$modules_dir = ( IPS_AREA != 'admin' ) ? 'modules_public' : 'modules_admin';
self::$class_dir = ( IPS_AREA != 'admin' ) ? 'public' : 'admin';
}
}
/**
* Retreive the command
*
* @access public
* @param object ipsRegistry reference
* @return object
*/
public function getCommand( ipsRegistry $registry )
{
$_NOW = IPSDebug::getMemoryDebugFlag();
$module = ipsRegistry::$current_module;
$section = ipsRegistry::$current_section;
$filepath = IPSLib::getAppDir( IPS_APP_COMPONENT ) . '/' . self::$modules_dir . '/' . $module . '/';
/* Bug Fix #21009 */
if ( ! ipsRegistry::$applications[ IPS_APP_COMPONENT ]['app_enabled'] )
{
throw new Exception( "The specified application has been disabled" );
}
if ( !IN_ACP and !IPSLib::moduleIsEnabled( $module, IPS_APP_COMPONENT ) and $module != 'ajax' )
{
throw new Exception( "The specified module has been disabled" );
}
/* Got a section? */
if ( ! $section )
{
if ( is_file( $filepath . 'defaultSection.php' ) )
{
$DEFAULT_SECTION = '';
include( $filepath . 'defaultSection.php' );/*noLibHook*/
if ( $DEFAULT_SECTION )
{
$section = $DEFAULT_SECTION;
ipsRegistry::$current_section = $section;
}
}
}
$_classname = self::$class_dir . '_' . IPS_APP_COMPONENT . '_' . $module . '_';
/* Rarely used, let's leave file_exists which is faster for non-existent files */
if ( file_exists( $filepath . 'manualResolver.php' ) )
{
$classname = IPSLib::loadActionOverloader( $filepath . 'manualResolver.php' , $_classname . 'manualResolver' );
}
else if ( is_file( $filepath . $section . '.php' ) )
{
$classname = IPSLib::loadActionOverloader( $filepath . $section . '.php' , $_classname . $section );
}
IPSDebug::setMemoryDebugFlag( "Controller getCommand executed" );
if ( class_exists( $classname ) )
{
$cmd_class = new ReflectionClass( $classname );
if ( $cmd_class->isSubClassOf( self::$base_cmd ) )
{
return $cmd_class->newInstance();
}
else
{
throw new Exception( "$section in $module does not exist!" );
}
}
else
{
throw new Exception( "$classname does not exist!" );
}
# Fudge it to return just the default object
return clone self::$default_cmd;
}
}
abstract class ipsCommand
{
/**#@+
* Registry Object Shortcuts
*
* @access protected
* @var object
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $caches;
/**#@-*/
/**
* Constructor
*
* @access public
* @return @e void
*/
final public function __construct()
{
}
/**
* Make the registry shortcuts
*
* @access public
* @param object ipsRegistry reference
* @return @e void
*/
public function makeRegistryShortcuts( ipsRegistry $registry )
{
/* Make registry objects */
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->memberData = IPSMember::setUpModerator( $this->memberData );
}
/**
* Execute the command (call doExecute)
*
* @access public
* @param object ipsRegistry reference
* @return @e void
*/
public function execute( ipsRegistry $registry )
{
//$registry->getClass('class_permissions')
$this->makeRegistryShortcuts( $registry );
$this->doExecute( $registry );
}
/**
* Do execute method (must be overriden)
*
* @access protected
* @param object ipsRegistry reference
* @return @e void
*/
protected abstract function doExecute( ipsRegistry $registry );
}
/**
* Abstract class for handling ajax requests
*/
abstract class ipsAjaxCommand
{
/**#@+
* Registry Object Shortcuts
*
* @access protected
* @var object
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $caches;
protected $ajax;
/**#@-*/
/**
* Constructor
*
* @access public
* @return @e void
*/
final public function __construct()
{
}
/**
* Magic function to catch all the ajax methods
*
* @access public
* @param string $func Function name being called
* @param array $arguments Array of parameters
* @return mixed
*/
public function __call( $func, $arguments )
{
if( method_exists( $this->ajax, $func ) )
{
return call_user_func_array( array( $this->ajax, $func ), $arguments );
}
}
/**
* Creates all the registry shorctus
*
* @access public
* @param object ipsRegistry reference
* @return @e void
*/
public function makeRegistryShortcuts( ipsRegistry $registry )
{
/* Make registry objects */
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->memberData = IPSMember::setUpModerator( $this->memberData );
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' );
$this->ajax = new $classToLoad();
IPSDebug::fireBug( 'registerExceptionHandler' );
IPSDebug::fireBug( 'registerErrorHandler' );
}
/**
* Executes the ajax request, checks secure key
*
* @access public
* @param object ipsRegistry reference
* @return @e void
*/
public function execute( ipsRegistry $registry )
{
/* Setup Shortcuts First */
$this->makeRegistryShortcuts( $registry );
/* Check the secure key */
$this->request['secure_key'] = $this->request['secure_key'] ? $this->request['secure_key'] : $this->request['md5check'];
if( $this->request['secure_key'] != $this->member->form_hash )
{
IPSDebug::fireBug( 'error', array( "The security key did not match the member's form hash" ) );
$this->returnString( 'nopermission' );
}
$this->doExecute( $registry );
}
/**
* Do execute method (must be overriden)
*
* @access protected
* @param object ipsRegistry reference
* @return @e void
*/
protected abstract function doExecute( ipsRegistry $registry );
}
class ipsCommand_default extends ipsCommand
{
/**
* Do execute method
*
* @access protected
* @param object ipsRegistry reference
* @return @e void
*/
protected function doExecute( ipsRegistry $registry )
{
$modules_dir = ( IPS_AREA != 'admin' ) ? 'modules_public' : 'modules_admin';
$filepath = IPSLib::getAppDir( IPS_APP_COMPONENT ) . '/' . $modules_dir . '/' . ipsRegistry::$current_module . '/' . ipsRegistry::$current_section . '.php';
$filepath = str_replace( DOC_IPS_ROOT_PATH, '', $filepath );
//-----------------------------------------
// Redirect to board index
//-----------------------------------------
if ( ! (IPS_APP_COMPONENT == 'forums' AND ipsRegistry::$current_module == 'forums' AND ipsRegistry::$current_section == 'boards') )
{
if( IPB_THIS_SCRIPT == 'admin' )
{
$registry->output->silentRedirect( ipsRegistry::$settings['_base_url'] );
}
else
{
$registry->output->silentRedirect( ipsRegistry::$settings['_original_base_url'] );
}
}
//-----------------------------------------
// Uh oh, this is a big one.. (no forums app)
//-----------------------------------------
if ( ! is_file( $filepath ) )
{
$this->registry->getClass('output')->showError( array( 'command_file_missing', $filepath ), 401100, null, null, 404 );
}
else
{
$this->registry->getClass('output')->showError( array( 'command_class_incorrect', $filepath ), 401200, null, null, 404 );
}
}
}
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Mobile app methods
* Last Updated: $LastChangedDate: 2012-05-21 07:52:30 -0400 (Mon, 21 May 2012) $
* </pre>
File diff suppressed because it is too large. Load diff
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Admin Bookmarks Model
* Last Updated: $Date: 2012-05-10 21:10:13 +0100 (Thu, 10 May 2012) $
* </pre>
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Advertisements
* </pre>
*
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com/">IP.Board</a>
IP.Board
</body>
</html>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Archive: Reader
* By Matt Mecham
* </pre>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com/">IP.Board</a>
IP.Board
</body>
</html>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Archive: Writer
* By Matt Mecham
* </pre>
+441 -442
View File
@@ -1,442 +1,441 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Archive: Reader
* By Matt Mecham
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2010 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @since 18th November 2011
* @version $Revision: 8644 $
*/
/**
* Restores topics that are either manually flagged or via settings
* from the Admin CP.
*
* Manually flagged topics are always restored first.
* @author matt
*
*/
class classes_archive_restore
{
/**#@+
* Registry objects
*
* @access protected
* @var object
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $caches;
/**#@-*/
/**
* Set current app
*/
private $_app = '';
/**
* Constructor
*
*/
public function __construct()
{
/* Make registry objects */
$this->registry = ipsRegistry::instance();
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
/* Check for class_forums */
if ( ipsRegistry::isClassLoaded('class_forums') !== TRUE )
{
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' );
$this->registry->setClass( 'class_forums', new $classToLoad( $this->registry ) );
$this->registry->class_forums->forumsInit();
}
/* Language class */
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' );
/* Fetch engine class */
$this->settings['archive_engine'] = ( $this->settings['archive_engine'] ) ? $this->settings['archive_engine'] : 'sql';
/* Load up archive class */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/archive/restore/' . $this->settings['archive_engine'] . '.php', 'classes_archive_restore_' . $this->settings['archive_engine'] );
$this->engine = new $classToLoad();
}
/**
* Set the current application
* @param string $app
*/
public function setApp( $app )
{
$this->_app = $app;
}
/**
* Get the application
* @return string
*/
public function getApp()
{
return $this->_app;
}
/**
* Restore posts to the topic
* @param array INTS
*/
public function restore( $pids=array() )
{
if ( ! count( $pids ) )
{
return null;
}
$topics = array();
$forumIds = array();
$completedTopics = array();
$workingTopics = array();
$maxes = array();
/* Load the attachments stuff */
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' );
$class_attach = new $classToLoad( $this->registry );
$class_attach->type = 'post';
$class_attach->init();
/* Load the attachments stuff */
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/topics.php', 'app_forums_classes_topics' );
$topicClass = new $classToLoad( $this->registry );
/* Fetch data based on PIDs */
$posts = $topicClass->getPosts( array( 'postId' => $pids,
'sortField' => 'pid',
'sortOrder' => 'asc',
'isArchivedTopic' => true ,
'skipForumCheck' => true,
'postType' => array('sdelete', 'visible', 'hidden', 'pdeleted')
) );
foreach( $posts as $pid => $post )
{
/* Write it */
$this->engine->set( $post );
/* Collect some data */
if ( ! in_array( $post['tid'], $topics ) )
{
$post['_pids'] = 1;
$post['_lowPid'] = $post['archive_id'];
$post['_maxPid'] = $post['archive_id'];
$post['_topicCount'] = ( intval( $post['posts'] ) + intval( $post['topic_deleted_posts'] ) + intval( $post['topic_queuedposts'] ) + 1 );
$topics[ $post['tid'] ] = $post;
}
else
{
$topics[ $post['tid'] ]['_maxPid'] = $post['archive_id'];
$topics[ $post['tid'] ]['_pids']++;
}
/* Collect fids */
$forums[ $post['forum_id'] ] = $post['forum_id'];
}
/* Get the maxes */
/* junk!!!
$this->DB->build( array( 'select' => 'topic_id, MAX(pid) as i',
'from' => 'posts',
'where' => 'topic_id IN (' . implode( ',', array_keys( $topics ) ) . ')',
'group' => 'topic_id' ) );
$o = $this->DB->execute();
while( $t = $this->DB->fetch( $o ) )
{
$maxes[ $t['topic_id'] ] = intval( $t['i'] );
}
*/
foreach( array_keys( $topics ) as $t )
{
$maxes[ $t ] = intval( $this->engine->getMaxPidInTid( $t ) );
}
/* Figure out how many topics have been completed */
foreach( $topics as $tid => $data )
{
/* First pid matches topic first pid, so we have the first post in the topic
* but have we got all the posts in this topic?
*/
if ( $maxes[ $tid ] == $data['_maxPid'] )
{
$completedTopics[] = $data['tid'];
}
else if ( $maxes[ $tid ] > $data['_maxPid'] )
{
/* If this is true, the local post table has a higher PID than the archive table
and this should never happen, so lets investigate */
$_topic = $this->DB->buildAndFetch( array( 'select' => 'posts', 'from' => 'topics', 'where' => 'tid=' . intval( $tid ) ) );
$_post = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', 'from' => 'posts', 'where' => 'topic_id=' . intval( $tid ) ) );
/* Local database has all the data.. so lets call it done */
if ( ( $_topic['posts'] + 1 ) == $_post['count'] )
{
$completedTopics[] = $data['tid'];
}
else
{
/* Be cautious */
$workingTopics[] = $data['tid'];
}
}
else
{
$workingTopics[] = $data['tid'];
}
}
/* Update completed */
if ( count( $completedTopics ) )
{
$this->DB->update( 'topics', array( 'topic_archive_status' => $this->registry->class_forums->fetchTopicArchiveFlag( 'exclude' ) ), 'tid IN(' . implode( ',', $completedTopics ) . ')' );
/* Archive attachments */
$class_attach->bulkUnarchive( $completedTopics, 'attach_parent_id' );
/* Remove posts */
$this->engine->removePostsByTids( $completedTopics );
}
/* Flag as archived */
$this->engine->setAsRestoredByPids( array_keys ( $posts ) );
/* Do forums */
foreach( $forums as $id )
{
$this->registry->class_forums->forumRebuild( $id );
}
/* Log it */
$this->log( array_keys ( $posts ), true );
}
/**
* Process a batch. Genius.
* $options is an array of keys and values:
* process - INT - number of items to process in this batch
* @return int count of topics archived
*/
public function processBatch( $options=array() )
{
$restoreData = $this->getRestoreData();
$topics = array();
$forums = array();
$pids = array();
/* Fix up options */
$options['process'] = ( is_numeric( $options['process'] ) && $options['process'] > 0 ) ? $options['process'] : 250;
if ( ! $restoreData['restore_min_tid'] && ! $restoreData['restore_max_tid'] && ! count( $restoreData['restore_manual_tids'] ) )
{
return false;
}
/* Any manually flagged? */
if ( count( $restoreData['restore_manual_tids'] ) )
{
/* Select remaining Pids */
$pids = $this->engine->getPidsInTids( IPSLib::cleanIntArray( array_keys( $restoreData['restore_manual_tids'] ) ), $options['process'] );
/* Did we complete topics? */
foreach( $restoreData['restore_manual_tids'] as $tid => $maxPid )
{
if ( in_array( $maxPid, array_keys( $pids ) ) )
{
$this->deleteManualId( $tid );
}
}
/* All done? */
if ( ! count( $pids ) )
{
$restoreData['restore_manual_tids'] = array();
$this->setRestoreData( $restoreData );
}
/* Update process for below */
$options['process'] -= count( $pids );
}
/* Now fetch the max/min if archiver is on */
if ( $this->settings['archive_on'] && $options['process'] > 0 && $restoreData['restore_min_tid'] && $restoreData['restore_max_tid'] )
{
$date = IPS_UNIX_TIME_NOW - ( 86400 * intval( $this->settings['archive_restore_days'] ) );
$pids = $this->engine->getPidsBetweenTidsAndDate( $restoreData['restore_min_tid'], $restoreData['restore_max_tid'], $date, $options['process'] );
/* All done? */
if ( ! count( $pids ) )
{
$restoreData['restore_min_tid'] = 0;
$restoreData['restore_max_tid'] = 0;
$this->setRestoreData( $restoreData );
}
}
/* Process */
$this->restore( $pids );
return count( $pids );
}
/**
* Flag an item for manual unarchive
* @param int $id
*/
public function setManualUnarchive( $id )
{
/* Init */
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/topics.php", 'app_forums_classes_topics', 'forums' );
$topicClass = new $classToLoad( $this->registry );
$topic = $topicClass->getTopicById( $id );
if ( $topic['tid'] && $this->registry->class_forums->fetchArchiveTopicType( $topic ) == 'archived' )
{
$topicClass->updateTopic( $topic['tid'], array( 'topic_archive_status' => $this->registry->class_forums->fetchTopicArchiveFlag('restore') ) );
$this->insertManualId( $id );
}
}
/**
* Add an ID to the manual restore filter
*/
public function insertManualId( $id )
{
$data = $this->getRestoreData();
$max = $this->engine->getMaxPidInTid( $id );
$data['restore_manual_tids'][ $id ] = $max;
$this->setRestoreData( $data );
}
/**
* Delete an ID from the manual restore filter
*/
public function deleteManualId( $id )
{
$data = $this->getRestoreData();
if ( in_array( $id, array_keys( $data['restore_manual_tids'] ) ) )
{
unset( $data['restore_manual_tids'][ $id ] );
$this->setRestoreData( $data );
}
}
/**
* Get restore data
*/
public function getRestoreData()
{
$data = $this->DB->buildAndFetch( array( 'select' => '*',
'from' => 'core_archive_restore' ) );
if ( IPSLib::isSerialized( $data['restore_manual_tids'] ) )
{
$data['restore_manual_tids'] = unserialize( $data['restore_manual_tids'] );
}
else
{
$data['restore_manual_tids'] = array();
}
return $data;
}
/**
* Set restore data
* @param array
*/
public function setRestoreData( $data )
{
if ( is_array( $data['restore_manual_tids'] ) )
{
$data['restore_manual_tids'] = serialize( $data['restore_manual_tids'] );
}
$data['restore_min_tid'] = intval( $data['restore_min_tid'] );
$data['restore_max_tid'] = intval( $data['restore_max_tid'] );
$this->DB->delete( 'core_archive_restore');
$this->DB->insert( 'core_archive_restore', $data );
}
/**
* Take an archive row and returned native friendly array
* @param array $post
* @return array
*/
public function archiveToNativeFields( $post )
{
$native = array( 'pid' => intval( $post['archive_id'] ),
'author_id' => intval( $post['archive_author_id'] ),
'author_name' => $post['archive_author_name'],
'ip_address' => $post['archive_ip_address'],
'post_date' => intval( $post['archive_content_date'] ),
'post' => $post['archive_content'],
'queued' => $post['archive_queued'],
'topic_id' => intval( $post['archive_topic_id'] ),
'new_topic' => intval( $post['archive_is_first'] ),
'post_bwoptions' => $post['archive_bwoptions'],
'post_key' => $post['archive_attach_key'],
'post_htmlstate' => $post['archive_html_mode'],
'use_sig' => $post['archive_show_signature'],
'use_emo' => $post['archive_show_emoticons'],
'append_edit' => $post['archive_show_edited_by'],
'edit_time' => $post['archive_edit_time'],
'edit_name' => $post['archive_edit_name'],
'post_edit_reason' => $post['archive_edit_reason'] );
return $native;
}
/**
* Logs archive action
* @param array $ids
*/
public function log( $ids )
{
$this->DB->insert( 'core_archive_log', array( 'archlog_date' => IPS_UNIX_TIME_NOW,
'archlog_app' => $this->getApp(),
'archlog_ids' => serialize( $ids ),
'archlog_is_restore' => 1,
'archlog_count' => count( $ids ) ) );
}
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* Archive: Reader
* By Matt Mecham
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2010 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @since 18th November 2011
* @version $Revision: 8644 $
*/
/**
* Restores topics that are either manually flagged or via settings
* from the Admin CP.
*
* Manually flagged topics are always restored first.
* @author matt
*
*/
class classes_archive_restore
{
/**#@+
* Registry objects
*
* @access protected
* @var object
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $caches;
/**#@-*/
/**
* Set current app
*/
private $_app = '';
/**
* Constructor
*
*/
public function __construct()
{
/* Make registry objects */
$this->registry = ipsRegistry::instance();
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
/* Check for class_forums */
if ( ipsRegistry::isClassLoaded('class_forums') !== TRUE )
{
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php", 'class_forums', 'forums' );
$this->registry->setClass( 'class_forums', new $classToLoad( $this->registry ) );
$this->registry->class_forums->forumsInit();
}
/* Language class */
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' );
/* Fetch engine class */
$this->settings['archive_engine'] = ( $this->settings['archive_engine'] ) ? $this->settings['archive_engine'] : 'sql';
/* Load up archive class */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/archive/restore/' . $this->settings['archive_engine'] . '.php', 'classes_archive_restore_' . $this->settings['archive_engine'] );
$this->engine = new $classToLoad();
}
/**
* Set the current application
* @param string $app
*/
public function setApp( $app )
{
$this->_app = $app;
}
/**
* Get the application
* @return string
*/
public function getApp()
{
return $this->_app;
}
/**
* Restore posts to the topic
* @param array INTS
*/
public function restore( $pids=array() )
{
if ( ! count( $pids ) )
{
return null;
}
$topics = array();
$forumIds = array();
$completedTopics = array();
$workingTopics = array();
$maxes = array();
/* Load the attachments stuff */
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' );
$class_attach = new $classToLoad( $this->registry );
$class_attach->type = 'post';
$class_attach->init();
/* Load the attachments stuff */
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/topics.php', 'app_forums_classes_topics' );
$topicClass = new $classToLoad( $this->registry );
/* Fetch data based on PIDs */
$posts = $topicClass->getPosts( array( 'postId' => $pids,
'sortField' => 'pid',
'sortOrder' => 'asc',
'postType' => array('visible', 'sdelete', 'hidden', 'pdelete', 'oktoremove'),
'skipForumCheck' => true,
'isArchivedTopic' => true ) );
foreach( $posts as $pid => $post )
{
/* Write it */
$this->engine->set( $post );
/* Collect some data */
if ( ! in_array( $post['tid'], $topics ) )
{
$post['_pids'] = 1;
$post['_lowPid'] = $post['archive_id'];
$post['_maxPid'] = $post['archive_id'];
$post['_topicCount'] = ( intval( $post['posts'] ) + intval( $post['topic_deleted_posts'] ) + intval( $post['topic_queuedposts'] ) + 1 );
$topics[ $post['tid'] ] = $post;
}
else
{
$topics[ $post['tid'] ]['_maxPid'] = $post['archive_id'];
$topics[ $post['tid'] ]['_pids']++;
}
/* Collect fids */
$forums[ $post['forum_id'] ] = $post['forum_id'];
}
foreach( $topics AS $k => $v )
{
$topics[$k]['_realMaxPid'] = $this->engine->getMaxPidInTid( $k );
}
/* Get the maxes */
$this->DB->build( array( 'select' => 'topic_id, MAX(pid) as i',
'from' => 'posts',
'where' => 'topic_id IN (' . implode( ',', array_keys( $topics ) ) . ')',
'group' => 'topic_id' ) );
$o = $this->DB->execute();
while( $t = $this->DB->fetch( $o ) )
{
$maxes[ $t['topic_id'] ] = intval( $t['i'] );
}
/* Figure out how many topics have been completed */
foreach( $topics as $tid => $data )
{
/* First pid matches topic first pid, so we have the first post in the topic
* but have we got all the posts in this topic?
*/
if ( $maxes[ $tid ] == $data['_realMaxPid'] )
{
$completedTopics[] = $data['tid'];
}
else if ( $maxes[ $tid ] > $data['_realMaxPid'] )
{
/* If this is true, the local post table has a higher PID than the archive table
and this should never happen, so lets investigate */
$_topic = $this->DB->buildAndFetch( array( 'select' => 'posts', 'from' => 'topics', 'where' => 'tid=' . intval( $tid ) ) );
$_post = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count', 'from' => 'posts', 'where' => 'topic_id=' . intval( $tid ) ) );
/* Local database has all the data.. so lets call it done */
if ( ( $_topic['posts'] + 1 ) == $_post['count'] )
{
$completedTopics[] = $data['tid'];
}
else
{
/* Be cautious */
$workingTopics[] = $data['tid'];
}
}
else
{
$workingTopics[] = $data['tid'];
}
}
/* Update completed */
if ( count( $completedTopics ) )
{
$this->DB->update( 'topics', array( 'topic_archive_status' => $this->registry->class_forums->fetchTopicArchiveFlag( 'exclude' ) ), 'tid IN(' . implode( ',', $completedTopics ) . ')' );
/* Archive attachments */
$class_attach->bulkUnarchive( $completedTopics, 'attach_parent_id' );
/* Remove posts */
$this->engine->removePostsByTids( $completedTopics );
}
/* Flag as archived */
$this->engine->setAsRestoredByPids( $pids );
/* Do forums */
foreach( $forums as $id )
{
$this->registry->class_forums->forumRebuild( $id );
}
/* Log it */
$this->log( $pids, true );
}
/**
* Process a batch. Genius.
* $options is an array of keys and values:
* process - INT - number of items to process in this batch
* @return int count of topics archived
*/
public function processBatch( $options=array() )
{
$restoreData = $this->getRestoreData();
$topics = array();
$forums = array();
$pids = array();
/* Fix up options */
$options['process'] = ( is_numeric( $options['process'] ) && $options['process'] > 0 ) ? $options['process'] : 250;
if ( ! $restoreData['restore_min_tid'] && ! $restoreData['restore_max_tid'] && ! count( $restoreData['restore_manual_tids'] ) )
{
return false;
}
/* Any manually flagged? */
if ( count( $restoreData['restore_manual_tids'] ) )
{
/* Select remaining Pids */
$pids = $this->engine->getPidsInTids( IPSLib::cleanIntArray( array_keys( $restoreData['restore_manual_tids'] ) ), $options['process'] );
/* Did we complete topics? */
foreach( $restoreData['restore_manual_tids'] as $tid => $maxPid )
{
if ( in_array( $maxPid, array_keys( $pids ) ) )
{
$this->deleteManualId( $tid );
}
}
/* All done? */
if ( ! count( $pids ) )
{
$restoreData['restore_manual_tids'] = array();
$this->setRestoreData( $restoreData );
}
/* Update process for below */
$options['process'] -= count( $pids );
}
/* Now fetch the max/min if archiver is on */
if ( $this->settings['archive_on'] && $options['process'] > 0 && $restoreData['restore_min_tid'] && $restoreData['restore_max_tid'] )
{
$date = IPS_UNIX_TIME_NOW - ( 86400 * intval( $this->settings['archive_restore_days'] ) );
$pids = $this->engine->getPidsBetweenTidsAndDate( $restoreData['restore_min_tid'], $restoreData['restore_max_tid'], $date, $options['process'] );
/* All done? */
if ( ! count( $pids ) )
{
$restoreData['restore_min_tid'] = 0;
$restoreData['restore_max_tid'] = 0;
$this->setRestoreData( $restoreData );
}
}
/* Process */
$this->restore( $pids );
return count( $pids );
}
/**
* Flag an item for manual unarchive
* @param int $id
*/
public function setManualUnarchive( $id )
{
/* Init */
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/topics.php", 'app_forums_classes_topics', 'forums' );
$topicClass = new $classToLoad( $this->registry );
$topic = $topicClass->getTopicById( $id );
if ( $topic['tid'] && $this->registry->class_forums->fetchArchiveTopicType( $topic ) == 'archived' )
{
$topicClass->updateTopic( $topic['tid'], array( 'topic_archive_status' => $this->registry->class_forums->fetchTopicArchiveFlag('restore') ) );
$this->insertManualId( $id );
}
}
/**
* Add an ID to the manual restore filter
*/
public function insertManualId( $id )
{
$data = $this->getRestoreData();
$max = $this->engine->getMaxPidInTid( $id );
$data['restore_manual_tids'][ $id ] = $max;
$this->setRestoreData( $data );
}
/**
* Delete an ID from the manual restore filter
*/
public function deleteManualId( $id )
{
$data = $this->getRestoreData();
if ( in_array( $id, array_keys( $data['restore_manual_tids'] ) ) )
{
unset( $data['restore_manual_tids'][ $id ] );
$this->setRestoreData( $data );
}
}
/**
* Get restore data
*/
public function getRestoreData()
{
$data = $this->DB->buildAndFetch( array( 'select' => '*',
'from' => 'core_archive_restore' ) );
if ( IPSLib::isSerialized( $data['restore_manual_tids'] ) )
{
$data['restore_manual_tids'] = unserialize( $data['restore_manual_tids'] );
}
else
{
$data['restore_manual_tids'] = array();
}
return $data;
}
/**
* Set restore data
* @param array
*/
public function setRestoreData( $data )
{
if ( is_array( $data['restore_manual_tids'] ) )
{
$data['restore_manual_tids'] = serialize( $data['restore_manual_tids'] );
}
$data['restore_min_tid'] = intval( $data['restore_min_tid'] );
$data['restore_max_tid'] = intval( $data['restore_max_tid'] );
$this->DB->delete( 'core_archive_restore');
$this->DB->insert( 'core_archive_restore', $data );
}
/**
* Take an archive row and returned native friendly array
* @param array $post
* @return array
*/
public function archiveToNativeFields( $post )
{
$native = array( 'pid' => intval( $post['archive_id'] ),
'author_id' => intval( $post['archive_author_id'] ),
'author_name' => $post['archive_author_name'],
'ip_address' => $post['archive_ip_address'],
'post_date' => intval( $post['archive_content_date'] ),
'post' => $post['archive_content'],
'queued' => $post['archive_queued'],
'topic_id' => intval( $post['archive_topic_id'] ),
'new_topic' => intval( $post['archive_is_first'] ),
'post_bwoptions' => $post['archive_bwoptions'],
'post_key' => $post['archive_attach_key'],
'post_htmlstate' => $post['archive_html_mode'],
'use_sig' => $post['archive_show_signature'],
'use_emo' => $post['archive_show_emoticons'],
'append_edit' => $post['archive_show_edited_by'],
'edit_time' => $post['archive_edit_time'],
'edit_name' => $post['archive_edit_name'],
'post_edit_reason' => $post['archive_edit_reason'] );
return $native;
}
/**
* Logs archive action
* @param array $ids
*/
public function log( $ids )
{
$this->DB->insert( 'core_archive_log', array( 'archlog_date' => IPS_UNIX_TIME_NOW,
'archlog_app' => $this->getApp(),
'archlog_ids' => serialize( $ids ),
'archlog_is_restore' => 1,
'archlog_count' => count( $ids ) ) );
}
}
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com/">IP.Board</a>
IP.Board
</body>
</html>
@@ -1,175 +1,175 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Archive: Restore
* By Matt Mecham
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2010 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @since 17th February 2010
* @version $Revision: 8644 $
*/
class classes_archive_restore_sql extends classes_archive_restore
{
public function __construct()
{
/* Make registry objects */
$this->registry = ipsRegistry::instance();
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
/* Do we have a remote DB? */
if ( $this->settings['archive_remote_sql_database'] && $this->settings['archive_remote_sql_user'] )
{
if ( ! is_object( $this->registry->dbFunctions()->getDB('remoteArchive') ) )
{
$this->registry->dbFunctions()->setDB( 'mysql', 'remoteArchive', array( 'sql_database' => $this->settings['archive_remote_sql_database'],
'sql_user' => $this->settings['archive_remote_sql_user'],
'sql_pass' => $this->settings['archive_remote_sql_pass'],
'sql_host' => $this->settings['archive_remote_sql_host'],
'sql_charset' => $this->settings['archive_remote_sql_charset'],
'sql_tbl_prefix' => $this->settings['sql_tbl_prefix'],
'catchConnectionError' => true ) );
$this->remoteDB = $this->registry->dbFunctions()->getDB('remoteArchive');
/* Check for connection issue */
if ( $this->remoteDB->error )
{
$this->connectError = $this->remoteDB->error;
$this->remoteDB = null;
$this->registry->dbFunctions()->unsetDB('remoteArchive');
}
}
else
{
$this->remoteDB = $this->registry->dbFunctions()->getDB('remoteArchive');
/* Check for connection issue */
if ( $this->remoteDB->error )
{
$this->connectError = $this->remoteDB->error;
$this->remoteDB = null;
$this->registry->dbFunctions()->unsetDB('remoteArchive');
}
}
}
else
{
$this->remoteDB = $this->DB;
}
}
/**
* Get max PID in a TID
*/
public function getMaxPidInTid( $tid )
{
$max = $this->remoteDB->buildAndFetch( array( 'select' => 'MAX(archive_id) as i', 'from' => 'forums_archive_posts', 'where' => 'archive_topic_id=' . intval( $tid ) ) );
return $max['i'];
}
/**
* Fetch by TIDS
*/
public function getPidsInTids( array $tids, $limit=50 )
{
$pids = array();
/* Select remaining Pids */
$this->remoteDB->build( array( 'select' => 'archive_id',
'from' => 'forums_archive_posts',
'where' => 'archive_topic_id IN(' . implode( ',', $tids ) . ') AND archive_restored=0',
'order' => 'archive_topic_id ASC, archive_id ASC',
'limit' => array( 0, $limit ) ) );
$o = $this->remoteDB->execute();
while( $post = $this->remoteDB->fetch( $o ) )
{
$pids[ $post['archive_id'] ] = $post['archive_id'];
}
return $pids;
}
/**
* Fetch between TIDS and date
*
*/
public function getPidsBetweenTidsAndDate( $min, $max, $date=0, $limit=50 )
{
$this->remoteDB->build( array( 'select' => 'archive_id',
'from' => 'forums_archive_posts',
'where' => 'archive_content_date > ' . $date . ' AND archive_topic_id BETWEEN ' . intval( $min ) . ' AND ' . intval( $max ) . ' AND archive_restored = 0',
'order' => 'archive_topic_id ASC, archive_id ASC',
'limit' => array( 0, $limit ) ) );
$o = $this->remoteDB->execute();
while( $post = $this->remoteDB->fetch( $o ) )
{
$pids[ $post['archive_id'] ] = $post['archive_id'];
}
return $pids;
}
/**
* Remove posts by TIDs
* @param array TIDS
*/
public function removePostsByTids( array $tids )
{
if ( count( $tids ) )
{
$this->remoteDB->delete( 'forums_archive_posts', 'archive_topic_id IN(' . implode( ',', $tids ) . ')' );
}
}
/**
* Remove posts by PIDs
* @param array PIDs
*/
public function setAsRestoredByPids( array $pids )
{
if ( count( $pids ) )
{
$this->DB->update( 'forums_archive_posts', array( 'archive_restored' => 1 ), 'archive_id IN (' . implode( ',', $pids ) .')' );
}
}
/**
* Write single entry to DB
* @param array INTS
*/
public function set( $data=array() )
{
if ( ! count( $data ) )
{
return null;
}
$this->DB->replace( 'posts', $this->archiveToNativeFields( $data ), array( 'pid' ) );
}
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* Archive: Restore
* By Matt Mecham
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2010 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @since 17th February 2010
* @version $Revision: 8644 $
*/
class classes_archive_restore_sql extends classes_archive_restore
{
public function __construct()
{
/* Make registry objects */
$this->registry = ipsRegistry::instance();
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
/* Do we have a remote DB? */
if ( $this->settings['archive_remote_sql_database'] && $this->settings['archive_remote_sql_user'] )
{
if ( ! is_object( $this->registry->dbFunctions()->getDB('remoteArchive') ) )
{
$this->registry->dbFunctions()->setDB( 'mysql', 'remoteArchive', array( 'sql_database' => $this->settings['archive_remote_sql_database'],
'sql_user' => $this->settings['archive_remote_sql_user'],
'sql_pass' => $this->settings['archive_remote_sql_pass'],
'sql_host' => $this->settings['archive_remote_sql_host'],
'sql_charset' => $this->settings['archive_remote_sql_charset'],
'sql_tbl_prefix' => $this->settings['sql_tbl_prefix'],
'catchConnectionError' => true ) );
$this->remoteDB = $this->registry->dbFunctions()->getDB('remoteArchive');
/* Check for connection issue */
if ( $this->remoteDB->error )
{
$this->connectError = $this->remoteDB->error;
$this->remoteDB = null;
$this->registry->dbFunctions()->unsetDB('remoteArchive');
}
}
else
{
$this->remoteDB = $this->registry->dbFunctions()->getDB('remoteArchive');
/* Check for connection issue */
if ( $this->remoteDB->error )
{
$this->connectError = $this->remoteDB->error;
$this->remoteDB = null;
$this->registry->dbFunctions()->unsetDB('remoteArchive');
}
}
}
else
{
$this->remoteDB = $this->DB;
}
}
/**
* Get max PID in a TID
*/
public function getMaxPidInTid( $tid )
{
$max = $this->remoteDB->buildAndFetch( array( 'select' => 'MAX(archive_id) as i', 'from' => 'forums_archive_posts', 'where' => 'archive_topic_id=' . intval( $tid ) ) );
return $max['i'];
}
/**
* Fetch by TIDS
*/
public function getPidsInTids( array $tids, $limit=50 )
{
$pids = array();
/* Select remaining Pids */
$this->remoteDB->build( array( 'select' => 'archive_id',
'from' => 'forums_archive_posts',
'where' => 'archive_topic_id IN(' . implode( ',', $tids ) . ') AND archive_restored=0',
'order' => 'archive_topic_id ASC, archive_id ASC',
'limit' => array( 0, $limit ) ) );
$o = $this->remoteDB->execute();
while( $post = $this->remoteDB->fetch( $o ) )
{
$pids[ $post['archive_id'] ] = $post['archive_id'];
}
return $pids;
}
/**
* Fetch between TIDS and date
*
*/
public function getPidsBetweenTidsAndDate( $min, $max, $date=0, $limit=50 )
{
$this->remoteDB->build( array( 'select' => 'archive_id',
'from' => 'forums_archive_posts',
'where' => 'archive_restored = 0 AND archive_content_date > ' . $date . ' AND archive_topic_id BETWEEN ' . intval( $min ) . ' AND ' . intval( $max ),
'order' => 'archive_topic_id ASC, archive_id ASC',
'limit' => array( 0, $limit ) ) );
$o = $this->remoteDB->execute();
while( $post = $this->remoteDB->fetch( $o ) )
{
$pids[ $post['archive_id'] ] = $post['archive_id'];
}
return $pids;
}
/**
* Remove posts by TIDs
* @param array TIDS
*/
public function removePostsByTids( array $tids )
{
if ( count( $tids ) )
{
$this->remoteDB->delete( 'forums_archive_posts', 'archive_topic_id IN(' . implode( ',', $tids ) . ')' );
}
}
/**
* Remove posts by PIDs
* @param array PIDs
*/
public function setAsRestoredByPids( array $pids )
{
if ( count( $pids ) )
{
$this->remoteDB->update( 'forums_archive_posts', array( 'archive_restored' => 1 ), 'archive_id IN (' . implode( ',', $pids ) .')' );
}
}
/**
* Write single entry to DB
* @param array INTS
*/
public function set( $data=array() )
{
if ( ! count( $data ) )
{
return null;
}
$this->DB->replace( 'posts', $this->archiveToNativeFields( $data ), array( 'pid' ) );
}
}
File diff suppressed because it is too large. Load diff
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com/">IP.Board</a>
IP.Board
</body>
</html>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Archive: Writer
* By Matt Mecham
* </pre>
+3 -3
View File
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Back Up Model
* Last Updated: $Date: 2012-05-10 21:10:13 +0100 (Thu, 10 May 2012) $
* </pre>
@@ -410,7 +410,7 @@ class ipsBackup
if ( ! file_put_contents( $this->_getBackUpKeyCacheFilename(), $contents ) )
{
trigger_error( 'Не удалось записать файл кэша системы резервного копиования' );
trigger_error( 'Could not save cache file for back up system' );
}
/* Reset table pkeys */
@@ -726,7 +726,7 @@ class ipsBackup
*/
private function _getBackupServerUrl()
{
return 'http://gateway.backuptest.lw.ipslink.com/index.php';
//return 'http://gateway.backuptest.lw.ipslink.com/index.php';
}
/**
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Back Up Model
* Last Updated: $Date: 2012-05-10 21:10:13 +0100 (Thu, 10 May 2012) $
* </pre>
File diff suppressed because it is too large. Load diff
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* IP.Content custom bbcode
* Last Updated: $Date: 2012-06-01 13:11:08 -0400 (Fri, 01 Jun 2012) $
* </pre>
File diff suppressed because it is too large. Load diff
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com/">IP.Board</a>
IP.Board
</body>
</html>
+1 -1
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Simple caching class
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Control Panel Functions
* Last Updated: $Date: 2012-11-21 14:26:15 -0500 (Wed, 21 Nov 2012) $
* </pre>
File diff suppressed because it is too large. Load diff
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* ACP Restrictions
* Last Updated: $Date: 2013-01-22 16:10:36 -0500 (Tue, 22 Jan 2013) $
* </pre>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Manages public permissions
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Facilitates reputation plugins
* Last Updated: $Date: 2013-03-05 09:42:55 -0500 (Tue, 05 Mar 2013) $
* </pre>
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Task Manager Library
* Last Updated: $Date: 2012-09-18 10:15:15 -0400 (Tue, 18 Sep 2012) $
* </pre>
@@ -7,7 +7,7 @@
* @license http://www.invisionpower.com/company/standards.php#license
* @package Core
* @link http://www.invisionpower.com
* @version $Rev: 12266 $
* @version $Rev: 12380 $
*
*/
@@ -23,7 +23,7 @@ class classes_comments_bootstrap
/**
* Construct
*
*
* @param string Comment class key (app-section)
* @param mixed Optional extra data to pass to init() method
*/
@@ -80,7 +80,7 @@ abstract class classes_comments_renderer
protected $memberData;
protected $cache;
protected $caches;
/**#@-*/
/**#@-*/
protected $_cache = array();
/**
@@ -362,6 +362,7 @@ abstract class classes_comments_renderer
$data['thisApp'] = $app;
$data['repType'] = $_remap['comment_id'];
$data['enableRep'] = $this->reputationEnabled();
$data['baseUrl'] = "app=core&amp;module=global&amp;section=comments&amp;parentId={$parent['parent_id']}&amp;fromApp={$data['fromApp']}";
/* Give plugin a chance to adjust */
$adjusted = $this->preOutputAdjustment( 'commentSingle', array( 'comment' => $comment, 'data' => $data, 'parent' => $parent ) );
@@ -527,7 +528,7 @@ abstract class classes_comments_renderer
/* Ignored users */
foreach( $this->member->ignored_users as $_i )
{
if( $_i['ignore_topics'] AND $_i['ignore_ignore_id'] == $row['author_id'] )
if( $_i['ignore_topics'] AND $_i['ignore_ignore_id'] == $row['comment_author_id'] )
{
if ( ! strstr( $this->settings['cannot_ignore_groups'], ','.$row['member_group_id'].',' ) )
{
@@ -543,6 +544,15 @@ abstract class classes_comments_renderer
$row['pp_reputation_points'] = $row['pp_reputation_points'] ? $row['pp_reputation_points'] : 0;
$row['has_given_rep'] = $row['has_given_rep'] ? $row['has_given_rep'] : 0;
$row['rep_points'] = $this->registry->repCache->getRepPoints( array( 'app' => $app, 'type' => $_remap['comment_id'], 'type_id' => $row['comment_id'], 'rep_points' => $row['rep_points'] ) );
if ( ! ( $this->settings['reputation_protected_groups'] && in_array( $this->memberData['member_group_id'], explode( ',', $this->settings['reputation_protected_groups'] ) ) ) && $this->memberData['_members_cache']['rep_filter'] !== '*' )
{
if ( $this->settings['reputation_show_content'] && $row['rep_points'] < $this->memberData['_members_cache']['rep_filter'] && $this->settings['reputation_point_types'] != 'like' )
{
$row['_repignored'] = true;
}
}
}
/* View */
@@ -761,7 +771,7 @@ abstract class classes_comments_renderer
}
return true;
}
}
/**
* Unhide a comment
@@ -913,7 +923,7 @@ abstract class classes_comments_renderer
* @return nowt lad
*/
public function sendNotifications( array $array, $comment )
{
{
list( $_app, $_area ) = explode( '-', $this->whoAmI() );
/* Send them if they are approved */
@@ -1109,7 +1119,7 @@ abstract class classes_comments_renderer
/* Delete */
$this->DB->delete( $this->table(), $_remap['comment_id'] . ' IN (' . implode( ",", $cids ) . ')' );
/* We also need to delete rep - Bug #37686 */
/* We also need to delete rep - Bug #37686 */
list( $app, $_where ) = explode( '-', $this->whoAmI() );
foreach( $cids as $cid )
@@ -1203,7 +1213,7 @@ abstract class classes_comments_renderer
/* If we have anything.. */
if ( count( $cids ) )
{
{
/* Update array */
$array = array( 'comment_approved' => ( $toggle == 'on' ? 1 : 0 ) );
@@ -1453,7 +1463,7 @@ abstract class classes_comments_renderer
$pages = ceil( $number);
}
$st = ($pages - 1) * $this->perPage();
$st = ($pages - 1) * $this->perPage();
if( $showApprovalMessage )
{
@@ -1697,7 +1707,7 @@ abstract class classes_comments_renderer
public function can( $type, array $array )
{
/* Default, so return least permissive */
return 'NO_PERMISSION';
return 'NO_PERMISSION';
}
/**
* Unpack the repuation cache, yo.
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Editor Library: Core Class
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Editor Library: RTE (WYSIWYG) Class
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -962,7 +962,7 @@ class class_editor_module extends class_editor
while ( $tag_begin_loc !== FALSE )
{
$lowtext = mb_strtolower($text);
$lowtext = strtolower($text);
$tag_begin_loc = @strpos( $lowtext, $open_tag, $start_search_pos );
$lentext = strlen($text);
$quoted = '';
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Editor Library: Standard Class
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -3,18 +3,18 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Editor Library: RTE (WYSIWYG) Class
* Last Updated: $Date: 2013-05-21 20:51:17 -0400 (Tue, 21 May 2013) $
* Last Updated: $Date: 2013-10-15 10:08:51 -0400 (Tue, 15 Oct 2013) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @since 9th March 2005 11:03
* @version $Revision: 12263 $
* @version $Revision: 12378 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -25,30 +25,30 @@ if ( ! defined( 'IN_IPB' ) )
/**
* In an effort to simplify all the bbcode routines:
*
*
* This class will take CKEditor HTML, clean it up and pass it on.
* This means [b] will be converted to <strong>, URLs auto-linked and so on.
* App specific BBCode ([entry] [topic]) and complex BBCode (CODE, QUOTE, MEDIA) are not parsed.
*
*
* Likewise, when showing the editor, you should supply it with data in the same format: that is, parsed HTML
* with complex app specific BBCode unparsed. A good example of this would be:
* <strong>I am strong!</strong><br />[quote]I am a quote![/quote]
*
*
* -- Legacy Issues --
* If the setContent method detects legacy markup (that is, unparsed basic BBCode such as [b]) then it
* will first convert it to the standard that it expects for input (HTML parsed, complex or app specific bbcode not parsed)
*
*
* If setLegacyMode is true, this class will return BBCode mark-up as expected of 3.3.x and older.
* This is recommended for code in transition as it's largely buggy and rather annoying.
*
*
*
*
*
*
*
*
* Test input: < > ' " & ¦ $ \ ! &amp; &#39; &quot; &lt; &gt; &para;
* Should be processed as: &lt; &gt; &#39; &quot; &amp; ¦ $ &#92; ! &amp;amp; &amp;#39; &amp;quot; &amp;lt; &amp;gt; &amp;para;
*/
/**
*
*
* IP.Board PHP work to display an editor
* @author Matt
*
@@ -134,7 +134,7 @@ class classes_editor_composite
* Registry objects
*
* @var object
*/
*/
protected $registry;
protected $DB;
protected $settings;
@@ -468,9 +468,9 @@ class classes_editor_composite
if ( isset( $options['recover'] ) )
{
$content = $_POST['Post'];
$content = IPSText::xssMakeJavascriptSafe( $_POST['Post'] );
}
/* Try and sniff out entered HTML */
if ( IN_ACP AND empty( $options['isHtml'] ) )
{
@@ -613,7 +613,7 @@ class classes_editor_composite
{
$moredetails = "<a href='{$this->registry->getClass('output')->buildUrl( "app=members&amp;module=profile&amp;section=warnings" )}'>{$this->lang->words['warnings_moreinfo']}</a>";
}
else
else
{
$moredetails = "<a href='javascript:void(0);' onclick='warningPopup( this, {$warn['wl_id']} )'>{$this->lang->words['warnings_moreinfo']}</a>";
}
@@ -687,8 +687,11 @@ class classes_editor_composite
$content = $parser->htmlToEditor( $content );
}
$bbcodeVersion = '';
/* Make sure the textarea isn't terminated early */
$content = str_ireplace( '</textarea>', '&#60;/textarea>', $content );
$bbcodeVersion = '';
if ( $content )
{
$bbcodeVersion = $this->toPlainTextArea( $parser->postEditor( $content ) );
@@ -748,7 +751,7 @@ class classes_editor_composite
{
$parser = new class_text_parser_legacy();
$this->passSettings( $parser );
$content = $parser->postEditor( $content );
// @link http://community.invisionpower.com/resources/bugs.html/_/ip-board/encoded-text-is-replaced-when-quoting-on-mobile-devices-r40540
@@ -781,7 +784,7 @@ class classes_editor_composite
{
/* Some areas of IPB add quotes as HTML so turn it into BBCode so fromPlainTextArea can convert it back instead of htmlizing the < > chars */
if ( stristr( $content, '<blockquote' ) )
{
{
$content = $this->toPlainTextArea( $content );
}
@@ -836,10 +839,14 @@ class classes_editor_composite
$cleanContent = $this->protectMedia( $cleanContent );
/* Like nice neat code? Look away now */
if ( $this->getIsHtml() AND IN_ACP )
if ( $this->getIsHtml() AND IN_ACP AND str_replace( '<!-- isHtml:1 -->', '', $cleanContent ) !== '' )
{
$cleanContent = '<!-- isHtml:1 -->' . $cleanContent;
}
else
{
$cleanContent = str_replace( '<!-- isHtml:1 -->', '', $cleanContent );
}
/* Reset */
$this->setIsHtml( false );
@@ -965,7 +972,7 @@ class classes_editor_composite
/**
* Remove auto saved content
* @param array $where options member_id = x , app = x, time = x
* @param array $where options member_id = x , app = x, time = x
*/
public function removeAutoSavedContent( $where=array() )
{
@@ -1068,9 +1075,7 @@ class classes_editor_composite
*/
protected function protectMedia( $content )
{
$content = preg_replace( '#<a\s+?([^>]*?)href=["\']([^"\']+?)?["\']([^>]*?)?>(.+?)</a>#is', "<a data-ipb='nomediaparse' $1href='$2'$3>$4</a>" , $content );
//print htmlspecialchars($content);exit;
$content = preg_replace( '#<a\s+?([^>|data-ipb=\'nomediaparse\']*?)href=["\']([^"\']+?)?["\']([^>]*?)?>(.+?)</a>#is', "<a data-ipb='nomediaparse' $1href='$2'$3>$4</a>" , $content );
return $content;
}
@@ -1612,7 +1617,7 @@ class classes_editor_composite
. 'b,strong,i,em,u,strike,del,sup,sub,'
/* LISTS */
. 'ol[type|start|class],ul[type|class],li,'
/* IMG, A */
/* IMG, A */
. 'img[src|width|height|title],a[href|target|title|class|rel]';
if ( count( $disabledTags ) )
@@ -1715,7 +1720,7 @@ class classes_editor_composite
* @return object
*/
private function _newParserObject()
{
{
/* Load parser */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser' );
$parser = new $classToLoad();
@@ -1861,7 +1866,7 @@ class classes_editor_composite
if ( stristr( $content, '<' . $tag ) || stristr( $content, '&lt;' . $tag ) )
{
return true;
}
}
}
}
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
File diff suppressed because it is too large. Load diff
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Parse Incoming Emails
* Last Updated: $Date: 2013-05-08 17:43:20 -0400 (Wed, 08 May 2013) $
* </pre>
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Item Marking
* Owner: Matt "Oh Lord, why did I get assigned this?" Mecham
* Last Updated: $Date: 2012-11-06 15:14:35 -0500 (Tue, 06 Nov 2012) $
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
+48 -21
View File
@@ -4,11 +4,11 @@
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* $Author: mmecham $
* @since 11th October 2010
* $LastChangedDate: 2013-05-17 19:05:15 -0400 (Fri, 17 May 2013) $
* @version v3.4.5
* $Revision: 12259 $
* $LastChangedDate: 2013-08-14 06:45:49 -0400 (Wed, 14 Aug 2013) $
* @version v3.4.6
* $Revision: 12334 $
*
* <b>Example Usage:</b>
* @code
@@ -658,6 +658,9 @@ abstract class classes_like_composite
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' );
$notifyLibrary = new $classToLoad( $this->registry );
$htmlMessage = array();
$textMessage = array();
foreach( $data as $row )
{
if ( ! $row['like_notify_freq'] OR ! in_array( $row['like_notify_freq'], $type ) )
@@ -689,44 +692,71 @@ abstract class classes_like_composite
{
continue;
}
/* Expensively process HTML/Text versions once per language.. <#NAME#> is converted to -members:members_display_name- for processing later */
if ( ! isset( $htmlMessage[ $row['language'] ] ) )
{
$buildMessage = array();
if ( is_array( $notificationOpts['build_message_array'] ) and count( $notificationOpts['build_message_array'] ) )
{
foreach( $notificationOpts['build_message_array'] as $k => $v )
{
$buildMessage[ $k ] = $v;
}
}
$buildMessage = array();
$buildMessage['UNSUBCRIBE_URL'] = '-member:unsubscribe_url-';
$notificationOpts['build_message_array']['UNSUBCRIBE_URL'] = '-member:unsubscribe_url-';
IPSText::getTextClass('email')->setPlainTextTemplate( IPSText::getTextClass('email')->getTemplate( $notificationOpts['email_template'], $row['language'], trim($notificationOpts['email_lang_file']), trim($notificationOpts['email_lang_app']) ) );
$textMessage[ $row['language'] ] = IPSText::getTextClass('email')->buildPlainTextContent( $buildMessage );
$htmlMessage[ $row['language'] ] = IPSText::getTextClass('email')->buildHtmlContent( $buildMessage );
}
$thisTextMessage = $textMessage[ $row['language'] ];
$thisHtmlMessage = $htmlMessage[ $row['language'] ];
/* Add in unsubscribe link */
$unsubKey = $row['like_app'] . ';' . $row['like_area'] . ';' . $row['like_rel_id'] . ';' . $row['like_member_id'] . ';' . $row['member_id'] . ';' . $row['email'];
$unsubUrl = $this->registry->output->buildSEOUrl( 'app=core&amp;module=global&amp;section=like&amp;do=unsubscribe&amp;key=' . IPSText::base64_encode_urlSafe( $unsubKey ), 'publicNoSession', 'unsubscribe', 'likeunsubscribe' );
/* Now process the dynamic replacements */
if ( is_array( $notificationOpts['build_message_array'] ) and count( $notificationOpts['build_message_array'] ) )
{
foreach( $notificationOpts['build_message_array'] as $k => $v )
{
if ( preg_match( '/\-member:(.+?)\-/', $v, $_matches ) )
{
$v = str_replace( $_matches[0], $row[$_matches[1]], $v );
if ( $_matches[1] == 'unsubscribe_url' )
{
$thisHtmlMessage = str_replace( $_matches[0], $unsubUrl, $thisHtmlMessage );
$thisTextMessage = str_replace( $_matches[0], $unsubUrl, $thisTextMessage );
}
else
{
$thisHtmlMessage = str_replace( $_matches[0], $row[ $_matches[1] ], $thisHtmlMessage );
$thisTextMessage = str_replace( $_matches[0], $row[ $_matches[1] ], $thisTextMessage );
}
}
$buildMessage[ $k ] = $v;
}
}
$sentToIds[] = $row['like_member_id'];
/* Add in unsubscribe link */
$key = $row['like_app'] . ';' . $row['like_area'] . ';' . $row['like_rel_id'] . ';' . $row['like_member_id'] . ';' . $row['member_id'] . ';' . $row['email'];
$buildMessage['UNSUBCRIBE_URL'] = $this->registry->output->buildSEOUrl( 'app=core&amp;module=global&amp;section=like&amp;do=unsubscribe&amp;key=' . IPSText::base64_encode_urlSafe( $key ), 'publicNoSession', 'unsubscribe', 'likeunsubscribe' );
IPSText::getTextClass('email')->setPlainTextTemplate( IPSText::getTextClass('email')->getTemplate( $notificationOpts['email_template'], $row['language'], trim($notificationOpts['email_lang_file']), trim($notificationOpts['email_lang_app']) ) );
IPSText::getTextClass('email')->buildPlainTextContent( $buildMessage );
$notifyLibrary->setMember( $row );
$notifyLibrary->setFrom( $notificationOpts['from'] ? $notificationOpts['from'] : $this->memberData );
$notifyLibrary->setNotificationKey( $notificationOpts['notification_key'] );
$notifyLibrary->setNotificationUrl( $notificationOpts['notification_url'] );
$notifyLibrary->setNotificationText( IPSText::getTextClass('email')->getPlainTextContent() );
$notifyLibrary->setNotificationTitle( $notificationOpts['email_subject'] ? $notificationOpts['email_subject'] : IPSText::getTextClass('email')->subject );
$notifyLibrary->setNotificationHtml( IPSText::getTextClass('email')->buildHtmlContent( $buildMessage ) );
$notifyLibrary->setNotificationText( $thisTextMessage );
$notifyLibrary->setNotificationHtml( $thisHtmlMessage );
if ( ! empty( $notificationOpts['email_only_subject'] ) && $notificationOpts['email_only_subject'] != IPSText::getTextClass('email')->subject )
{
$notifyLibrary->setEmailSubject( $notificationOpts['email_only_subject'], $row['language'], trim($notificationOpts['email_lang_file']), trim($notificationOpts['email_lang_app']) );
}
try
{
$notifyLibrary->sendNotification();
@@ -1455,10 +1485,7 @@ abstract class classes_like_composite
/* Need to apply secondary groups and grab g_perm_id if $parseMembers is false (default)
@link http://community.invisionpower.com/tracker/issue-34691-digest-notifications-not-going-out/ */
$row['mgroup_others'] = ($row['mgroup_others'] != '') ? IPSText::cleanPermString($row['mgroup_others']) : '';
//by denchu
if (is_array($this->caches['group_cache'][ $row['member_group_id'] ])){
$row = array_merge( $row, $this->caches['group_cache'][ $row['member_group_id'] ] );
}
$row = $this->registry->member()->setUpSecondaryGroups( $row );
if( $row['topic_last_post'] )
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Generic Mapping Class
* Owner: Matt Mecham
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Bing mapping class
* Owner: Matt Mecham
* Last Updated: $Date: 2013-04-30 21:56:42 -0400 (Tue, 30 Apr 2013) $
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Bing mapping class
* Owner: Matt Mecham
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
File diff suppressed because it is too large. Load diff
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Notification library
* Last Updated: $Date: 2012-10-30 18:24:46 -0400 (Tue, 30 Oct 2012) $
* Last Updated: $Date: 2013-10-16 12:57:41 -0400 (Wed, 16 Oct 2013) $
* </pre>
*
* @author $Author: AndyMillne $ (Original: bfarber)
@@ -14,7 +14,7 @@
* @package IP.Board
* @link http://www.invisionpower.com
* @since Thursday Jan 7, 2010
* @version $Revision: 11530 $
* @version $Revision: 12380 $
*
*/
@@ -395,7 +395,7 @@ class notifications
* @return array
*/
public function getNotificationData( $checkCallbacks=FALSE )
{
{
//-----------------------------------------
// Already stored the data?
//-----------------------------------------
@@ -554,7 +554,7 @@ class notifications
foreach( $missingTypes as $_type )
{
$_cache['notifications'][ $_type ] = $_default[ $_type ]['selected'];
$_cache['notifications'][ $_type ] = array( 'selected' => $_default[ $_type ]['selected'] );
}
//-----------------------------------------
@@ -845,7 +845,7 @@ class notifications
{
$this->DB->update( 'members', 'notification_cnt=notification_cnt+1', 'member_id=' . $member['member_id'], true, true );
}
}
}
return true;
}
@@ -1006,7 +1006,7 @@ class notifications
if ( count( $members ) )
{
foreach( $return as $key => $data )
{
{
if ( in_array( $data['notify_from_id'], array_keys( $members ) ) )
{
$return[ $key ]['member'] = IPSMember::buildProfilePhoto( $members[ $data['notify_from_id'] ] );
@@ -1321,7 +1321,7 @@ class notifications
}
return intval( $_limit );
}
}
/**
* Do we have an application class?
File diff suppressed because it is too large. Load diff
+40 -40
View File
@@ -3,7 +3,7 @@
* <pre>
* Status Updates Class
* Holds various functions
* Last Updated: $Date: 2013-02-13 11:25:39 -0500 (Wed, 13 Feb 2013) $
* Last Updated: $Date: 2013-10-16 12:57:41 -0400 (Wed, 16 Oct 2013) $
* </pre>
*
* @author $author$
@@ -12,7 +12,7 @@
* @package IP.Board
* @author MattMecham
* @link http://www.invisionpower.com
* @version $Rev: 11985 $
* @version $Rev: 12380 $
*
* Example: Create new status update
* <code>
@@ -59,7 +59,7 @@ class memberStatus
{
/**
* Registry Object Shortcuts
*
*
* @var object
*/
protected $registry;
@@ -90,7 +90,7 @@ class memberStatus
* Bypass all permission checks
*
* Use with care, this will allow the class to be used within an API
*
*
* @var boolean
*/
protected $_bypassPermChecks = false;
@@ -194,7 +194,7 @@ class memberStatus
* Fetch status actions
* Default filters are last 10 status actions from everyone sorted in desc date order.
* 'not_theirs' pulls all actions that are not on their own statuses
* @param mixed [Array of member data OR member ID INT for member updating their status - will use ->getAuthor() if null]
* @param mixed [Array of member data OR member ID INT for member updating their status - will use ->getAuthor() if null]
* @param array Array of sort/filter data ( member_id [int], status_id [int], offset [int], limit [int], unix_cutoff [int], sort_dir [asc,desc], sort_field [string], 'not_theirs' [0,1] )
*/
public function fetchActions( $author=null, $filters=array() )
@@ -302,8 +302,8 @@ class memberStatus
* The 'isApproved' flag can contain true, false or null (true, approved only, false, unapproved only, null both)
* The 'ignorePermissions' flag can be set to true (do not verify we can view) or false (pull only statuses we can see based on other filters), defaulting to false
* getCount - returns a count of all matches without the limit
*
* @param mixed [Array of member data OR member ID INT for member updating their status - will use ->getAuthor() if null]
*
* @param mixed [Array of member data OR member ID INT for member updating their status - will use ->getAuthor() if null]
* @param array Array of sort/filter data ( member_id [int], latest_only [0,1], offset [int], limit [int], unix_cutoff [int], sort_dir [asc,desc], sort_field [string], type [string] )
*/
public function fetch( $author=null, $filters=array() )
@@ -330,7 +330,7 @@ class memberStatus
if ( isset( $filters['relatedTo'] ) && ! empty( $filters['relatedTo'] ) )
{
$where[] = "s.status_member_id=" . intval( $filters['relatedTo'] ) . ' OR s.status_author_id=' . intval( $filters['relatedTo'] );
$where[] = "s.status_member_id=" . intval( $filters['relatedTo'] ) . ' OR s.status_author_id=' . intval( $filters['relatedTo'] );
}
if ( isset( $filters['ownerOnly'] ) )
@@ -418,7 +418,7 @@ class memberStatus
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=s.status_author_id',
'type' => 'left' ),
array(
array(
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'pp.pp_member_id=m.member_id',
'type' => 'left' ) ) ) );
@@ -508,7 +508,7 @@ class memberStatus
if ( is_array( $row['replies'] ) )
{
foreach( $row['replies'] as $rid => $r )
{
{
if ( $members[ $r['reply_member_id'] ] )
{
if ( ! isset( $members[ $r['reply_member_id'] ]['_done'] ) )
@@ -532,7 +532,7 @@ class memberStatus
* Fetch all replies to a status
* Default filters are sorted on reply_date ASC
*
* @param mixed [Array of member data OR member ID INT for member updating their status - will use ->getAuthor() if null]
* @param mixed [Array of member data OR member ID INT for member updating their status - will use ->getAuthor() if null]
* @param array Array of sort/filter data ( member_id [int], latest_only [0,1], offset [int], limit [int], unix_cutoff [int], sort_dir [asc,desc], sort_field [string] )
*/
public function fetchAllReplies( $status=null, $filters=array() )
@@ -697,7 +697,7 @@ class memberStatus
IPSText::getTextClass('email')->getTemplate( 'new_status', $friend['language'] );
IPSText::getTextClass('email')->buildMessage( $ndata );
$_subject = sprintf( IPSText::getTextClass('email')->subject,
$_subject = sprintf( IPSText::getTextClass('email')->subject,
$this->registry->output->buildSEOUrl( 'showuser=' . $owner['member_id'], 'publicNoSession', $owner['members_seo_name'], 'showuser' ),
$owner['members_display_name'],
$statusUrl );
@@ -765,7 +765,7 @@ class memberStatus
$this->_recordAction( 'reply', $author, $status, $data );
$this->rebuildStatus( $status );
$this->rebuildStatus( $status );
$this->rebuildOwnerLatest( $author );
$this->_sendNotification( $author, $status, $data );
@@ -784,10 +784,10 @@ class memberStatus
* @param int Status ID just posted
* @param array [Array of member data for member updating their status - will use ->getAuthor() if null]
* @param string [Content to update]
* @todo [Future] At some point it could be expanded into a mini framework with plugins
* @todo [Future] At some point it could be expanded into a mini framework with plugins
*/
protected function _triggerExternalUpdates( $updates, $status_id=0, $author=null, $content=null )
{
{
$author = ( $author === null ) ? $this->getAuthor() : $author;
$content = ( $content ) ? $this->_cleanContent( $content ) : $this->_cleanContent( $this->getContent() );
@@ -815,7 +815,7 @@ class memberStatus
if ( $updates['facebook'] )
{
if ( IPSLib::fbc_enabled() AND $author['fb_uid'] )
{
{
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/facebook/connect.php', 'facebook_connect' );
$facebook = new $classToLoad( $this->registry );
$facebook->updateStatusWithUrl( $content, $url, FALSE );
@@ -874,9 +874,9 @@ class memberStatus
IPSText::getTextClass('email')->buildMessage( $data );
IPSText::getTextClass('email')->subject = sprintf(
IPSText::getTextClass('email')->subject,
$this->registry->output->buildSEOUrl( 'showuser=' . $_replier['member_id'], 'public', $_replier['members_seo_name'], 'showuser' ),
IPSText::getTextClass('email')->subject = sprintf(
IPSText::getTextClass('email')->subject,
$this->registry->output->buildSEOUrl( 'showuser=' . $_replier['member_id'], 'public', $_replier['members_seo_name'], 'showuser' ),
$_replier['members_display_name'],
$statusUrl
);
@@ -904,7 +904,7 @@ class memberStatus
while( $row = $this->DB->fetch() )
{
$_ids[ $row['reply_member_id'] ] = $row['reply_member_id'];
}
}
if ( count( $_ids ) )
{
@@ -951,20 +951,20 @@ class memberStatus
if ( $_replier['member_id'] == $_owner['member_id'] )
{
IPSText::getTextClass('email')->subject = sprintf(
$this->lang->words['subject__their_status_reply'],
$this->registry->output->buildSEOUrl( 'showuser=' . $_replier['member_id'], 'public', $_replier['members_seo_name'], 'showuser' ),
IPSText::getTextClass('email')->subject = sprintf(
$this->lang->words['subject__their_status_reply'],
$this->registry->output->buildSEOUrl( 'showuser=' . $_replier['member_id'], 'public', $_replier['members_seo_name'], 'showuser' ),
$_replier['members_display_name'],
$statusUrl
);
}
else
{
IPSText::getTextClass('email')->subject = sprintf(
$this->lang->words['subject__other_status_reply'],
$this->registry->output->buildSEOUrl( 'showuser=' . $_replier['member_id'], 'public', $_replier['members_seo_name'], 'showuser' ),
IPSText::getTextClass('email')->subject = sprintf(
$this->lang->words['subject__other_status_reply'],
$this->registry->output->buildSEOUrl( 'showuser=' . $_replier['member_id'], 'public', $_replier['members_seo_name'], 'showuser' ),
$_replier['members_display_name'],
$this->registry->output->buildSEOUrl( 'showuser=' . $_owner['member_id'], 'public', $_owner['members_seo_name'], 'showuser' ),
$this->registry->output->buildSEOUrl( 'showuser=' . $_owner['member_id'], 'public', $_owner['members_seo_name'], 'showuser' ),
$_owner['members_display_name'],
$statusUrl
);
@@ -1017,9 +1017,9 @@ class memberStatus
'LINK' => $memberUrl
) );
IPSText::getTextClass('email')->subject = sprintf( IPSText::getTextClass('email')->subject,
IPSText::getTextClass('email')->subject = sprintf( IPSText::getTextClass('email')->subject,
$memberUrl,
$this->registry->output->buildSEOUrl( 'showuser=' . $author['member_id'], 'public', $author['members_seo_name'], 'showuser' ),
$this->registry->output->buildSEOUrl( 'showuser=' . $author['member_id'], 'public', $author['members_seo_name'], 'showuser' ),
$author['members_display_name'] );
$notifyLibrary->setMember( $owner );
@@ -1125,7 +1125,7 @@ class memberStatus
}
return FALSE;
}
}
/**
* Delete all user's status'
@@ -1229,7 +1229,7 @@ class memberStatus
foreach( $statusIds as $sid )
{
/* Rebuild this status */
$this->rebuildStatus( $sid );
$this->rebuildStatus( $sid );
/* Rebuild latest */
$this->rebuildOwnerLatest( $members[ $stom[ $sid ] ] );
@@ -1296,7 +1296,7 @@ class memberStatus
$this->DB->delete( 'member_status_actions', 'action_reply_id=' . $reply['reply_id'] );
/* Rebuild this status */
$this->rebuildStatus( $status );
$this->rebuildStatus( $status );
/* Rebuild latest */
$this->rebuildOwnerLatest( $author );
@@ -1565,7 +1565,7 @@ class memberStatus
* @return bool
*/
public function canComment( $author=null, $owner=null, $status=null )
{
{
$author = ( $author === null ) ? $this->getAuthor() : $author;
$owner = ( $owner === null ) ? $this->_internalData['StatusOwner'] : $owner;
@@ -1890,7 +1890,7 @@ class memberStatus
$author = ( $author === null ) ? $this->getAuthor() : $author;
if ( $author['member_id'] AND $custom['text'] )
{
{
$this->DB->insert( 'member_status_actions', array( 'action_member_id' => $author['member_id'],
'action_date' => time(),
'action_custom' => 1,
@@ -1916,7 +1916,7 @@ class memberStatus
$reply = ( $reply === null ) ? $this->_internalData['ReplyData'] : ( ( is_array( $reply ) ) ? $reply : $this->_loadReply( $reply ) );
if ( $author['member_id'] AND $status['status_id'] )
{
{
$this->DB->insert( 'member_status_actions', array( 'action_status_id' => $status['status_id'],
'action_reply_id' => intval( $reply['reply_id'] ),
'action_member_id' => $author['member_id'],
@@ -2069,7 +2069,7 @@ class memberStatus
/**
* Callback to auto-parse @names
*
*
* @param array Matches from the regular expression
* @return string Converted text
*/
@@ -2080,19 +2080,19 @@ class memberStatus
/**
* Callback to auto-parse #tags
*
*
* @param array Matches from the regular expression
* @return string Converted text
*/
protected function _autoParseTags( $matches )
{
return $this->_autoParseUrls( array( '', $matches[1], 'http://search.twitter.com/search?q=%23' . urlencode( $matches[3] ), $matches[2] ) );
return $this->_autoParseUrls( array( '', $matches[1], 'http://twitter.com/search?q=%23' . urlencode( $matches[3] ), $matches[2] ) );
}
/**
* Callback to auto-parse urls
* I totally stole this from Brandon's code but do NOT tell him.
*
*
* @param array Matches from the regular expression
* @return string Converted text
*/
@@ -2159,7 +2159,7 @@ class memberStatus
}
}
/* Moderated Posting */
/* Moderated Posting */
if ( $author['mod_posts'] )
{
if ( $author['mod_posts'] == 1 )
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com/">IP.Board</a>
IP.Board
</body>
</html>
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Mobile iOS App image class
* Owner: Matt Mecham
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Navigation Builder
* Owner: Matt Mecham
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com/">IP.Board</a>
IP.Board
</body>
</html>
@@ -3,17 +3,17 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Admin Output Library
* Last Updated: $LastChangedDate: 2013-05-20 16:38:23 -0400 (Mon, 20 May 2013) $
* Last Updated: $LastChangedDate: 2013-10-16 12:57:41 -0400 (Wed, 16 Oct 2013) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @version $Rev: 12261 $
* @version $Rev: 12380 $
*
*/
@@ -218,7 +218,7 @@ class adminOutput extends output
else
{
foreach( ipsRegistry::$applications as $app_dir => $app_data )
{
{
if ( in_array( $app_data['app_directory'], array( 'core', 'forums', 'members' ) ) || in_array( $app_data['app_directory'], $mainTabKeys ) || $this->registry->getClass('class_permissions')->checkForAppAccess( $app_data['app_directory'] ) !== TRUE || ! $app_data['app_enabled'] )
{
continue;
@@ -227,6 +227,14 @@ class adminOutput extends output
$this->otherTabKeys[] = $app_data['app_directory'];
}
foreach( array( 'lookfeel', 'support', 'reports' ) AS $v )
{
if ( ! in_array( $v, $this->tabKeys ) )
{
$this->otherTabKeys[] = $v;
}
}
}
}
@@ -275,7 +283,7 @@ class adminOutput extends output
{
$fakeAppActive[ $fa ] = true;
$fakeActive = true;
$fakeActive = true;
}
}
}
@@ -656,8 +664,10 @@ class adminOutput extends output
* @param string Text to display
* @return @e void
*/
public function multipleRedirectFinish($text='Завершено!')
public function multipleRedirectFinish($text='')
{
$text = ( $text ) ? $text : $this->lang->words['mr_completed'];
print $this->global_template->global_redirect_done( $text );
exit();
}
@@ -828,7 +838,7 @@ class adminOutput extends output
$_bookmarkData = array( 'url' => $bookmarks->cleanUrl( $this->settings['query_string_safe'] ),
'can' => ( $this->_canBookmark ? 'true' : 'false' ),
'has' => ( $bookmarks->hasBookmarked( $this->settings['query_string_safe'] ) ? 'true' : 'false' ),
'jsn' => $bookmarks->asJson() );
'jsn' => $bookmarks->asJson() );
//-----------------------------------------
// Get tab order
@@ -1662,7 +1672,7 @@ class adminOutput extends output
$this->lang->loadLanguageFile( array( 'admin_menulang' ), $app_dir );
foreach( $data as $_current_module => $module_data )
{
{
$_thisApp = $app_dir;
$__current_module = $_current_module;
$_current_module = preg_replace( '/^\d+?_(.*)$/', "\\1", $_current_module );
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Ouput format: HTML
* (Matt Mecham)
* Last Updated: $Date: 2013-03-12 16:14:42 -0400 (Tue, 12 Mar 2013) $
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Ouput format: HTML
* (Matt Mecham)
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
File diff suppressed because it is too large. Load diff
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Ouput format: XML
* (Matt Mecham)
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Ouput format: HTML
* (Matt Mecham)
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
@@ -314,8 +314,8 @@ class xmlOutput extends coreOutput implements interface_output
{
$copyright = "<!-- Copyright Information -->
<p id='copyright'>
Powered By <a href='http://www.invisionboard.com' title='IP.Board Homepage'>IP.Board</a>
{$version} &copy; ".date("Y")." &nbsp;<a href='http://www.invisionpower.com' title='IPS Homepage'>IPS, <abbr title='Incorporated'>Inc</abbr></a>.
Powered By <a href='' title='IP.Board Homepage'>IP.Board</a>
{$version} &copy; ".date("Y")." &nbsp;IPS, <abbr title='Incorporated'>Inc</abbr>.
";
if ( $this->settings['ipb_reg_name'] )
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Public output methods
* Last Updated: $Date: 2013-05-20 16:38:23 -0400 (Mon, 20 May 2013) $
* </pre>
@@ -2043,8 +2043,6 @@ class output
return $url;
}
$seoTitle = IPSText::makeSeoTransliterate( $seoTitle );
$_template = FALSE;
$seoTitle = ( ! empty( $seoTitle ) && ! is_array( $seoTitle ) ) ? array( $seoTitle ) : $seoTitle;
$_seoTitleForCache = ( is_array( $seoTitle ) ) ? implode( ';', $seoTitle ) : '';
@@ -2464,7 +2462,6 @@ class output
#print '#\d+?' . $_st . preg_quote( $seoTitle, '#' ) . '(' . $_end . "$|" . $_end . "\w+?" . $_end . "$|" . preg_quote( $_blk, '#' ) . ")#";exit;
if ( is_array($seoTitle) OR ! preg_match( '#\d+?' . $_st . preg_quote( $seoTitle, '#' ) . '(' . $_end . "$|" . $_end . '\w+?' . $_end . '$|/\?|' . preg_quote( $_blk, '#' ) . ")#", $_toTest ) )
{
if ( $return === TRUE )
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* System Templates
* Last Updated: $Date: 2012-05-10 21:10:13 +0100 (Thu, 10 May 2012) $
* </pre>
+23 -23
View File
@@ -3,10 +3,10 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* RSS Import
* Owner: Matt Mecham
* Last Updated: $Date: 2013-05-16 11:23:35 -0400 (Thu, 16 May 2013) $
* Last Updated: $Date: 2013-09-26 22:37:28 -0400 (Thu, 26 Sep 2013) $
* </pre>
*
* @author Matt Mecham
@@ -15,7 +15,7 @@
* @package IP.Board
* @link http://www.invisionpower.com
* @since 24th November 2009
* @version $Revision: 12255 $
* @version $Revision: 12370 $
*/
/**
@@ -219,26 +219,26 @@ class rss_import
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' );
/* Are we checking for external links */
$rels = array();
$rel = '';
if( ipsRegistry::$settings['posts_add_nofollow'] )
{
$rels[] = "nofollow";
}
if( ipsRegistry::$settings['links_external'] )
{
$rels[] = "external";
}
if( count($rels) )
{
$rel = " rel='" . implode( ' ', $rels ) . "'";
/* Are we checking for external links */
$rels = array();
$rel = '';
if( ipsRegistry::$settings['posts_add_nofollow'] )
{
$rels[] = "nofollow";
}
$this->_settings['LinkBack'] = "<a href=\"{url}\" {$rel}>" . $this->registry->getClass('class_localization')->words['_rssimportsource'] . "</a>";
if( ipsRegistry::$settings['links_external'] )
{
$rels[] = "external";
}
if( count($rels) )
{
$rel = " rel='" . implode( ' ', $rels ) . "'";
}
$this->_settings['LinkBack'] = "<a href=\"{url}\" class='bbc_url' {$rel}>" . $this->registry->getClass('class_localization')->words['_rssimportsource'] . "</a>";
/* Reset class */
$this->_reset();
@@ -566,7 +566,7 @@ class rss_import
if ( ! $this->_settings['ParseHtml'] )
{
$_raw = stripslashes($content);
$content = IPSText::getTextClass( 'bbcode' )->preDbParse( $editor->process( $_raw ) );
}
else
@@ -579,7 +579,7 @@ class rss_import
{
$the_link = str_replace( '{url}', trim( $link ), $this->_settings['LinkBack'] );
if ( $this->_settings['ParseHtml'] )
if ( !$this->_settings['ParseHtml'] )
{
$_raw = IPSText::getTextClass( 'bbcode' )->preEditParse( stripslashes($the_link) );
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Sabre classes by Matt Mecham
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com/">IP.Board</a>
IP.Board
</body>
</html>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Sabre classes by Matt Mecham
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com/">IP.Board</a>
IP.Board
</body>
</html>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Sabre classes by Matt Mecham
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com/">IP.Board</a>
IP.Board
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com/">IP.Board</a>
IP.Board
</body>
</html>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Sabre classes by Matt Mecham
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com/">IP.Board</a>
IP.Board
</body>
</html>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Sabre classes by Matt Mecham
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Global Search
* Last Updated: $Date: 2012-10-09 12:16:32 -0400 (Tue, 09 Oct 2012) $
* </pre>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Global Search
* Last Updated: $Date: 2012-12-03 14:03:02 -0500 (Mon, 03 Dec 2012) $
* </pre>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Global Search
* Last Updated: $Date: 2012-12-03 14:03:02 -0500 (Mon, 03 Dec 2012) $
* </pre>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Global Search
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Admin session handler
* Last Updated: $Date: 2012-08-21 11:56:40 -0400 (Tue, 21 Aug 2012) $
* </pre>
+1 -1
View File
@@ -7,7 +7,7 @@
* $Author: mmecham $
* @since Friday 12th November 2010 16:58
* $LastChangedDate: 2012-08-22 05:05:53 -0400 (Wed, 22 Aug 2012) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 11245 $
*/
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
File diff suppressed because it is too large. Load diff
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Sample SSO Class
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
Loaded 100 of 1568 files, more files were not shown because too many files have changed in this diff. Show more