Version 3.4.5

This commit is contained in:
Neo committed 2025-12-19 00:38:12 -08:00
1 parent fb6b5baabc
commit e4478369d8
1360 files changed
+228921 -179445

No files matched your search

@@ -4,11 +4,11 @@
*
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: ips_terabyte $
* $Author: mmecham $
* @since -
* $LastChangedDate: 2011-05-25 10:30:28 -0400 (Wed, 25 May 2011) $
* @version v3.3.4
* $Revision: 8887 $
* $LastChangedDate: 2013-03-19 09:02:31 -0400 (Tue, 19 Mar 2013) $
* @version v3.4.5
* $Revision: 12085 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -44,9 +44,58 @@ class public_core_ajax_attach extends ipsAjaxCommand
case 'setPref':
$this->_setPref();
break;
case 'getForumsAppUploader':
$this->_getForumsAppUploader();
break;
}
}
/**
* Gets the uploader form/data for ajaxy stuffs
*/
protected function _getForumsAppUploader()
{
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_post', 'public_topics' ), 'forums' );
$attach_post_key = trim( $this->request['attach_post_key'] );
$attach_rel_id = intval( $this->request['attach_rel_id'] );
$forum_id = intval( $this->request['forum_id'] );
$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->attach_post_key = $attach_post_key;
$class_attach->init();
$class_attach->getUploadFormSettings();
$html = $this->registry->getClass('output')->getTemplate('post')->uploadForm( $this->post_key, 'post', $class_attach->attach_stats, $attach_rel_id, $forum_id );
/* Need to make sure they are unique - if we implement, change template to accept a prefix */
$html = str_replace( "id='add_files_attach_" , "id='add_files_attach_pu_" , $html );
$html = str_replace( "id='nojs_attach_" , "id='nojs_attach_pu_" , $html );
$html = str_replace( "id='help_msg'" , "id='pu_help_msg'" , $html );
$html = str_replace( "id='space_info_attach_", "id='space_info_attach_pu_", $html );
$html = str_replace( "<ul id='attachments'>" , "<ul id='pu_attachments'>" , $html );
/* Remove help msg */
/* remove inline execution */
preg_match_all( '#<script type=\'text/javascript\'>(.+?)</script>#is', $html, $matches, PREG_SET_ORDER );
foreach( $matches as $val )
{
$all = $val[0];
$javascript = $val[1];
if ( stristr( $all, 'ipb.attach.registerUploader' ) )
{
$html = str_replace( $all, '', $html );
}
}
$this->returnHtml( $html );
}
/**
* Sets uploader preference
*
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Update captcha image
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 2.3
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*
*/
@@ -2,17 +2,17 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Image Ajax
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2013-02-08 10:22:34 -0500 (Fri, 08 Feb 2013) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: mark $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Gallery
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 11963 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -72,7 +72,7 @@ class public_core_ajax_comments extends ipsAjaxCommand
$parentId = intval( $this->request['parentId'] );
$commentIds = ( is_array( $_POST['commentIds'] ) ) ? IPSLib::cleanIntArray( $_POST['commentIds'] ) : array();
$modact = trim( $this->request['modact'] );
if ( count( $commentIds ) )
{
try
@@ -83,7 +83,14 @@ class public_core_ajax_comments extends ipsAjaxCommand
}
catch( Exception $error )
{
$this->returnJsonError( 'Error ' . $error->getMessage() . ' line: ' . $error->getFile() . '.' . $error->getLine() );
if ( $error->getMessage() == 'NO_PERMISSION' )
{
$this->returnJsonError( $this->lang->words['ap_np_msg'] );
}
else
{
$this->returnJsonError( 'Error ' . $error->getMessage() . ' line: ' . $error->getFile() . '.' . $error->getLine() );
}
}
}
}
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
@@ -2,18 +2,18 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Handles ajax functions for IP.Board Text Editor
* Author: Matt "Matt Mecham" Mecham
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-10-10 06:39:40 -0400 (Wed, 10 Oct 2012) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: mmecham $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Gallery
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 11434 $
*
*/
@@ -38,6 +38,8 @@ class public_core_ajax_editor extends ipsAjaxCommand
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/editor/composite.php', 'classes_editor_composite' );
$this->editor = new $classToLoad();
$this->lang->loadLanguageFile( 'public_editors', 'core' );
/* What to do? */
switch( $this->request['do'] )
{
@@ -92,17 +94,16 @@ class public_core_ajax_editor extends ipsAjaxCommand
}
$clearSavedContent = intval( $this->request['clearSavedContent'] );
$bw_cke_contextmenu = intval( $this->request['bw_cke_contextmenu'] );
$pastePlain = intval( $this->request['pastePlain'] );
if ( $clearSavedContent )
{
$this->DB->delete( 'core_editor_autosave', 'eas_member_id=' . $this->memberData['member_id'] );
}
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'bw_cke_contextmenu' => $bw_cke_contextmenu ) ) );
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'bw_paste_plain' => $pastePlain ) ) );
$member = IPSMember::load( $this->memberData['member_id'] );
/* return if no errors occurred */
return $this->returnJsonArray( array( 'status' => 'ok' ) );
}
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Login handler abstraction : AJAX login
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*
*/
@@ -1,110 +1,110 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Login handler abstraction : AJAX Find Names functions
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 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
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 10914 $
* @see admin_core_ajax_findnames
*
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
class public_core_ajax_findnames extends ipsAjaxCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
switch( $this->request['do'] )
{
case 'get-member-names':
$this->_getMemberNames();
break;
}
}
/**
* Returns possible matches for the string input
*
* @return @e void Outputs to screen
*/
protected function _getMemberNames()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = IPSText::convertUnicode( $this->convertAndMakeSafe( $this->request['name'], 0 ), true );
$name = IPSText::convertCharsets( $name, 'utf-8', IPS_DOC_CHAR_SET );
//-----------------------------------------
// Check length
//-----------------------------------------
if ( IPSText::mbstrlen( $name ) < 3 )
{
$this->returnJsonError( 'requestTooShort' );
}
//-----------------------------------------
// Try query...
//-----------------------------------------
$this->DB->build( array( 'select' => 'm.members_display_name, m.name, m.member_id, m.member_group_id',
'from' => array( 'members' => 'm' ),
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( strtolower( $name ) ) . "%'",
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
'limit' => array( 0, 15 ),
'add_join' => array( array( 'select' => 'p.*',
'from' => array( 'profile_portal' => 'p' ),
'where' => 'p.pp_member_id=m.member_id',
'type' => 'left' ) ) ) );
$this->DB->execute();
//-----------------------------------------
// Got any results?
//-----------------------------------------
if ( ! $this->DB->getTotalRows() )
{
$this->returnJsonArray( array( ) );
}
$return = array();
while( $r = $this->DB->fetch() )
{
$photo = IPSMember::buildProfilePhoto( $r );
$group = IPSMember::makeNameFormatted( '' , $r['member_group_id'] );
$return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'],
'showas'=> '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')',
'img' => $photo['pp_mini_photo'],
'img_w' => $photo['pp_mini_width'],
'img_h' => $photo['pp_mini_height']
);
}
$this->returnJsonArray( $return );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Login handler abstraction : AJAX Find Names functions
* Last Updated: $Date: 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
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 10721 $
* @see admin_core_ajax_findnames
*
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
class public_core_ajax_findnames extends ipsAjaxCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
switch( $this->request['do'] )
{
case 'get-member-names':
$this->_getMemberNames();
break;
}
}
/**
* Returns possible matches for the string input
*
* @return @e void Outputs to screen
*/
protected function _getMemberNames()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = IPSText::convertUnicode( $this->convertAndMakeSafe( $this->request['name'], 0 ), true );
$name = IPSText::convertCharsets( $name, 'utf-8', IPS_DOC_CHAR_SET );
//-----------------------------------------
// Check length
//-----------------------------------------
if ( IPSText::mbstrlen( $name ) < 3 )
{
$this->returnJsonError( 'requestTooShort' );
}
//-----------------------------------------
// Try query...
//-----------------------------------------
$this->DB->build( array( 'select' => 'm.members_display_name, m.name, m.member_id, m.member_group_id',
'from' => array( 'members' => 'm' ),
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( mb_strtolower( $name ) ) . "%'",
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
'limit' => array( 0, 15 ),
'add_join' => array( array( 'select' => 'p.*',
'from' => array( 'profile_portal' => 'p' ),
'where' => 'p.pp_member_id=m.member_id',
'type' => 'left' ) ) ) );
$this->DB->execute();
//-----------------------------------------
// Got any results?
//-----------------------------------------
if ( ! $this->DB->getTotalRows() )
{
$this->returnJsonArray( array( ) );
}
$return = array();
while( $r = $this->DB->fetch() )
{
$photo = IPSMember::buildProfilePhoto( $r );
$group = IPSMember::makeNameFormatted( '' , $r['member_group_id'] );
$return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'],
'showas'=> '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')',
'img' => $photo['pp_mini_photo'],
'img_w' => $photo['pp_mini_width'],
'img_h' => $photo['pp_mini_height']
);
}
$this->returnJsonArray( $return );
}
}
@@ -7,7 +7,7 @@
* $Author: bfarber $
* @since -
* $LastChangedDate: 2011-08-05 20:51:01 -0400 (Fri, 05 Aug 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 9373 $
*/
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Login handler abstraction : AJAX login
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -2,18 +2,18 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Handles ajax functions for IP.Board Text Editor
* Author: Matt "Matt Mecham" Mecham
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-06-07 06:21:09 -0400 (Thu, 07 Jun 2012) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Gallery
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 10885 $
*
*/
@@ -1,175 +1,175 @@
<?php
/**
* @file modcp.php Moderator control panel AJAX retrieve tab
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 2/14/2011
* $LastChangedDate: 2011-11-16 11:36:38 -0500 (Wed, 16 Nov 2011) $
* @version v3.3.4
* $Revision: 9829 $
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
/**
*
* @class public_core_ajax_modcp
* @brief Moderator control panel
*
*/
class public_core_ajax_modcp extends ipsAjaxCommand
{
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Load basic things
//-----------------------------------------
$this->registry->class_localization->loadLanguageFile( array( 'public_modcp' ) );
//-----------------------------------------
// Which road are we going to take?
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'index':
$this->_getTab();
break;
case 'getmembers':
$this->_getMembers();
break;
}
//-----------------------------------------
// Output
//-----------------------------------------
$this->registry->getClass('output')->addContent( $this->output );
$this->registry->output->sendOutput();
}
/**
* Returns possible matches for the string input
*
* @return @e void Outputs to screen
*/
protected function _getMembers()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = IPSText::convertUnicode( $this->convertAndMakeSafe( $this->request['name'], 0 ), true );
$name = IPSText::convertCharsets( $name, 'utf-8', IPS_DOC_CHAR_SET );
//-----------------------------------------
// Check length
//-----------------------------------------
if ( IPSText::mbstrlen( $name ) < 3 )
{
$this->returnJsonError( 'requestTooShort' );
}
//-----------------------------------------
// Try query...
//-----------------------------------------
$this->DB->build( array( 'select' => 'm.members_display_name, m.member_id, m.members_seo_name, m.member_group_id',
'from' => array( 'members' => 'm' ),
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( strtolower( $name ) ) . "%'",
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
'limit' => array( 0, 15 ),
'add_join' => array( array( 'select' => 'p.*',
'from' => array( 'profile_portal' => 'p' ),
'where' => 'p.pp_member_id=m.member_id',
'type' => 'left' ) ) ) );
$this->DB->execute();
//-----------------------------------------
// Got any results?
//-----------------------------------------
if ( ! $this->DB->getTotalRows() )
{
$this->returnJsonArray( array( ) );
}
$return = array();
while( $r = $this->DB->fetch() )
{
$url = $this->registry->output->buildSEOUrl( "app=core&amp;module=modcp&amp;do=editmember&amp;mid={$r['member_id']}", 'public' );
$photo = IPSMember::buildProfilePhoto( $r );
$group = IPSMember::makeNameFormatted( '' , $r['member_group_id'] );
$return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'],
'showas'=> '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')',
'img' => $photo['pp_thumb_photo'],
'img_w' => $photo['pp_mini_width'],
'img_h' => $photo['pp_mini_height'],
'url' => $url,
);
}
$this->returnJsonArray( $return );
}
/**
* Retrieve modcp tab based
*
* @return @e void
*/
protected function _getTab()
{
//-----------------------------------------
// Init
//-----------------------------------------
ipsRegistry::getAppClass( 'forums' );
$app = trim($this->request['fromapp']);
$plugin = trim($this->request['tab']);
$moderator = $this->registry->class_forums->getModerator();
$_output = '';
//-----------------------------------------
// Get plugin output
//-----------------------------------------
if( is_file( IPSLib::getAppDir( $app ) . '/extensions/modcp/plugin_' . $app . '_' . $plugin . '.php' ) )
{
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $app ) . '/extensions/modcp/plugin_' . $app . '_' . $plugin . '.php', 'plugin_' . $app . '_' . $plugin, $app );
$_thisPlugin = new $classToLoad( $this->registry );
$_output = $_thisPlugin->executePlugin( $moderator );
}
//-----------------------------------------
// Output
//-----------------------------------------
if( $_output )
{
$this->returnJsonArray( array( 'html' => $_output ) );
}
else
{
$this->returnJsonError( $this->lang->words['plugin_not_found'] );
}
}
<?php
/**
* @file modcp.php Moderator control panel AJAX retrieve tab
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 2/14/2011
* $LastChangedDate: 2011-11-16 11:36:38 -0500 (Wed, 16 Nov 2011) $
* @version v3.4.5
* $Revision: 9829 $
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
/**
*
* @class public_core_ajax_modcp
* @brief Moderator control panel
*
*/
class public_core_ajax_modcp extends ipsAjaxCommand
{
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Load basic things
//-----------------------------------------
$this->registry->class_localization->loadLanguageFile( array( 'public_modcp' ) );
//-----------------------------------------
// Which road are we going to take?
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'index':
$this->_getTab();
break;
case 'getmembers':
$this->_getMembers();
break;
}
//-----------------------------------------
// Output
//-----------------------------------------
$this->registry->getClass('output')->addContent( $this->output );
$this->registry->output->sendOutput();
}
/**
* Returns possible matches for the string input
*
* @return @e void Outputs to screen
*/
protected function _getMembers()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = IPSText::convertUnicode( $this->convertAndMakeSafe( $this->request['name'], 0 ), true );
$name = IPSText::convertCharsets( $name, 'utf-8', IPS_DOC_CHAR_SET );
//-----------------------------------------
// Check length
//-----------------------------------------
if ( IPSText::mbstrlen( $name ) < 3 )
{
$this->returnJsonError( 'requestTooShort' );
}
//-----------------------------------------
// Try query...
//-----------------------------------------
$this->DB->build( array( 'select' => 'm.members_display_name, m.member_id, m.members_seo_name, m.member_group_id',
'from' => array( 'members' => 'm' ),
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( mb_strtolower( $name ) ) . "%'",
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
'limit' => array( 0, 15 ),
'add_join' => array( array( 'select' => 'p.*',
'from' => array( 'profile_portal' => 'p' ),
'where' => 'p.pp_member_id=m.member_id',
'type' => 'left' ) ) ) );
$this->DB->execute();
//-----------------------------------------
// Got any results?
//-----------------------------------------
if ( ! $this->DB->getTotalRows() )
{
$this->returnJsonArray( array( ) );
}
$return = array();
while( $r = $this->DB->fetch() )
{
$url = $this->registry->output->buildSEOUrl( "app=core&amp;module=modcp&amp;do=editmember&amp;mid={$r['member_id']}", 'public' );
$photo = IPSMember::buildProfilePhoto( $r );
$group = IPSMember::makeNameFormatted( '' , $r['member_group_id'] );
$return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'],
'showas'=> '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')',
'img' => $photo['pp_thumb_photo'],
'img_w' => $photo['pp_mini_width'],
'img_h' => $photo['pp_mini_height'],
'url' => $url,
);
}
$this->returnJsonArray( $return );
}
/**
* Retrieve modcp tab based
*
* @return @e void
*/
protected function _getTab()
{
//-----------------------------------------
// Init
//-----------------------------------------
ipsRegistry::getAppClass( 'forums' );
$app = trim($this->request['fromapp']);
$plugin = trim($this->request['tab']);
$moderator = $this->registry->class_forums->getModerator();
$_output = '';
//-----------------------------------------
// Get plugin output
//-----------------------------------------
if( is_file( IPSLib::getAppDir( $app ) . '/extensions/modcp/plugin_' . $app . '_' . $plugin . '.php' ) )
{
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $app ) . '/extensions/modcp/plugin_' . $app . '_' . $plugin . '.php', 'plugin_' . $app . '_' . $plugin, $app );
$_thisPlugin = new $classToLoad( $this->registry );
$_output = $_thisPlugin->executePlugin( $moderator );
}
//-----------------------------------------
// Output
//-----------------------------------------
if( $_output )
{
$this->returnJsonArray( array( 'html' => $_output ) );
}
else
{
$this->returnJsonError( $this->lang->words['plugin_not_found'] );
}
}
}
@@ -6,7 +6,7 @@
* $Author: bfarber $
* @since 2/14/2011
* $LastChangedDate: 2011-04-27 19:56:50 -0400 (Wed, 27 Apr 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8514 $
*/
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Notification AJAX methods
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-08-28 17:56:22 -0400 (Tue, 28 Aug 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 10914 $
* @version $Revision: 11296 $
*
*/
@@ -170,6 +170,6 @@ class public_core_ajax_notifications extends ipsAjaxCommand
// Return results
//-----------------------------------------
$this->returnJsonArray( array( 'html' => $this->cleanOutput( $this->registry->output->getTemplate('global_other')->notificationsList( $_data ) ) ) );
$this->returnJsonArray( array( 'html' => $this->registry->output->getTemplate('global_other')->notificationsList( $_data ) ), true );
}
}
@@ -2,19 +2,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Registration AJAX routines
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-07-19 11:49:35 -0400 (Thu, 19 Jul 2012) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: mark $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since Who knows...
* @version $Revision: 10914 $
* @version $Revision: 11095 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -120,7 +120,9 @@ class public_core_ajax_register extends ipsAjaxCommand
$han_login = new $classToLoad( $this->registry );
$han_login->init();
if( $han_login->emailExistsCheck( $email ) )
$han_login->emailExistsCheck( $email );
if( $han_login->return_code AND $han_login->return_code != 'METHOD_NOT_DEFINED' AND $han_login->return_code != 'EMAIL_NOT_IN_USE' )
{
$this->returnString('found');
}
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Reports AJAX options
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -13,7 +13,7 @@
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Reputation
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -13,7 +13,7 @@
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -3,11 +3,11 @@
* @file search.php AJAX configure VNC filters
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: ips_terabyte $
* $Author: AndyMillne $
* @since 2/14/2011
* $LastChangedDate: 2011-05-25 10:30:28 -0400 (Wed, 25 May 2011) $
* @version v3.3.4
* $Revision: 8887 $
* $LastChangedDate: 2013-03-22 17:35:37 -0400 (Fri, 22 Mar 2013) $
* @version v3.4.5
* $Revision: 12112 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -60,9 +60,94 @@ class public_core_ajax_search extends ipsAjaxCommand
case 'saveForumsVncFilter':
$this->saveForm();
break;
case 'saveFollow':
$this->saveFollow();
break;
}
}
/**
* Save the 'like' preferences for a single object
*
* @return @e void
*/
protected function saveFollow()
{
//-----------------------------------------
// Get like helper class
//-----------------------------------------
$bootstraps = array();
require_once( IPS_ROOT_PATH . 'sources/classes/like/composite.php' );/*noLibHook*/
$_bootstrap = classes_like::bootstrap( $this->request['searchApp'], $this->request['contentType'] );
$_likeKey = classes_like_registry::getKey( $this->request['id'], $this->memberData['member_id'] );
$_frequencies = $_bootstrap->allowedFrequencies();
//-----------------------------------------
// What action to take?
//-----------------------------------------
switch( $this->request['modaction'] )
{
case 'delete':
$_bootstrap->remove( $this->request['id'], $this->memberData['member_id'] );
break;
case 'change-donotify':
$this->DB->update( 'core_like', array( 'like_notify_do' => 1, 'like_notify_freq' => 'immediate' ), "like_id='" . addslashes($_likeKey) . "'" );
break;
case 'change-donotnotify':
$this->DB->update( 'core_like', array( 'like_notify_do' => 0 ), "like_id='" . addslashes($_likeKey) . "'" );
break;
case 'change-immediate':
if( in_array( 'immediate', $_frequencies ) )
{
$this->DB->update( 'core_like', array( 'like_notify_do' => 1, 'like_notify_freq' => 'immediate' ), "like_id='" . addslashes($_likeKey) . "'" );
}
break;
case 'change-offline':
if( in_array( 'offline', $_frequencies ) )
{
$this->DB->update( 'core_like', array( 'like_notify_do' => 1, 'like_notify_freq' => 'offline' ), "like_id='" . addslashes($_likeKey) . "'" );
}
break;
case 'change-daily':
if( in_array( 'daily', $_frequencies ) )
{
$this->DB->update( 'core_like', array( 'like_notify_do' => 1, 'like_notify_freq' => 'daily' ), "like_id='" . addslashes($_likeKey) . "'" );
}
break;
case 'change-weekly':
if( in_array( 'weekly', $_frequencies ) )
{
$this->DB->update( 'core_like', array( 'like_notify_do' => 1, 'like_notify_freq' => 'weekly' ), "like_id='" . addslashes($_likeKey) . "'" );
}
break;
case 'change-anon':
$this->DB->update( 'core_like', array( 'like_is_anon' => 1 ), "like_id='" . addslashes($_likeKey) . "'" );
break;
case 'change-noanon':
$this->DB->update( 'core_like', array( 'like_is_anon' => 0 ), "like_id='" . addslashes($_likeKey) . "'" );
break;
default:
$this->returnJsonError("follow_no_action");
break;
}
$_data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_like', 'where' => "like_id='" . addslashes($_likeKey) . "'" ) );
$this->returnJsonArray( array( 'html' => $this->registry->output->getTemplate('search')->followData( $_data ) ) );
}
/**
* Save the form to configure VNC forum filters
*
@@ -4,10 +4,10 @@
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2012 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: ips_terabyte $
* $LastChangedDate: 2012-06-22 07:55:48 -0400 (Fri, 22 Jun 2012) $
* @version v3.3.4
* $Revision: 10969 $
* $Author: mmecham $
* $LastChangedDate: 2012-09-19 10:57:30 -0400 (Wed, 19 Sep 2012) $
* @version v3.4.5
* $Revision: 11350 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -176,7 +176,7 @@ class public_core_ajax_sharelinks extends ipsAjaxCommand
if ( $user['id'] )
{
$sid = $connect->updateStatusWithUrl( $tweet, $url );
$sid = $connect->updateStatusWithUrl( $tweet, $url, true, $this->settings['twitter_hashtag'] );
if ( $sid )
{
@@ -7,7 +7,7 @@
* $Author: bfarber $
* @since -
* $LastChangedDate: 2011-08-06 01:51:01 +0100 (Sat, 06 Aug 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 9373 $
*/
@@ -73,10 +73,7 @@ class public_core_ajax_skin extends ipsAjaxCommand
/* Make sure mobile skin is removed */
IPSCookie::set("mobileApp", 'false', -1);
IPSCookie::set("mobileBrowser", 0, -1);
/* remove user agent bypass */
IPSCookie::set("uagent_bypass", 0, -1);
/* Update member row */
$this->memberData['skin'] = $skinId;
}
@@ -106,10 +103,17 @@ class public_core_ajax_skin extends ipsAjaxCommand
break;
}
}
/* Update... */
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'skin' => $skinId ) ) );
}
/* Update... */
if ( $this->memberData['member_id'] )
{
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'skin' => $skinId ) ) );
}
else
{
IPSCookie::set( 'guestSkinChoice', $skinId );
}
}
}
else if ( $skinId == 'unlockUserAgent' )
{
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Like Ajax
* Last Updated: $LastChangedDate: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $
* </pre>
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Like Ajax
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -12,7 +12,7 @@
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Gallery
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*
*/
@@ -7,7 +7,7 @@
* $Author: mmecham $
* @since Friday 19th May 2006 17:33
* $LastChangedDate: 2011-05-03 04:53:04 -0400 (Tue, 03 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8588 $
*/
@@ -1,111 +1,111 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Login handler abstraction : AJAX UserCP functions
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 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
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 10914 $
*
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
class public_core_ajax_usercp extends ipsAjaxCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
switch( $this->request['do'] )
{
case 'displayNameCheck':
$this->displayNameCheck();
break;
}
}
/**
* Checks a display name
*
* @return @e void [Outputs JSON to browser AJAX call]
*/
protected function displayNameCheck()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = strtolower( $this->convertAndMakeSafe( $this->request['name'], 0 ) );
$name = str_replace("&#43;", "+", $name );
$member = array();
$return = TRUE;
$id = intval( $this->request['member_id'] );
# Set member ID
$id = $this->memberData['member_id'] ? $this->memberData['member_id'] : $id;
//-----------------------------------------
// Load member if required
//-----------------------------------------
if ( $id != $this->memberData['member_id'] )
{
$member = IPSMember::load( $id, 'all' );
}
else
{
$member = $this->member->fetchMemberData();
}
//-----------------------------------------
// Test name
//-----------------------------------------
try
{
$return = IPSMember::getFunction()->checkNameExists( $name, $member );
}
catch( Exception $error )
{
$_msg = $error->getMessage();
if ( $_msg == 'NO_MORE_CHANGES' )
{
$this->returnString( 'nomorechanges' );
return;
}
# Really, we're not very interested why it didn't work at this point, so
# just return with a 'found' string which will make a nice red cross and
# force the user to choose another.
$this->returnString('found');
return;
}
//-----------------------------------------
// So, what's it to be?
//-----------------------------------------
$this->returnString( ( $return === TRUE ) ? 'found' : 'notfound' );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Login handler abstraction : AJAX UserCP functions
* Last Updated: $Date: 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
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 10721 $
*
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
class public_core_ajax_usercp extends ipsAjaxCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
switch( $this->request['do'] )
{
case 'displayNameCheck':
$this->displayNameCheck();
break;
}
}
/**
* Checks a display name
*
* @return @e void [Outputs JSON to browser AJAX call]
*/
protected function displayNameCheck()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = mb_strtolower( $this->convertAndMakeSafe( $this->request['name'], 0 ) );
$name = str_replace("&#43;", "+", $name );
$member = array();
$return = TRUE;
$id = intval( $this->request['member_id'] );
# Set member ID
$id = $this->memberData['member_id'] ? $this->memberData['member_id'] : $id;
//-----------------------------------------
// Load member if required
//-----------------------------------------
if ( $id != $this->memberData['member_id'] )
{
$member = IPSMember::load( $id, 'all' );
}
else
{
$member = $this->member->fetchMemberData();
}
//-----------------------------------------
// Test name
//-----------------------------------------
try
{
$return = IPSMember::getFunction()->checkNameExists( $name, $member );
}
catch( Exception $error )
{
$_msg = $error->getMessage();
if ( $_msg == 'NO_MORE_CHANGES' )
{
$this->returnString( 'nomorechanges' );
return;
}
# Really, we're not very interested why it didn't work at this point, so
# just return with a 'found' string which will make a nice red cross and
# force the user to choose another.
$this->returnString('found');
return;
}
//-----------------------------------------
// So, what's it to be?
//-----------------------------------------
$this->returnString( ( $return === TRUE ) ? 'found' : 'notfound' );
}
}
@@ -2,18 +2,18 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Attachment Poster
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-08-22 05:05:53 -0400 (Wed, 22 Aug 2012) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: mmecham $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 11245 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -24,20 +24,6 @@ if ( ! defined( 'IN_IPB' ) )
class public_core_attach_attach extends ipsCommand
{
/**
* Attachment Library
*
* @var object class_attach
*/
public $class_attach;
/**
* AJAX Library
*
* @var object classAjax
*/
public $ajax;
/**
* Class entry point
*
@@ -46,298 +32,10 @@ class public_core_attach_attach extends ipsCommand
*/
public function doExecute( ipsRegistry $registry )
{
/* AJAX Class */
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' );
$this->ajax = new $classToLoad();
/* Attachment Class */
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' );
$this->class_attach = new $classToLoad( $registry );
/* Attachment Controller Class */
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/controller.php', 'classes_attach_controller' );
$controller = new $classToLoad( $registry );
/* What to do... */
switch( $this->request['do'] )
{
case 'attach_upload_show':
$this->ajax->returnHtml( $this->attachmentUploadShow() );
break;
case 'attach_upload_process':
$this->attachmentUploadProcess();
break;
case 'attach_upload_remove':
$this->attachmentUploadRemove();
break;
/* IFrame based upload */
case 'attachiFrame':
$this->attachiFrame();
break;
case 'attachUploadiFrame':
$this->attachUploadiFrame();
break;
default:
$this->showPostAttachment();
break;
}
}
/**
* View Post Attachment
*
* @return @e void
*/
public function showPostAttachment()
{
/* INIT */
$attach_id = intval( $this->request['attach_id'] );
/* INIT module */
$this->class_attach->init();
/* Display */
$this->class_attach->showAttachment( $attach_id );
}
/**
* Remove an upload
*
* @return @e void
*/
public function attachmentUploadRemove()
{
/* INIT */
$attach_post_key = trim( IPSText::alphanumericalClean( $this->request['attach_post_key'] ) );
$attach_rel_module = trim( IPSText::alphanumericalClean( $this->request['attach_rel_module'] ) );
$attach_rel_id = intval( $this->request['attach_rel_id'] );
$attach_id = intval( $this->request['attach_id'] );
/* Setup Module */
$this->class_attach->type = $attach_rel_module;
$this->class_attach->attach_post_key = $attach_post_key;
$this->class_attach->attach_rel_id = $attach_rel_id;
$this->class_attach->attach_id = $attach_id;
$this->class_attach->init();
/* Remove the attachment */
$removed = $this->class_attach->removeAttachment();
/* Show the form */
if( $removed )
{
$this->ajax->returnHtml( $this->attachmentUploadShow( 'attach_removed', 0 ) );
}
else
{
$this->ajax->returnHtml( $this->attachmentUploadShow( 'remove_failed', 1 ) );
}
}
/**
* Perform the actual upload
*
* @return @e void
*/
public function attachmentUploadProcess()
{
/* INIT */
$attach_post_key = trim( IPSText::alphanumericalClean( $this->request['attach_post_key'] ) );
$attach_rel_module = trim( IPSText::alphanumericalClean( $this->request['attach_rel_module'] ) );
$attach_rel_id = intval( $this->request['attach_rel_id'] );
$attach_current_items = '';
/* INIT module */
$this->class_attach->type = $attach_rel_module;
$this->class_attach->attach_post_key = $attach_post_key;
$this->class_attach->attach_rel_id = $attach_rel_id;
$this->class_attach->init();
/* Process upload */
$insert_id = $this->class_attach->processUpload();
/* Got an error? */
if( $this->class_attach->error )
{
$this->ajax->returnHtml( $this->attachmentUploadShow( $this->class_attach->error, 1, $insert_id ) );
}
else
{
$this->ajax->returnHtml( $this->attachmentUploadShow( 'upload_ok', 0, $insert_id ) );
}
}
/**
* Show the attach upload field
*
* @param string $msg
* @param bool $is_error
* @param integer $insert_id
* @return @e void
*/
public function attachmentUploadShow( $msg="ready", $is_error=0, $insert_id=0 )
{
/* INIT JSON */
$JSON = array();
$JSON['msg'] = $msg;
$JSON['is_error'] = $is_error;
$is_reset = 0;
/* Check the upload domain setting */
if( $this->settings['upload_domain'] )
{
$is_reset = 1;
$original = $this->settings['base_url'];
if( $this->member->session_type == 'cookie' )
{
$this->settings['base_url'] = $this->settings['upload_domain'] . '/index.' . $this->settings['php_ext'].'?';
}
else
{
$this->settings['base_url'] = $this->settings['upload_domain'] . '/index.' . $this->settings['php_ext'].'?s='.$this->member->session_id .'&amp;';
}
}
/* JSON Data */
$JSON['attach_post_key'] = $attach_post_key = trim( IPSText::alphanumericalClean( $this->request['attach_post_key'] ) );
$JSON['attach_rel_module'] = $attach_rel_module = trim( IPSText::alphanumericalClean( $this->request['attach_rel_module'] ) );
$JSON['attach_rel_id'] = $attach_rel_id = intval( $this->request['attach_rel_id'] );
if( $insert_id )
{
$JSON['insert_id'] = $insert_id;
}
/* Get extra form fields */
foreach( $_GET as $k => $v )
{
if( preg_match( "#^--ff--#", $k ) )
{
$JSON['extra_upload_form_url'] .= '&amp;' . str_replace( '--ff--', '', $k ) . '='.$v;
$JSON['extra_upload_form_url'] .= '&amp;' . $k . '='.$v;
}
}
/* INIT module */
$this->class_attach->type = $attach_rel_module;
$this->class_attach->attach_post_key = $attach_post_key;
$this->class_attach->init();
$this->class_attach->getUploadFormSettings();
/* Load Language Bits */
$this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'lang_post' ) );
/* Generate current items... */
$_more = ( $attach_rel_id ) ? ' OR c.attach_rel_id=' . $attach_rel_id : '';
$this->DB->build( array(
'select' => 'c.*',
'from' => array( 'attachments' => 'c' ),
'where' => "c.attach_rel_module='{$attach_rel_module}' AND c.attach_post_key='{$attach_post_key}'{$_more}",
'add_join' => array( array(
'select' => 't.*',
'from' => array( 'attachments_type' => 't' ),
'where' => 't.atype_extension=c.attach_ext',
'type' => 'left'
) )
) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
if ( $attach_rel_module != $row['attach_rel_module'] )
{
continue;
}
if( ( $insert_id && $row['attach_id'] == $insert_id ) || $this->request['fetch_all'] )
{
if ( $row['attach_is_image'] and ! $row['attach_thumb_location'] )
{
$row['attach_thumb_location'] = $row['attach_location'];
$row['attach_thumb_width'] = $row['attach_width'];
$row['attach_thumb_height'] = $row['attach_height'];
}
$JSON['current_items'][ $row['attach_id'] ] = array( $row['attach_id'] ,
str_replace( array( '[', ']' ), '', $row['attach_file'] ),
$row['attach_filesize'],
$row['attach_is_image'],
$row['attach_thumb_location'],
$row['attach_thumb_width'],
$row['attach_thumb_height'],
$row['atype_img']
);
}
}
$JSON['attach_stats'] = $this->class_attach->attach_stats;
/* Formatting nonsense for special char sets */
$result = IPSText::jsonEncodeForTemplate( $JSON );
IPSDebug::addLogMessage( $result, 'uploads' );
/* Return JSON */
return $result;
}
/**
* Show the attach upload field
*
* @param string $msg
* @param bool $is_error
* @param integer $insert_id
* @return @e void
*/
public function attachiFrame( $msg="ready", $is_error=0, $insert_id=0 )
{
/* INIT JSON */
$JSON = $this->attachmentUploadShow( $msg, $is_error, $insert_id );
$this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_post' ), 'forums' );
$this->ajax->returnHtml( $this->registry->output->getTemplate( 'post' )->attachiFrame( $JSON, intval( $this->request['attach_rel_id'] ) ) );
}
/**
* Perform the actual upload
*
* @return @e void
*/
public function attachUploadiFrame()
{
/* INIT */
$attach_post_key = trim( IPSText::alphanumericalClean( $this->request['attach_post_key'] ) );
$attach_rel_module = trim( IPSText::alphanumericalClean( $this->request['attach_rel_module'] ) );
$attach_rel_id = intval( $this->request['attach_rel_id'] );
$attach_current_items = '';
$this->registry->getClass( 'class_localization')->loadLanguageFile( array( 'public_post' ), 'forums' );
/* INIT module */
$this->class_attach->type = $attach_rel_module;
$this->class_attach->attach_post_key = $attach_post_key;
$this->class_attach->attach_rel_id = $attach_rel_id;
$this->class_attach->init();
/* Process upload */
$insert_id = $this->class_attach->processUpload();
/* Got an error? */
if( $this->class_attach->error )
{
$JSON = $this->attachmentUploadShow( $this->class_attach->error, 1, $insert_id );
}
else
{
$JSON = $this->attachmentUploadShow( 'upload_ok', 0, $insert_id );
}
$this->ajax->returnHtml( $this->registry->output->getTemplate( 'post' )->attachiFrame( $JSON, $attach_rel_id ) );
$controller->run( $this->request['do'] );
}
}
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Captcha
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author $
@@ -14,7 +14,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -2,17 +2,17 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Image Ajax
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-10-03 17:32:06 -0400 (Wed, 03 Oct 2012) $
* </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.Gallery
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 11410 $
*
*/
@@ -117,7 +117,14 @@ class public_core_global_comments extends ipsCommand
/* Init */
$parentId = intval( $this->request['parentId'] );
$this->_comments->redirectToComment( 'last', $parentId );
try
{
$this->_comments->redirectToComment( 'last', $parentId );
}
catch ( Exception $error )
{
$this->registry->getClass('output')->showError( 'no_permission', '1-global-comments-_findlast', null, null, 403 );
}
}
/**
@@ -136,7 +143,14 @@ class public_core_global_comments extends ipsCommand
$this->registry->output->showError( 'nocomment_found', '1-global-comments-find' );
}
$this->_comments->redirectToComment( $comment_id, $parentId );
try
{
$this->_comments->redirectToComment( $comment_id, $parentId );
}
catch ( Exception $error )
{
$this->registry->getClass('output')->showError( 'no_permission', '1-global-comments-_find', null, null, 403 );
}
}
/**
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
@@ -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: AndyMillne $
* @since -
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* @version v3.3.4
* $Revision: 10914 $
* $LastChangedDate: 2013-02-06 16:33:34 -0500 (Wed, 06 Feb 2013) $
* @version v3.4.5
* $Revision: 11947 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -127,12 +127,12 @@ class public_core_global_like extends ipsCommand
if ( ( $memberId != $likeMemberId ) || ( $memberId != $this->memberData['member_id'] ) )
{
$this->registry->output->showError( 'no_permission', 'pcgl-2' );
$this->registry->output->showError( 'no_unfollow', 'pcgl-2' );
}
if ( $email != $this->memberData['email'] )
{
$this->registry->output->showError( 'no_permission', 'pcgl-3' );
$this->registry->output->showError( 'no_unfollow', 'pcgl-3' );
}
/* Think we're safe... */
File diff suppressed because it is too large. Load diff
@@ -1,499 +1,484 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Recover Lost Password
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @author $Author $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 10914 $
*
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
class public_core_global_lostpass extends ipsCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen/redirects]
*/
public function doExecute( ipsRegistry $registry )
{
/* Load language */
$this->registry->class_localization->loadLanguageFile( array( 'public_register' ), 'core' );
//-----------------------------------------
// Meta tags
//-----------------------------------------
$this->registry->output->addMetaTag( 'robots', 'noindex' );
/* What to do */
switch( $this->request['do'] )
{
case 'sendform':
$this->lostPasswordValidateForm();
break;
case '11':
$this->lostPasswordEnd();
break;
case '03':
$this->lostPasswordValidate();
break;
default:
case '10':
$this->lostPasswordForm();
break;
}
/* Output */
$this->registry->output->addContent( $this->output );
$this->registry->output->sendOutput();
}
/**
* Validates a lost password request
*
* @return @e void
*/
public function lostPasswordValidate()
{
/* Check for input and it's in a valid format. */
$in_user_id = intval( trim( urldecode( $this->request['uid'] ) ) );
$in_validate_key = IPSText::md5Clean( trim( urldecode( $this->request['aid'] ) ) );
/* Check Input */
if( ! $in_validate_key )
{
$this->registry->output->showError( 'validation_key_incorrect', 1015 );
}
if( ! preg_match( '/^(?:\d){1,}$/', $in_user_id ) )
{
$this->registry->output->showError( 'uid_key_incorrect', 1016 );
}
/* Attempt to get the profile of the requesting user */
$member = IPSMember::load( $in_user_id );
if( ! $member['member_id'] )
{
$this->registry->output->showError( 'lostpass_no_member', 1017 );
}
/* Get validating info.. */
$validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id=' . $in_user_id . ' and lost_pass=1' ) );
if( ! $validate['member_id'] )
{
$this->registry->output->showError( 'lostpass_not_validating', 1018 );
}
if( ( $validate['new_reg'] == 1 ) && ( $this->settings['reg_auth_type'] == "admin" ) )
{
$this->registry->output->showError( 'lostpass_new_reg', 4010, true );
}
if( $validate['vid'] != $in_validate_key )
{
$this->registry->output->showError( 'lostpass_key_wrong', 1019 );
}
else
{
/* On the same page? */
if( $validate['lost_pass'] != 1 )
{
$this->registry->output->showError( 'lostpass_not_lostpass', 4011, true );
}
/* Test GD image */
if( $this->settings['bot_antispam_type'] != 'none' )
{
if ( $this->registry->getClass('class_captcha')->validate() !== TRUE )
{
$this->lostPasswordValidateForm( 'err_reg_code' );
return;
}
}
/* Send a new random password? */
if( $this->settings['lp_method'] == 'random' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$save_array = array();
//-----------------------------------------
// Generate a new random password
//-----------------------------------------
$new_pass = IPSMember::makePassword();
//-----------------------------------------
// Generate a new salt
//-----------------------------------------
$salt = IPSMember::generatePasswordSalt(5);
$salt = str_replace( '\\', "\\\\", $salt );
//-----------------------------------------
// New log in key
//-----------------------------------------
$key = IPSMember::generateAutoLoginKey();
//-----------------------------------------
// Update...
//-----------------------------------------
$save_array['members_pass_salt'] = $salt;
$save_array['members_pass_hash'] = md5( md5($salt) . md5( $new_pass ) );
$save_array['member_login_key'] = $key;
$save_array['member_login_key_expire'] = $this->settings['login_key_expire'] * 60 * 60 * 24;
$save_array['failed_logins'] = null;
$save_array['failed_login_count'] = 0;
//-----------------------------------------
// Load handler...
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$this->han_login = new $classToLoad( $this->registry );
$this->han_login->init();
$this->han_login->changePass( $member['email'], md5( $new_pass ), $new_pass, $member );
//if ( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' )
//{
// $this->registry->output->showError( $this->lang->words['lostpass_external_fail'], 2013 );
//}
IPSMember::save( $member['member_id'], array( 'members' => $save_array ) );
/* Password has been changed! */
IPSLib::runMemberSync( 'onPassChange', $member['member_id'], $new_pass );
//-----------------------------------------
// Send out the email...
//-----------------------------------------
IPSText::getTextClass('email')->getTemplate( "lost_pass_email_pass", $member['language'] );
IPSText::getTextClass('email')->buildMessage( array(
'NAME' => $member['members_display_name'],
'THE_LINK' => $this->registry->getClass('output')->buildUrl( 'app=core&module=usercp&tab=core&area=email', 'publicNoSession' ),
'PASSWORD' => $new_pass,
'LOGIN' => $this->registry->getClass('output')->buildUrl( 'app=core&module=global&section=login', 'publicNoSession' ),
'USERNAME' => $member['name'],
'EMAIL' => $member['email'],
'ID' => $member['member_id'],
)
);
IPSText::getTextClass('email')->subject = $this->lang->words['lp_random_pass_subject'] . ' ' . $this->settings['board_name'];
IPSText::getTextClass('email')->to = $member['email'];
IPSText::getTextClass('email')->sendMail();
$this->registry->output->setTitle( $this->lang->words['activation_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
$this->output = $this->registry->getClass('output')->getTemplate('register')->showLostPassWaitRandom( $member );
}
else
{
if( $_POST['pass1'] == "" )
{
$this->registry->output->showError( 'pass_blank', 10184 );
}
if( $_POST['pass2'] == "" )
{
$this->registry->output->showError( 'pass_blank', 10185 );
}
$pass_a = trim( $this->request['pass1'] );
$pass_b = trim( $this->request['pass2'] );
if( strlen( $pass_a ) < 3 )
{
$this->registry->output->showError( 'pass_too_short', 10186 );
}
if( $pass_a != $pass_b )
{
$this->registry->output->showError( 'pass_no_match', 10187 );
}
$new_pass = md5( $pass_a );
/* Update Member Array */
$save_array = array();
/* Generate a new salt */
$salt = IPSMember::generatePasswordSalt(5);
$salt = str_replace( '\\', "\\\\", $salt );
/* New log in key */
$key = IPSMember::generateAutoLoginKey();
/* Update Array */
$save_array['members_pass_salt'] = $salt;
$save_array['members_pass_hash'] = md5( md5($salt) . $new_pass );
$save_array['member_login_key'] = $key;
$save_array['member_login_key_expire'] = $this->settings['login_key_expire'] * 60 * 60 * 24;
$save_array['failed_logins'] = null;
$save_array['failed_login_count'] = 0;
/* Change the password */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$this->han_login = new $classToLoad( $this->registry );
$this->han_login->init();
$this->han_login->changePass( $member['email'], $new_pass, $pass_a, $member );
//-----------------------------------------
// We'll ignore any remote errors
//-----------------------------------------
/*if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' )
{
// Pass not changed remotely
}*/
/* Update the member */
IPSMember::save( $member['member_id'], array( 'members' => $save_array ) );
/* Password has been changed! */
IPSLib::runMemberSync( 'onPassChange', $member['member_id'], $pass_a );
/* Remove "dead" validation */
$this->DB->delete( 'validating', "vid='{$validate['vid']}' OR (member_id={$member['member_id']} AND lost_pass=1)" );
$this->registry->output->silentRedirect( $this->registry->getClass('output')->buildUrl( 'app=core&module=global&section=login&do=autologin&frompass=1' ) );
}
}
}
/**
* Completes the lost password request form
*
* @return @e void
*/
public function lostPasswordEnd()
{
if( $this->settings['bot_antispam_type'] != 'none' )
{
if( !$this->registry->getClass('class_captcha')->validate( $this->request['regid'], $this->request['reg_code'] ) )
{
$this->lostPasswordForm( 'err_reg_code' );
return;
}
}
/* Back to the usual programming! :o */
if( $this->request['member_name'] == "" AND $this->request['email_addy'] == "" )
{
$this->registry->output->showError( 'lostpass_name_email', 10110 );
}
/* Check for input and it's in a valid format. */
$member_name = trim( strtolower( $this->request['member_name'] ) );
$email_addy = trim( strtolower( $this->request['email_addy'] ) );
if( $member_name == "" AND $email_addy == "" )
{
$this->registry->output->showError( 'lostpass_name_email', 10111 );
}
/* Attempt to get the user details from the DB */
if( $member_name )
{
$this->DB->build( array( 'select' => 'members_display_name, name, member_id, email, member_group_id', 'from' => 'members', 'where' => "members_l_username='{$member_name}'" ) );
$this->DB->execute();
}
else if( $email_addy )
{
$this->DB->build( array( 'select' => 'members_display_name, name, member_id, email, member_group_id', 'from' => 'members', 'where' => "email='{$email_addy}'" ) );
$this->DB->execute();
}
if ( ! $this->DB->getTotalRows() )
{
$this->registry->output->showError( 'lostpass_no_user', 10112 );
}
else
{
$member = $this->DB->fetch();
/* Is there a validation key? If so, we'd better not touch it */
if( $member['member_id'] == "" )
{
$this->registry->output->showError( 'lostpass_no_mid', 2014 );
}
$validate_key = md5( IPSMember::makePassword() . uniqid( mt_rand(), TRUE ) );
/* Get rid of old entries for this member */
$this->DB->delete( 'validating', "member_id={$member['member_id']} AND lost_pass=1" );
/* Update the DB for this member. */
$db_str = array('vid' => $validate_key,
'member_id' => $member['member_id'],
'temp_group' => $member['member_group_id'],
'entry_date' => time(),
'coppa_user' => 0,
'lost_pass' => 1,
'ip_address' => $this->member->ip_address,
);
/* Are they already in the validating group? */
if( $member['member_group_id'] != $this->settings['auth_group'] )
{
$db_str['real_group'] = $member['member_group_id'];
}
$this->DB->insert( 'validating', $db_str );
/* Send out the email. */
IPSText::getTextClass('email')->getTemplate( 'lost_pass', $member['language'] );
IPSText::getTextClass('email')->buildMessage( array(
'USERNAME' => $member['name'],
'NAME' => $member['members_display_name'],
'THE_LINK' => $this->registry->getClass('output')->buildUrl( "app=core&module=global&section=lostpass&do=sendform&uid={$member['member_id']}&aid={$validate_key}", 'publicNoSession' ),
'MAN_LINK' => $this->registry->getClass('output')->buildUrl( 'app=core&module=global&section=lostpass&do=sendform', 'publicNoSession' ),
'EMAIL' => $member['email'],
'ID' => $member['member_id'],
'CODE' => $validate_key,
'IP_ADDRESS' => $this->member->ip_address,
)
);
IPSText::getTextClass('email')->subject = $this->lang->words['lp_subject'] . ' ' . $this->settings['board_name'];
IPSText::getTextClass('email')->to = $member['email'];
IPSText::getTextClass('email')->sendMail();
$this->output = $this->registry->getClass('output')->getTemplate('register')->lostPasswordWait( $member );
}
$this->registry->output->setTitle( $this->lang->words['lost_pass_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
}
/**
* Displays the lost password form
*
* @param string $errors
* @return @e void
*/
public function lostPasswordForm( $errors="" )
{
//-----------------------------------------
// Do we have another URL for password resets?
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$han_login = new $classToLoad( $this->registry );
$han_login->init();
$han_login->checkMaintenanceRedirect();
/* CAPTCHA */
if( $this->settings['bot_antispam_type'] != 'none' )
{
$captchaHTML = $this->registry->getClass('class_captcha')->getTemplate();
}
$this->registry->output->setTitle( $this->lang->words['lost_pass_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
$this->registry->output->addNavigation( $this->lang->words['lost_pass_form'], '' );
$this->output .= $this->registry->output->getTemplate('register')->lostPasswordForm( $this->lang->words[ $errors ] );
if ( $this->settings['bot_antispam_type'] != 'none' )
{
$this->output = str_replace( "<!--{REG.ANTISPAM}-->", $captchaHTML, $this->output );
}
}
/**
* Shows the form for validating a lost password request
*
* @param string $msg
* @return @e void
*/
public function lostPasswordValidateForm( $msg='' )
{
$this->output .= $this->registry->getClass('output')->getTemplate('register')->showLostpassForm( $this->lang->words[$msg] );
/* Check for input and it's in a valid format. */
if( $this->request['uid'] AND $this->request['aid'] )
{
$in_user_id = intval( trim( urldecode( $this->request['uid'] ) ) );
$in_validate_key = IPSText::md5Clean( trim( urldecode( $this->request['aid'] ) ) );
$in_type = trim( $this->request['type'] );
if ($in_type == "")
{
$in_type = 'reg';
}
/* Check and test input */
if ( ! $in_validate_key )
{
$this->registry->output->showError( 'validation_key_incorrect', 10113 );
}
if (! preg_match( '/^(?:\d){1,}$/', $in_user_id ) )
{
$this->registry->output->showError( 'uid_key_incorrect', 10114 );
}
/* Attempt to get the profile of the requesting user */
$member = IPSMember::load( $in_user_id );
if( ! $member['member_id'] )
{
$this->registry->output->showError( 'lostpass_no_member', 10115 );
}
/* Get validating info.. */
$validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => "member_id={$in_user_id} and vid='{$in_validate_key}' and lost_pass=1" ) );
if( ! $validate['member_id'] )
{
$this->registry->output->showError( 'validation_key_incorrect', 10116 );
}
$this->output = str_replace( "<!--IBF.INPUT_TYPE-->", $this->registry->output->getTemplate('register')->show_lostpass_form_auto( $in_validate_key, $in_user_id ), $this->output );
}
else
{
$this->output = str_replace( "<!--IBF.INPUT_TYPE-->", $this->registry->output->getTemplate('register')->show_lostpass_form_manual(), $this->output );
}
/* CAPTCHA */
if( $this->settings['bot_antispam_type'] != 'none' )
{
$this->output = str_replace( "<!--{REG.ANTISPAM}-->", $this->registry->getClass('class_captcha')->getTemplate(), $this->output );
}
$this->registry->output->setTitle( $this->lang->words['activation_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
$this->registry->output->addNavigation( $this->lang->words['activation_form'], '' );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Recover Lost Password
* Last Updated: $Date: 2012-11-28 04:54:58 -0500 (Wed, 28 Nov 2012) $
* </pre>
*
* @author $Author $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 11651 $
*
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
class public_core_global_lostpass extends ipsCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen/redirects]
*/
public function doExecute( ipsRegistry $registry )
{
/* Load language */
$this->registry->class_localization->loadLanguageFile( array( 'public_register' ), 'core' );
//-----------------------------------------
// Meta tags
//-----------------------------------------
$this->registry->output->addMetaTag( 'robots', 'noindex' );
/* What to do */
switch( $this->request['do'] )
{
case 'sendform':
$this->lostPasswordValidateForm();
break;
case '11':
$this->lostPasswordEnd();
break;
case '03':
$this->lostPasswordValidate();
break;
default:
case '10':
$this->lostPasswordForm();
break;
}
/* Output */
$this->registry->output->addContent( $this->output );
$this->registry->output->sendOutput();
}
/**
* Validates a lost password request
*
* @return @e void
*/
public function lostPasswordValidate()
{
/* Check for input and it's in a valid format. */
$in_user_id = intval( trim( urldecode( $this->request['uid'] ) ) );
$in_validate_key = IPSText::md5Clean( trim( urldecode( $this->request['aid'] ) ) );
/* Check Input */
if( ! $in_validate_key )
{
$this->registry->output->showError( 'validation_key_incorrect', 1015 );
}
if( ! preg_match( '/^(?:\d){1,}$/', $in_user_id ) )
{
$this->registry->output->showError( 'uid_key_incorrect', 1016 );
}
/* Attempt to get the profile of the requesting user */
$member = IPSMember::load( $in_user_id );
if( ! $member['member_id'] )
{
$this->registry->output->showError( 'lostpass_no_member', 1017 );
}
/* Get validating info.. */
$validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id=' . $in_user_id . ' and lost_pass=1' ) );
if( ! $validate['member_id'] )
{
$this->registry->output->showError( 'lostpass_not_validating', 1018 );
}
if( ( $validate['new_reg'] == 1 ) && ( $this->settings['reg_auth_type'] == "admin" ) )
{
$this->registry->output->showError( 'lostpass_new_reg', 4010, true );
}
if( $validate['vid'] != $in_validate_key )
{
$this->registry->output->showError( 'lostpass_key_wrong', 1019 );
}
else
{
/* On the same page? */
if( $validate['lost_pass'] != 1 )
{
$this->registry->output->showError( 'lostpass_not_lostpass', 4011, true );
}
/* Send a new random password? */
if( $this->settings['lp_method'] == 'random' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$save_array = array();
//-----------------------------------------
// Generate a new random password
//-----------------------------------------
$new_pass = IPSMember::makePassword();
//-----------------------------------------
// Generate a new salt
//-----------------------------------------
$salt = IPSMember::generatePasswordSalt(5);
$salt = str_replace( '\\', "\\\\", $salt );
//-----------------------------------------
// New log in key
//-----------------------------------------
$key = IPSMember::generateAutoLoginKey();
//-----------------------------------------
// Update...
//-----------------------------------------
$save_array['members_pass_salt'] = $salt;
$save_array['members_pass_hash'] = md5( md5($salt) . md5( $new_pass ) );
$save_array['member_login_key'] = $key;
$save_array['member_login_key_expire'] = $this->settings['login_key_expire'] * 60 * 60 * 24;
$save_array['failed_logins'] = null;
$save_array['failed_login_count'] = 0;
//-----------------------------------------
// Load handler...
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$this->han_login = new $classToLoad( $this->registry );
$this->han_login->init();
$this->han_login->changePass( $member['email'], md5( $new_pass ), $new_pass, $member );
//if ( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' )
//{
// $this->registry->output->showError( $this->lang->words['lostpass_external_fail'], 2013 );
//}
IPSMember::save( $member['member_id'], array( 'members' => $save_array ) );
/* Password has been changed! */
IPSLib::runMemberSync( 'onPassChange', $member['member_id'], $new_pass );
//-----------------------------------------
// Send out the email...
//-----------------------------------------
$message = array( 'NAME' => $member['members_display_name'],
'THE_LINK' => $this->registry->getClass('output')->buildSEOUrl( 'app=core&module=usercp&tab=core&area=email', 'publicNoSession', 'flase' ),
'PASSWORD' => $new_pass,
'LOGIN' => $this->registry->getClass('output')->buildSEOUrl( 'app=core&module=global&section=login', 'publicNoSession', 'false' ),
'USERNAME' => $member['name'],
'EMAIL' => $member['email'],
'ID' => $member['member_id'] );
IPSText::getTextClass('email')->setPlainTextTemplate( IPSText::getTextClass('email')->getTemplate( "lost_pass_email_pass", $member['language'] ) );
IPSText::getTextClass('email')->buildPlainTextContent( $message );
IPSText::getTextClass('email')->buildHtmlContent( $message );
IPSText::getTextClass('email')->subject = $this->lang->words['lp_random_pass_subject'] . ' ' . $this->settings['board_name'];
IPSText::getTextClass('email')->to = $member['email'];
IPSText::getTextClass('email')->sendMail();
$this->registry->output->setTitle( $this->lang->words['activation_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
$this->output = $this->registry->getClass('output')->getTemplate('register')->showLostPassWaitRandom( $member );
}
else
{
if( $_POST['pass1'] == "" )
{
$this->registry->output->showError( 'pass_blank', 10184 );
}
if( $_POST['pass2'] == "" )
{
$this->registry->output->showError( 'pass_blank', 10185 );
}
$pass_a = trim( $this->request['pass1'] );
$pass_b = trim( $this->request['pass2'] );
/*
There's no reason for this - http://community.invisionpower.com/resources/bugs.html/_/ip-board/registrations-limit-passwords-to-32-characters-for-no-apparent-reason-r37770
if( strlen( $pass_a ) < 3 )
{
$this->registry->output->showError( 'pass_too_short', 10186 );
}
*/
if( $pass_a != $pass_b )
{
$this->registry->output->showError( 'pass_no_match', 10187 );
}
$new_pass = md5( $pass_a );
/* Update Member Array */
$save_array = array();
/* Generate a new salt */
$salt = IPSMember::generatePasswordSalt(5);
$salt = str_replace( '\\', "\\\\", $salt );
/* New log in key */
$key = IPSMember::generateAutoLoginKey();
/* Update Array */
$save_array['members_pass_salt'] = $salt;
$save_array['members_pass_hash'] = md5( md5($salt) . $new_pass );
$save_array['member_login_key'] = $key;
$save_array['member_login_key_expire'] = $this->settings['login_key_expire'] * 60 * 60 * 24;
$save_array['failed_logins'] = null;
$save_array['failed_login_count'] = 0;
/* Change the password */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$this->han_login = new $classToLoad( $this->registry );
$this->han_login->init();
$this->han_login->changePass( $member['email'], $new_pass, $pass_a, $member );
//-----------------------------------------
// We'll ignore any remote errors
//-----------------------------------------
/*if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' )
{
// Pass not changed remotely
}*/
/* Update the member */
IPSMember::save( $member['member_id'], array( 'members' => $save_array ) );
/* Password has been changed! */
IPSLib::runMemberSync( 'onPassChange', $member['member_id'], $pass_a );
/* Remove "dead" validation */
$this->DB->delete( 'validating', "vid='{$validate['vid']}' OR (member_id={$member['member_id']} AND lost_pass=1)" );
$this->registry->output->silentRedirect( $this->registry->getClass('output')->buildSEOUrl( 'app=core&module=global&section=login&do=autologin&frompass=1' ) );
}
}
}
/**
* Completes the lost password request form
*
* @return @e void
*/
public function lostPasswordEnd()
{
if( $this->settings['bot_antispam_type'] != 'none' )
{
if( !$this->registry->getClass('class_captcha')->validate( $this->request['regid'], $this->request['reg_code'] ) )
{
$this->lostPasswordForm( 'err_reg_code' );
return;
}
}
/* Back to the usual programming! :o */
if( $this->request['member_name'] == "" AND $this->request['email_addy'] == "" )
{
$this->registry->output->showError( 'lostpass_name_email', 10110 );
}
/* Check for input and it's in a valid format. */
$member_name = trim( mb_strtolower( $this->request['member_name'] ) );
$email_addy = trim( strtolower( $this->request['email_addy'] ) );
if( $member_name == "" AND $email_addy == "" )
{
$this->registry->output->showError( 'lostpass_name_email', 10111 );
}
/* Attempt to get the user details from the DB */
if( $member_name )
{
$this->DB->build( array( 'select' => 'members_display_name, name, member_id, email, member_group_id', 'from' => 'members', 'where' => "members_l_username='{$member_name}'" ) );
$this->DB->execute();
}
else if( $email_addy )
{
$this->DB->build( array( 'select' => 'members_display_name, name, member_id, email, member_group_id', 'from' => 'members', 'where' => "email='{$email_addy}'" ) );
$this->DB->execute();
}
if ( ! $this->DB->getTotalRows() )
{
$this->registry->output->showError( 'lostpass_no_user', 10112 );
}
else
{
$member = $this->DB->fetch();
/* Is there a validation key? If so, we'd better not touch it */
if( $member['member_id'] == "" )
{
$this->registry->output->showError( 'lostpass_no_mid', 2014 );
}
$validate_key = md5( IPSMember::makePassword() . uniqid( mt_rand(), TRUE ) );
/* Get rid of old entries for this member */
$this->DB->delete( 'validating', "member_id={$member['member_id']} AND lost_pass=1" );
/* Update the DB for this member. */
$db_str = array('vid' => $validate_key,
'member_id' => $member['member_id'],
'temp_group' => $member['member_group_id'],
'entry_date' => time(),
'coppa_user' => 0,
'lost_pass' => 1,
'ip_address' => $this->member->ip_address,
);
/* Are they already in the validating group? */
if( $member['member_group_id'] != $this->settings['auth_group'] )
{
$db_str['real_group'] = $member['member_group_id'];
}
$this->DB->insert( 'validating', $db_str );
/* Send out the email. */
$message = array( 'USERNAME' => $member['name'],
'NAME' => $member['members_display_name'],
'THE_LINK' => $this->registry->getClass('output')->buildSEOUrl( "app=core&module=global&section=lostpass&do=sendform&uid={$member['member_id']}&aid={$validate_key}", 'publicNoSession', 'false' ),
'MAN_LINK' => $this->registry->getClass('output')->buildSEOUrl( 'app=core&module=global&section=lostpass&do=sendform', 'publicNoSession', 'false' ),
'EMAIL' => $member['email'],
'ID' => $member['member_id'],
'CODE' => $validate_key,
'IP_ADDRESS' => $this->member->ip_address );
IPSText::getTextClass('email')->setPlainTextTemplate( IPSText::getTextClass('email')->getTemplate( "lost_pass", $member['language'] ) );
IPSText::getTextClass('email')->buildPlainTextContent( $message );
IPSText::getTextClass('email')->buildHtmlContent( $message );
IPSText::getTextClass('email')->subject = $this->lang->words['lp_subject'] . ' ' . $this->settings['board_name'];
IPSText::getTextClass('email')->to = $member['email'];
IPSText::getTextClass('email')->sendMail();
$this->output = $this->registry->getClass('output')->getTemplate('register')->lostPasswordWait( $member );
}
$this->registry->output->setTitle( $this->lang->words['lost_pass_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
}
/**
* Displays the lost password form
*
* @param string $errors
* @return @e void
*/
public function lostPasswordForm( $errors="" )
{
//-----------------------------------------
// Do we have another URL for password resets?
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$han_login = new $classToLoad( $this->registry );
$han_login->init();
$han_login->checkMaintenanceRedirect();
/* CAPTCHA */
if( $this->settings['bot_antispam_type'] != 'none' )
{
$captchaHTML = $this->registry->getClass('class_captcha')->getTemplate();
}
$this->registry->output->setTitle( $this->lang->words['lost_pass_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
$this->registry->output->addNavigation( $this->lang->words['lost_pass_form'], '' );
$this->output .= $this->registry->output->getTemplate('register')->lostPasswordForm( $this->lang->words[ $errors ] );
if ( $this->settings['bot_antispam_type'] != 'none' )
{
$this->output = str_replace( "<!--{REG.ANTISPAM}-->", $captchaHTML, $this->output );
}
}
/**
* Shows the form for validating a lost password request
*
* @param string $msg
* @return @e void
*/
public function lostPasswordValidateForm( $msg='' )
{
$this->output .= $this->registry->getClass('output')->getTemplate('register')->showLostpassForm( $this->lang->words[$msg] );
/* Check for input and it's in a valid format. */
if( $this->request['uid'] AND $this->request['aid'] )
{
$in_user_id = intval( trim( urldecode( $this->request['uid'] ) ) );
$in_validate_key = IPSText::md5Clean( trim( urldecode( $this->request['aid'] ) ) );
$in_type = trim( $this->request['type'] );
if ($in_type == "")
{
$in_type = 'reg';
}
/* Check and test input */
if ( ! $in_validate_key )
{
$this->registry->output->showError( 'validation_key_incorrect', 10113 );
}
if (! preg_match( '/^(?:\d){1,}$/', $in_user_id ) )
{
$this->registry->output->showError( 'uid_key_incorrect', 10114 );
}
/* Attempt to get the profile of the requesting user */
$member = IPSMember::load( $in_user_id );
if( ! $member['member_id'] )
{
$this->registry->output->showError( 'lostpass_no_member', 10115 );
}
/* Get validating info.. */
$validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => "member_id={$in_user_id} and vid='{$in_validate_key}' and lost_pass=1" ) );
if( ! $validate['member_id'] )
{
$this->registry->output->showError( 'validation_key_incorrect', 10116 );
}
$this->output = str_replace( "<!--IBF.INPUT_TYPE-->", $this->registry->output->getTemplate('register')->show_lostpass_form_auto( $in_validate_key, $in_user_id ), $this->output );
}
else
{
$this->output = str_replace( "<!--IBF.INPUT_TYPE-->", $this->registry->output->getTemplate('register')->show_lostpass_form_manual(), $this->output );
}
$this->registry->output->setTitle( $this->lang->words['activation_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
$this->registry->output->addNavigation( $this->lang->words['activation_form'], '' );
}
}
@@ -0,0 +1,125 @@
<?php
/**
* Invision Power Services
* IP.SEO - Manage Meta Tags
* Last Updated: $Date: 2012-05-10 21:10:13 +0100 (Thu, 10 May 2012) $
*
* @author $Author: bfarber $ (Orginal: Mark)
* @copyright © 2011 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.SEO
* @link http://www.invisionpower.com
* @since 15th August 2011
* @version $Revision: 10721 $
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly.";
exit();
}
class public_core_global_meta extends ipsCommand
{
/**
* Main class entry point
*
* @access public
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
if ( $this->request['do'] != 'end' )
{
/* Are we a logged in admin? */
if ( empty($this->memberData['member_id']) || empty($this->memberData['g_access_cp']) )
{
$this->registry->output->showError( 'meta_editor_no_admin', 'IPSEO-META-ADMIN' );
}
/* Permission Check */
require_once IPS_ROOT_PATH . 'sources/classes/class_permissions.php';
$class_permissions = new class_permissions( $this->registry );
$class_permissions->checkPermissionAutoMsg( 'settemplates_meta', 'core', 'templates' );
}
switch ( $this->request['do'] )
{
case 'init':
$this->init();
break;
case 'save':
$this->save();
break;
case 'end':
$this->end();
break;
}
}
/**
* Activates the live meta editor
*
* @return @e void
*/
public function init()
{
/* Enable live meta editor and redirect */
IPSMember::packMemberCache( $this->memberData['member_id'], array( 'ipseo_live_meta_edit' => 1 ) );
$this->registry->output->silentRedirect( $this->settings['base_url'] );
}
/**
* Saves the meta tags for the page
*
* @return @e void
*/
public function save()
{
//-----------------------------------------
// Save em
//-----------------------------------------
/* Delete any DB entries for this page as we're about to rebuild them */
$escapedPage = $this->DB->addSlashes( $this->request['url'] );
$this->DB->delete( 'seo_meta', "url='{$escapedPage}'" );
/* Insert Tags */
foreach( $this->request['meta-tags-title'] as $k => $v )
{
if ( $v )
{
$cache[ $this->request['url'] ][ $v ] = $this->request['meta-tags-content'][ $k ];
$this->DB->insert('seo_meta', array(
'url' => $this->request['url'],
'name' => $v,
'content' => $this->request['meta-tags-content'][ $k ]
) );
}
}
/* Rebuild Cache */
ips_CacheRegistry::instance()->rebuildCache( 'meta_tags' );
/* Boink */
$this->registry->output->silentRedirect( ipsRegistry::$settings['base_url'] . $this->request['url'] );
}
/**
* Disables the live meta editor
*
* @return @e void
*/
public function end()
{
IPSMember::packMemberCache( $this->memberData['member_id'], array( 'ipseo_live_meta_edit' => 0 ) );
$this->registry->output->silentRedirect( ipsRegistry::$settings['base_url'] . $this->request['url'] );
}
}
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Captcha
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2013-04-16 15:13:53 -0400 (Tue, 16 Apr 2013) $
* </pre>
*
* @author $Author $
@@ -14,7 +14,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 10914 $
* @version $Rev: 12182 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -34,7 +34,13 @@ class public_core_global_navigation extends ipsCommand
public function doExecute( ipsRegistry $registry )
{
/* Set up */
$inapp = trim( $this->request['inapp'] );
$inapp = is_string( $this->request['inapp'] ) ? trim( $this->request['inapp'] ) : "";
if ( !$inapp )
{
$this->registry->output->showError( 'invalid_app', 1040007, null, null, 500 );
}
/* Load navigation stuff */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/navigation/build.php', 'classes_navigation_build' );
@@ -43,7 +49,7 @@ class public_core_global_navigation extends ipsCommand
/* Return */
$html = $this->registry->output->getTemplate( 'global_other' )->quickNavigationWrapper( $navigation->loadApplicationTabs(), $navigation->loadNavigationData(), $inapp );
$this->registry->getClass('output')->setTitle( $this->lang->words['navigation_title'] );
$this->registry->getClass('output')->setTitle( $this->lang->words['navigation_title'] . ' - ' . IPSLib::getAppTitle( $inapp ) );
$this->registry->getClass('output')->addContent( $html );
$this->registry->getClass('output')->sendOutput();
}
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Show forum rules
* Last Updated: $Date: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $
* </pre>
File diff suppressed because it is too large. Load diff
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Reputation
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2013-04-16 15:13:53 -0400 (Tue, 16 Apr 2013) $
* </pre>
*
* @author $Author $
@@ -13,7 +13,7 @@
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 12182 $
*
*/
@@ -81,7 +81,7 @@ class public_core_global_reputation extends ipsCommand
/* Redirect to */
$return_url = '';
if( !empty( $this->request['post_return'] ) )
if( !empty( $this->request['post_return'] ) && $app == 'forums' )
{
$return_url = $this->settings['base_url'] . 'app=forums&module=forums&section=findpost&pid=' . intval( $this->request['post_return'] );
}
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* RSS output functionality
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since Friday 18th March 2005
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Captcha
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2013-01-07 12:09:37 -0500 (Mon, 07 Jan 2013) $
* </pre>
*
* @author $Author $
@@ -14,7 +14,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 10914 $
* @version $Rev: 11791 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -38,13 +38,7 @@ class public_core_global_share extends ipsCommand
{
$this->registry->output->showError( 'no_permission', 100234.1, false, null, 403 );
}
/* Disable for bots */
if( $this->member->is_not_human )
{
$this->registry->output->showError( 'no_permission', 100234.2, false, null, 403 );
}
$url = IPSText::base64_decode_urlSafe( $this->request['url'] );
$title = IPSText::base64_decode_urlSafe( $this->request['title'] );
$key = trim( $this->request['key'] );
@@ -0,0 +1,56 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Sitemap Forwarder
* Last Updated: $Date: 2012-05-10 21:10:13 +0100 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 27th June 2012
* @version $Rev: 10721 $
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
class public_core_global_sitemap extends ipsCommand
{
public function doExecute( ipsRegistry $registry )
{
// Requesting a sitemap?
if(!array_key_exists('sitemap', $this->request))
{
$this->registry->output->showError( 'error_generic', 10850, null, null, 404 );
return false;
}
// Got a valid name?
if(!preg_match('/sitemap\_([a-zA-Z0-9\_]+)\.xml(\.gz)?/', $this->request['sitemap']))
{
$this->registry->output->showError( 'error_generic', 10850, null, null, 404 );
return false;
}
// Got a valid file?
if(!file_exists( IPS_CACHE_PATH . 'cache/' . $this->request['sitemap']))
{
$this->registry->output->showError( 'error_generic', 10850, null, null, 404 );
return false;
}
header('Content-Type: ' . (strpos($this->request['sitemap'], '.gz') ? 'application/x-gzip' : 'application/xml'));
header('Content-Disposition: attachment; filename=' . $this->request['sitemap']);
print file_get_contents( IPS_CACHE_PATH . 'cache/' . $this->request['sitemap']);
}
}
@@ -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: AndyMillne $
* @since 27 March 2012
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* @version v3.3.4
* $Revision: 10914 $
* $LastChangedDate: 2012-09-17 12:07:56 -0400 (Mon, 17 Sep 2012) $
* @version v3.4.5
* $Revision: 11342 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -52,7 +52,7 @@ class public_core_global_skin extends ipsCommand
if ( ( $this->request['skinId'] != 'setAsMobile' ) && $this->request['k'] != $this->member->form_hash )
{
$this->registry->output->showError('no_permission');
$this->registry->output->showError('no_permission', 10122243, FALSE, '', 403);
}
if ( is_numeric( $skinId ) )
@@ -0,0 +1,45 @@
<?php
/**
* @file unsubscribe.php Unsubscribes user from bulk mails
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: ips_terabyte $
* @since 23 August 2012
* $LastChangedDate: 2012-04-05 17:35:31 +0100 (Thu, 05 Apr 2012) $
* @version v3.4.5
* $Revision: 10571 $
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}
/**
* @class public_core_global_unsubscribe
* @brief Unsubscribes user from bulk mails
*/
class public_core_global_unsubscribe extends ipsCommand
{
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$member = IPSMember::load( intval( $this->request['member'] ), 'none', 'id' );
if ( $member['member_id'] and $this->request['key'] == md5( $member['email'] . ':' . $member['members_pass_hash'] ) )
{
IPSMember::save( $member['member_id'], array( 'members' => array( 'allow_admin_mails' => 0 ) ) );
$this->registry->getClass('output')->addContent( $this->registry->output->getTemplate( 'ucp' )->unsubscribed() );
$this->registry->getClass('output')->sendOutput();
}
$this->registry->output->showError( 'email_no_unsubscribe' );
}
}
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
@@ -2,18 +2,18 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Help File System
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-11-15 09:58:24 -0500 (Thu, 15 Nov 2012) $
* </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
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 11605 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -160,7 +160,7 @@ class public_core_help_help extends ipsCommand
);
/* Navigation */
$this->registry->output->setTitle( $this->lang->words['help_topic'] . ' - ' . ipsRegistry::$settings['board_name'] );
$this->registry->output->setTitle( $this->lang->words['help_topic'] . ': ' . $topic['title'] . ' - ' . ipsRegistry::$settings['board_name'] );
$this->registry->output->addNavigation( $this->lang->words['help_topics'], "app=core&amp;module=help" );
$this->registry->output->addNavigation( $this->lang->words['help_topic'], '' );
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 2/14/2011
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
@@ -3,11 +3,11 @@
* @file modcp.php Moderator control panel
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* $Author: AndyMillne $
* @since 2/14/2011
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* @version v3.3.4
* $Revision: 10914 $
* $LastChangedDate: 2013-05-28 10:00:25 -0400 (Tue, 28 May 2013) $
* @version v3.4.5
* $Revision: 12273 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -183,15 +183,15 @@ class public_core_modcp_modcp extends ipsCommand
break;
case 'doeditmember':
$this->_doEditMember();
$_output = $this->_doEditMember();
break;
case 'setAsSpammer':
$this->_setAsSpammer();
$_output = $this->_setAsSpammer();
break;
default:
$_output = $this->registry->output->getTemplate('modcp')->memberLookup();
$_output = $this->registry->output->getTemplate('modcp')->overview();
break;
}
}
@@ -415,41 +415,33 @@ class public_core_modcp_modcp extends ipsCommand
// Init
//-----------------------------------------
$editable = array();
$editable = array();
$isHtml = intval( $this->request['sig_htmlstatus'] );
//-----------------------------------------
// Signature and about me
//-----------------------------------------
$signature = $this->editor->process( $_POST['Post'] );
$aboutme = $this->editor->process( $_POST['aboutme'] );
/* Load parser */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser' );
$parser = new $classToLoad();
$this->editor->setLegacyMode(false);
//-----------------------------------------
// Parse signature
//-----------------------------------------
IPSText::getTextClass('bbcode')->parse_smilies = 0;
IPSText::getTextClass('bbcode')->parse_html = $this->caches['group_cache'][ $this->warn_member['member_group_id'] ]['g_dohtml'];
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'signatures';
IPSText::getTextClass('bbcode')->parsing_mgroup = $this->warn_member['member_group_id'];
IPSText::getTextClass('bbcode')->parsing_mgroup_others = $this->warn_member['mgroup_others'];
$signature = IPSText::getTextClass('bbcode')->preDbParse( $signature );
$signatureCache = IPSText::getTextClass('bbcode')->preDisplayParse( $signature );
/* Set content in editor */
$this->editor->setAllowBbcode( true );
$this->editor->setAllowSmilies( false );
$this->editor->setIsHtml( $this->caches['group_cache'][ $this->warn_member['member_group_id'] ]['g_dohtml'] && $isHtml );
$this->editor->setBbcodeSection('signatures');
$signature = $this->editor->process( $_POST['Post'] );
//-----------------------------------------
// Parse about me
//-----------------------------------------
IPSText::getTextClass('bbcode')->parse_smilies = 1;
IPSText::getTextClass('bbcode')->parse_html = $this->caches['group_cache'][ $this->warn_member['member_group_id'] ]['g_dohtml'];
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'aboutme';
IPSText::getTextClass('bbcode')->parsing_mgroup = $this->warn_member['member_group_id'];
IPSText::getTextClass('bbcode')->parsing_mgroup_others = $this->warn_member['mgroup_others'];
$aboutme = IPSText::getTextClass('bbcode')->preDbParse( $aboutme );
/* About Me */
$aboutme = $this->editor->process( $_POST['aboutme'] );
//-----------------------------------------
// Add to array to save
@@ -458,6 +450,10 @@ class public_core_modcp_modcp extends ipsCommand
$save['extendedProfile'] = array( 'signature' => $signature, 'pp_about_me' => $aboutme );
$save['members'] = array( 'title' => $this->request['title'] );
//-----------------------------------------
// Removing photo?
//-----------------------------------------
if ( $this->request['photo'] == 1 )
{
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/member/photo.php', 'classes_member_photo' );
@@ -465,6 +461,25 @@ class public_core_modcp_modcp extends ipsCommand
$photos->remove( $this->warn_member['member_id'] );
}
//-----------------------------------------
// Removing Restrictions?
//-----------------------------------------
if ( $this->request['modpreview'] == 1 )
{
$save['core']['mod_posts'] = 0;
}
if ( $this->request['postingrestriction'] == 1 )
{
$save['core']['restrict_post'] = 0;
}
if ( $this->request['remove_suspension'] == 1 )
{
$save['core']['temp_ban'] = 0;
}
//-----------------------------------------
// Profile fields
//-----------------------------------------
@@ -483,10 +498,13 @@ class public_core_modcp_modcp extends ipsCommand
//-----------------------------------------
// Bitwise
//-----------------------------------------
$bw = IPSBWOptions::thaw( $this->warn_member['members_bitoptions'], 'members' );
$bw['bw_no_status_update'] = ( $this->request['status_updates'] ) ? 0 : 1;
$save['core']['members_bitoptions'] = IPSBWOptions::freeze( $bw, 'members' );
if ( isset( $this->request['status_updates'] ) )
{
$bw = IPSBWOptions::thaw( $this->warn_member['members_bitoptions'], 'members' );
$bw['bw_no_status_update'] = ( $this->request['status_updates'] ) ? 0 : 1;
$save['core']['members_bitoptions'] = IPSBWOptions::freeze( $bw, 'members' );
}
//-----------------------------------------
// Write it to the DB.
@@ -498,7 +516,8 @@ class public_core_modcp_modcp extends ipsCommand
// Update signature content cache
//-----------------------------------------
IPSContentCache::update( $this->warn_member['member_id'], 'sig', $signatureCache );
/* Update cache */
IPSContentCache::update( $this->warn_member['member_id'], 'sig', $parser->display( $signature ) );
//-----------------------------------------
// Add a mod log entry and redirect
@@ -540,7 +559,12 @@ class public_core_modcp_modcp extends ipsCommand
{
$this->registry->output->showError( 'moderate_no_permission', 10311900, true, null, 404 );
}
if ( ! $this->memberData['g_access_cp'] AND $member['g_access_cp'] )
{
return $this->registry->getClass('output')->getTemplate('modcp')->modcpMessage( $this->lang->words['mod_cannot_edit_admin'] );
}
//-----------------------------------------
// Check permissions
//-----------------------------------------
@@ -555,6 +579,11 @@ class public_core_modcp_modcp extends ipsCommand
$this->registry->output->showError( 'moderate_no_permission', 10311901, true, null, 403 );
}
if ( $this->request['auth_key'] != $this->member->form_hash )
{
$this->registry->output->showError( 'moderate_no_permission', 10311902, null, null, 403 );
}
//-----------------------------------------
// Do it
//-----------------------------------------
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
@@ -7,9 +7,9 @@
* $Author: AndyMillne $
* @author Based on original "Report Center" by Luke Scott
* @since -
* $LastChangedDate: 2012-06-26 07:24:43 -0400 (Tue, 26 Jun 2012) $
* @version v3.3.4
* $Revision: 10987 $
* $LastChangedDate: 2012-12-13 08:29:08 -0500 (Thu, 13 Dec 2012) $
* @version v3.4.5
* $Revision: 11713 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -275,7 +275,7 @@ class public_core_reports_reports extends ipsCommand
//-----------------------------------------
$COM_PERM = $this->registry->getClass('reportLibrary')->buildQueryPermissions();
$reports = array();
//-----------------------------------------
@@ -424,6 +424,11 @@ class public_core_reports_reports extends ipsCommand
$this->registry->getClass('output')->showError( 'no_permission', 20112, null, null, 403 );
}
if ( $this->request['newstatus'] == 'x' )
{
$this->registry->getClass('output')->showError( 'invalid_option', 20113, null, null, 403 );
}
//-----------------------------------------
// Are we pruning?
//-----------------------------------------
@@ -627,6 +632,18 @@ class public_core_reports_reports extends ipsCommand
$this->registry->getClass('output')->showError( 'no_permission', 20114, null, null, 403 );
}
//-----------------------------------------
// Check Captcha
//-----------------------------------------
if ( ! $this->memberData['member_id'] AND $this->settings['guest_captcha'] AND $this->settings['bot_antispam_type'] != 'none' )
{
if ( !$this->registry->getClass('class_captcha')->validate() )
{
$this->registry->output->showError( 'posting_bad_captcha', '20116', null, null, 403 );
}
}
//-----------------------------------------
// Empty report
//-----------------------------------------
@@ -698,13 +715,11 @@ class public_core_reports_reports extends ipsCommand
}
$COM_PERM = $this->registry->getClass('reportLibrary')->buildQueryPermissions();
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parse_html = 0;
IPSText::getTextClass('bbcode')->parse_emoticons = 1;
IPSText::getTextClass('bbcode')->parse_nl2br = 0;
IPSText::getTextClass('bbcode')->parsing_section = 'global';
/* Load parser */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser.php', 'classes_text_parser' );
$parser = new $classToLoad();
//-----------------------------------------
// Get reports
//-----------------------------------------
@@ -714,9 +729,6 @@ class public_core_reports_reports extends ipsCommand
while( $row = $this->DB->fetch($outer) )
{
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id'];
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others'];
$row['points'] = isset( $row['points'] ) ? $row['points'] : $this->settings['_tmpPoints'][ $row['id'] ];
if( !$options['url'] && $row['url'] )
@@ -757,7 +769,15 @@ class public_core_reports_reports extends ipsCommand
}
$row['title'] = $row['_title'];
$row['report'] = IPSText::getTextClass('bbcode')->preDisplayParse( $row['report'] );
/* Set up some settings */
$parser->set( array( 'parseArea' => 'reports',
'memberData' => $row['author'],
'parseBBCode' => true,
'parseHtml' => false,
'parseEmoticons' => true ) );
$row['report'] = $parser->display( $row['report'] );
$reports[] = $row;
}
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
File diff suppressed because it is too large. Load diff
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Task Manager
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -13,7 +13,7 @@
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*
*/
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* User control panel resolver
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2013-05-06 14:16:05 -0400 (Mon, 06 May 2013) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 1st march 2002
* @version $Revision: 10914 $
* @version $Revision: 12229 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -121,6 +121,12 @@ class public_core_usercp_manualResolver extends ipsCommand
}
$__class = IPSLib::loadLibrary( $ext_dir . '/usercpForms.php', 'usercpForms_' . $app_dir, $app_dir );
if( !class_exists($__class) )
{
continue;
}
$_usercp_module = new $__class();
/* Block based on version to prevent old files showing up/causing an error */