Version 3.3.4
This commit is contained in:
1 parent
78706903a2
commit
fb6b5baabc
1567 files changed
+139084
-112240
No files matched your search
Binary file not shown.
@@ -3,11 +3,11 @@
|
|||||||
* @file api_core.php Core functions for the API classes
|
* @file api_core.php Core functions for the API classes
|
||||||
*~TERABYTE_DOC_READY~
|
*~TERABYTE_DOC_READY~
|
||||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* $License: This is NULLED!
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* $Author: ips_terabyte $
|
* $Author: ips_terabyte $
|
||||||
* @since -
|
* @since -
|
||||||
* $LastChangedDate: 2011-03-18 17:34:15 -0400 (Fri, 18 Mar 2011) $
|
* $LastChangedDate: 2011-03-18 17:34:15 -0400 (Fri, 18 Mar 2011) $
|
||||||
* @version v3.2.3
|
* @version v3.3.4
|
||||||
* $Revision: 8129 $
|
* $Revision: 8129 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
* @file api_topic_view.php Forums topic view API
|
* @file api_topic_view.php Forums topic view API
|
||||||
*~TERABYTE_DOC_READY~
|
*~TERABYTE_DOC_READY~
|
||||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* $License: This is NULLED!
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* $Author: ips_terabyte $
|
* $Author: mark $
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
* $LastChangedDate: 2011-03-18 17:34:15 -0400 (Fri, 18 Mar 2011) $
|
* $LastChangedDate: 2011-12-20 11:14:05 -0500 (Tue, 20 Dec 2011) $
|
||||||
* @version v3.2.3
|
* @version v3.3.4
|
||||||
* $Revision: 8129 $
|
* $Revision: 10035 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! class_exists( 'apiCore' ) )
|
if ( ! class_exists( 'apiCore' ) )
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
* @file group_form.php Core group editing form
|
* @file group_form.php Core group editing form
|
||||||
*~TERABYTE_DOC_READY~
|
*~TERABYTE_DOC_READY~
|
||||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* $License: This is NULLED!
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* $Author: bfarber $
|
* $Author: bfarber $
|
||||||
* @since -
|
* @since -
|
||||||
* $LastChangedDate: 2011-07-20 20:19:22 -0400 (Wed, 20 Jul 2011) $
|
* $LastChangedDate: 2011-07-20 20:19:22 -0400 (Wed, 20 Jul 2011) $
|
||||||
* @version v3.2.3
|
* @version v3.3.4
|
||||||
* $Revision: 9296 $
|
* $Revision: 9296 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Member property updater (AJAX)
|
* Member property updater (AJAX)
|
||||||
* Last Updated: $Date: 2010-12-17 07:40:13 -0500 (Fri, 17 Dec 2010) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 1st march 2002
|
* @since 1st march 2002
|
||||||
* @version $Revision: 7442 $
|
* @version $Revision: 10914 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
*
|
*
|
||||||
* @author $author$
|
* @author $author$
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Downloads
|
* @package IP.Downloads
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 9229 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_IPB' ) )
|
if ( ! defined( 'IN_IPB' ) )
|
||||||
@@ -45,16 +45,6 @@ class comments_core_reports extends classes_comments_renderer
|
|||||||
'parent_seo_title' => 'seoname',
|
'parent_seo_title' => 'seoname',
|
||||||
'parent_date' => 'date_created' );
|
'parent_date' => 'date_created' );
|
||||||
|
|
||||||
/**
|
|
||||||
* Parent SEO template
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function seoTemplate()
|
|
||||||
{
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Who am I?
|
* Who am I?
|
||||||
*
|
*
|
||||||
@@ -139,14 +129,21 @@ class comments_core_reports extends classes_comments_renderer
|
|||||||
* Pre save
|
* Pre save
|
||||||
* Accepts an array of GENERIC data and allows manipulation before it's added to DB
|
* Accepts an array of GENERIC data and allows manipulation before it's added to DB
|
||||||
*
|
*
|
||||||
* @param string Type of save (edit/add)
|
* @param string $type Type of save (edit/add)
|
||||||
* @param array Array of GENERIC data (comment_xxxx)
|
* @param array $array Array of GENERIC data (comment_xxxx)
|
||||||
* @param int Comment id (if available)
|
* @param integer $commentId Comment ID (only for edits)
|
||||||
* @param int Parent id
|
* @param integer $parentId Parent content ID
|
||||||
* @return array Array of GENERIC data
|
* @return @e array Array of GENERIC data
|
||||||
*/
|
*/
|
||||||
public function preSave( $type, array $array, $commentId=0, $parentId=0 )
|
public function preSave( $type, array $array, $commentId=0, $parentId=0 )
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Always approve comments in report center
|
||||||
|
*
|
||||||
|
* @link http://community.invisionpower.com/tracker/issue-36632-report-comments-cant-be-approved/
|
||||||
|
*/
|
||||||
|
$array['comment_approved'] = 1;
|
||||||
|
|
||||||
return $array;
|
return $array;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,10 +160,7 @@ class comments_core_reports extends classes_comments_renderer
|
|||||||
public function postSave( $type, array $array, $commentId=0, $parentId=0 )
|
public function postSave( $type, array $array, $commentId=0, $parentId=0 )
|
||||||
{
|
{
|
||||||
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
|
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
|
||||||
$this->DB->update( 'rc_reports_index', array( 'num_comments' => $_cnt['total'], 'date_updated' => time(), 'updated_by' => $array['comment_author_id'] ), "id=" . $parentId );
|
$this->DB->update( 'rc_reports_index', array( 'num_comments' => intval($_cnt['total']), 'date_updated' => IPS_UNIX_TIME_NOW, 'updated_by' => $array['comment_author_id'] ), "id=" . $parentId );
|
||||||
|
|
||||||
//$this->DB->setDataType( 'num_comments', 'int' );
|
|
||||||
//$this->DB->update( 'rc_reports_index', array( 'num_comments' => 'plus:1', 'date_updated' => time(), 'updated_by' => $array['comment_author_id'] ), "id=" . $parentId );
|
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Notify other moderators
|
// Notify other moderators
|
||||||
@@ -235,22 +229,7 @@ class comments_core_reports extends classes_comments_renderer
|
|||||||
}
|
}
|
||||||
|
|
||||||
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
|
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
|
||||||
$this->DB->update( 'rc_reports_index', array( 'num_comments' => $_cnt['total'], 'date_updated' => $_date_updated, 'updated_by' => $_updated_by ), "id=" . $parentId );
|
$this->DB->update( 'rc_reports_index', array( 'num_comments' => intval($_cnt['total']), 'date_updated' => $_date_updated, 'updated_by' => $_updated_by ), "id=" . $parentId );
|
||||||
|
|
||||||
//$this->DB->setDataType( 'num_comments', 'int' );
|
|
||||||
//$this->DB->update( 'rc_reports_index', array( 'num_comments' => 'minus:' . count($commentIds) ), "id=" . $parentId );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Toggles visibility
|
|
||||||
*
|
|
||||||
* @param string on/off
|
|
||||||
* @param array Array of comment IDs to be deleted
|
|
||||||
* @param int Parent ID
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function postVisibility( $toggle, $commentIds, $parentId )
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Core Sessions
|
* Core Sessions
|
||||||
* Last Updated: $Date: 2011-09-15 17:04:35 -0400 (Thu, 15 Sep 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 20th February 2002
|
* @since 20th February 2002
|
||||||
* @version $Rev: 9495 $
|
* @version $Rev: 10914 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -28,17 +28,17 @@ if ( ! defined( 'IN_IPB' ) )
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Item Marking
|
* Item Marking
|
||||||
* Last Updated: $Date: 2011-09-15 17:04:35 -0400 (Thu, 15 Sep 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Downloads
|
* @package IP.Downloads
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 9495 $
|
* @version $Rev: 10914 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Core registered caches, redirect resets and bitwise settings
|
* Core registered caches, redirect resets and bitwise settings
|
||||||
* Last Updated: $Date: 2011-03-15 18:03:09 -0400 (Tue, 15 Mar 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 20th February 2002
|
* @since 20th February 2002
|
||||||
* @version $Rev: 8085 $
|
* @version $Rev: 10914 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Dashboard Notifications
|
* Dashboard Notifications
|
||||||
* Last Updated: $Date
|
* Last Updated: 11.07.2012
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: ips_terabyte $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 9551 $
|
* @version $Rev: 11026 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_IPB' ) )
|
if ( ! defined( 'IN_IPB' ) )
|
||||||
@@ -23,6 +23,7 @@ if ( ! defined( 'IN_IPB' ) )
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Main loader class
|
* Main loader class
|
||||||
|
* DO NOT MODIFY!
|
||||||
*/
|
*/
|
||||||
class dashboardNotifications__core
|
class dashboardNotifications__core
|
||||||
{
|
{
|
||||||
@@ -48,110 +49,13 @@ class dashboardNotifications__core
|
|||||||
|
|
||||||
public function get()
|
public function get()
|
||||||
{
|
{
|
||||||
/* INIT */
|
/* INIT! */
|
||||||
$entries = array();
|
$entries = array();
|
||||||
|
|
||||||
if( ! $this->settings['ipb_reg_number'] )
|
if( ! $this->settings['ipb_reg_number'] )
|
||||||
{
|
{
|
||||||
$entries[] = array( $this->lang->words['lc_title_nokey'], sprintf( $this->lang->words['lc_msg_nokey'], "{$this->settings['base_url']}module=tools&section=licensekey" ) );
|
$entries[] = array( $this->lang->words['lc_title_nokey'], sprintf( $this->lang->words['lc_msg_nokey'], "{$this->settings['base_url']}module=tools&section=licensekey" ) );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
/* We need a classFileManagement object */
|
|
||||||
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' );
|
|
||||||
$classFileManagement = new $classToLoad();
|
|
||||||
|
|
||||||
/* Try to automatically update if expired */
|
|
||||||
$licenseData = $this->cache->getCache( 'licenseData' );
|
|
||||||
|
|
||||||
if( ! $licenseData || ( $licenseData['key']['_expires'] != 9999999999 AND $licenseData['key']['_expires'] < IPS_UNIX_TIME_NOW ) )
|
|
||||||
{
|
|
||||||
/* Query the api */
|
|
||||||
$response = $classFileManagement->getFileContents( "http://myipb.in/license.php?lk={$this->settings['ipb_reg_number']}&url={$this->settings['board_url']}&flush=1" );
|
|
||||||
|
|
||||||
/* Get License Data */
|
|
||||||
$licenseData = json_decode( $response, true );
|
|
||||||
|
|
||||||
/* Copyright Removal? */
|
|
||||||
if ( $licenseData['cr'] )
|
|
||||||
{
|
|
||||||
IPSLib::updateSettings( array( 'ipb_copy_number' => $licenseData['cr'], 'ips_cp_purchase' => 1 ) );
|
|
||||||
}
|
|
||||||
elseif ( $this->settings['ips_cp_purchase'] )
|
|
||||||
{
|
|
||||||
IPSLib::updateSettings( array( 'ips_cp_purchase' => 0 ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Save to cache */
|
|
||||||
$licenseData['_cached_date'] = time();
|
|
||||||
$licenseData['key']['_expires'] = $licenseData['key']['_expires'] ? $licenseData['key']['_expires'] : 9999999999;
|
|
||||||
$licenseData['key']['expires'] = $licenseData['key']['expires'] ? $licenseData['key']['expires'] : 9999999999;
|
|
||||||
|
|
||||||
$this->cache->setCache( 'licenseData', $licenseData, array( 'array' => 1 ) );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Query the api */
|
|
||||||
$response = $classFileManagement->getFileContents("http://myipb.in/license.php?api=checkService&service=ipb&lk={$this->settings['ipb_reg_number']}&domain={$this->settings['board_url']}" );
|
|
||||||
|
|
||||||
/* Get License Data */
|
|
||||||
$response = json_decode( $response, true );
|
|
||||||
|
|
||||||
/* Is the Spam Service Working? */
|
|
||||||
if ( $this->settings['spam_service_enabled'] )
|
|
||||||
{
|
|
||||||
//$lastLog = $this->DB->buildAndFetch( array( 'select' => 'log_code', 'from' => 'spam_service_log', 'order' => 'id DESC', 'limit' => 1 ) ); // Order on ID since log_date has no index
|
|
||||||
|
|
||||||
//if ( $lastLog['log_code'] === '0' )
|
|
||||||
|
|
||||||
/* Get last 5 logs, and if all 5 are errors, show message */
|
|
||||||
$_errors = 0;
|
|
||||||
$_entries = 0;
|
|
||||||
$_lastError = '';
|
|
||||||
|
|
||||||
$this->DB->build( array( 'select' => 'log_code, log_msg', 'from' => 'spam_service_log', 'order' => 'id DESC', 'limit' => 5 ) );
|
|
||||||
$this->DB->execute();
|
|
||||||
|
|
||||||
while( $_r = $this->DB->fetch() )
|
|
||||||
{
|
|
||||||
$_entries++;
|
|
||||||
|
|
||||||
if( $_r['log_code'] === '0' )
|
|
||||||
{
|
|
||||||
$_errors++;
|
|
||||||
|
|
||||||
if( !$_lastError )
|
|
||||||
{
|
|
||||||
$_lastError = $_r['log_msg'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if( $_entries > 0 && $_errors == $_entries )
|
|
||||||
{
|
|
||||||
$entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_error_msg'], $_lastError ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* If it's disabled, are we entitiled to it? */
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$licenseData = $this->cache->getCache( 'licenseData' );
|
|
||||||
|
|
||||||
if ( is_array( $licenseData['ipbMain'] ) && count( $licenseData['ipbMain'] ) )
|
|
||||||
{
|
|
||||||
foreach ( $licenseData['ipbMain'] as $data )
|
|
||||||
{
|
|
||||||
if ( $data['name'] == 'Spam Monitoring Service' && $data['status'] == 'Ok' )
|
|
||||||
{
|
|
||||||
$entries[] = array( $this->lang->words['spam_service_disabled'], $this->lang->words['spam_service_disabled_msg'] );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FURL cache OOD? */
|
/* FURL cache OOD? */
|
||||||
if ( is_file( IPS_CACHE_PATH . 'cache/furlCache.php' ) )
|
if ( is_file( IPS_CACHE_PATH . 'cache/furlCache.php' ) )
|
||||||
@@ -222,8 +126,12 @@ class dashboardNotifications__core
|
|||||||
$entries[] = array( $this->lang->words['cp_unfinishedupgrade'], $this->lang->words['cp_upgrade_warning'] );
|
$entries[] = array( $this->lang->words['cp_unfinishedupgrade'], $this->lang->words['cp_upgrade_warning'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PHP Version Check */
|
/**
|
||||||
if( PHP_VERSION < '5.1.0' )
|
* PHP Version Check
|
||||||
|
*
|
||||||
|
* @todo Remove this for 4.0? Installer/upgrader already do check for this anyway...
|
||||||
|
*/
|
||||||
|
if( PHP_VERSION < '5.2.0' )
|
||||||
{
|
{
|
||||||
$entries[] = array( sprintf( $this->lang->words['cp_yourphpversion'], PHP_VERSION ), $this->lang->words['cp_php_warning'] );
|
$entries[] = array( sprintf( $this->lang->words['cp_yourphpversion'], PHP_VERSION ), $this->lang->words['cp_php_warning'] );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* <pre>
|
|
||||||
* Invision Power Services
|
|
||||||
* IP.Board v3.2.3
|
|
||||||
* Define data hook locations (core)
|
|
||||||
* Last Updated: $Date: 2011-05-18 04:49:10 -0400 (Wed, 18 May 2011) $
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @author $Author: ips_terabyte $
|
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
|
||||||
* @license This is NULLED!
|
|
||||||
* @package IP.Board
|
|
||||||
* @subpackage Core
|
|
||||||
* @link http://hatynka.in
|
|
||||||
* @version $Rev: 8812 $
|
|
||||||
*/
|
|
||||||
|
|
||||||
$dataHookLocations = array(
|
|
||||||
|
|
||||||
/* POSTING LIBRARY DATA LOCATIONS */
|
|
||||||
array( 'warnLogs', 'Insert Warn Log' ),
|
|
||||||
|
|
||||||
|
|
||||||
);
|
|
||||||
@@ -3,18 +3,18 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* BBCode Management : Determines if bbcode can be used in this section
|
* BBCode Management : Determines if bbcode can be used in this section
|
||||||
* Last Updated: $LastChangedDate: 2011-04-20 18:01:37 -0400 (Wed, 20 Apr 2011) $
|
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 8419 $
|
* @version $Rev: 10914 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,70 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* <pre>
|
|
||||||
* Invision Power Services
|
|
||||||
* IP.Board v3.1.2
|
|
||||||
* Sets up SEO templates
|
|
||||||
* Last Updated: $Date: 2010-07-01 18:13:46 -0400 (Thu, 01 Jul 2010) $
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @author $Author: bfarber $
|
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
|
||||||
* @license This is NULLED!
|
|
||||||
* @package IP.Board
|
|
||||||
* @subpackage Core
|
|
||||||
* @link http://hatynka.in
|
|
||||||
* @since 20th February 2002
|
|
||||||
* @version $Rev: 6596 $
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ( ! defined( 'IN_IPB' ) )
|
|
||||||
{
|
|
||||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SEO templates
|
|
||||||
*
|
|
||||||
* 'allowRedirect' is a flag to tell IP.Board whether to check the incoming link and if not formatted correctly, redirect the correct one
|
|
||||||
*
|
|
||||||
* OUT FORMAT REGEX:
|
|
||||||
* First array element is a regex to run to see if we've a match for the URL
|
|
||||||
* The second array element is the template to use the results of the parenthesis capture
|
|
||||||
*
|
|
||||||
* Special variable #{__title__} is replaced with the $title data passed to output->formatUrl( $url, $title)
|
|
||||||
*
|
|
||||||
* IMPORTANT: Remember that when these regex are used, the output has not been fully parsed so you will get:
|
|
||||||
* showuser={$data['member_id']} NOT showuser=1 so do not try and match numerics only!
|
|
||||||
*
|
|
||||||
* IN FORMAT REGEX
|
|
||||||
*
|
|
||||||
* This allows the registry to piece back together a URL based on the template regex
|
|
||||||
* So, for example: "/user/(\d+?)/", 'matches' => array( array( 'showuser' => '$1' ) )tells IP.Board to populate 'showuser' with the result
|
|
||||||
* of the parenthesis capture #1
|
|
||||||
*/
|
|
||||||
$_SEOTEMPLATES = array(
|
|
||||||
|
|
||||||
'section=register' => array( 'app' => 'core',
|
|
||||||
'allowRedirect' => 0,
|
|
||||||
'out' => array( '#app=core(&|&)module=global(&|&)section=register(&|&|$)#i', 'register/$3' ),
|
|
||||||
'in' => array( 'regex' => "#/register(/|$|\?)#i",
|
|
||||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'register' ) ) ) ),
|
|
||||||
|
|
||||||
'section=rss' => array( 'app' => 'core',
|
|
||||||
'allowRedirect' => 0,
|
|
||||||
'out' => array( '#app=core(&|&)module=global(&|&)section=rss(&|&)type=(\w+?)$#i', 'rss/$4/' ),
|
|
||||||
'in' => array( 'regex' => "#/rss/(\w+?)/$#i",
|
|
||||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'rss' ), array( 'type', '$1' ) ) ) ),
|
|
||||||
|
|
||||||
'section=rss2' => array( 'app' => 'core',
|
|
||||||
'allowRedirect' => 0,
|
|
||||||
'out' => array( '#app=core(&|&)module=global(&|&)section=rss(&|&)type=(\w+?)(&|&)id=(\w+?)$#i', 'rss/$4/$6-#{__title__}/' ),
|
|
||||||
'in' => array( 'regex' => "#/rss/(\w+?)/(\w+?)-#i",
|
|
||||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'rss' ), array( 'type', '$1' ), array( 'id', '$2' ) ) ) ),
|
|
||||||
|
|
||||||
# Changed section=rss2 id matching to use \w for more flexibility
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
@@ -2,19 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Sets up SEO templates
|
* Sets up SEO templates
|
||||||
* Last Updated: $Date: 2011-09-16 07:16:26 -0400 (Fri, 16 Sep 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: mmecham $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 20th February 2002
|
* @since 20th February 2002
|
||||||
* @version $Rev: 9496 $
|
* @version $Rev: 10914 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -51,11 +51,29 @@ $_SEOTEMPLATES = array(
|
|||||||
'out' => array( '#app=core(&|&)module=global(&|&)section=register(&|&|$)#i', 'register/$3' ),
|
'out' => array( '#app=core(&|&)module=global(&|&)section=register(&|&|$)#i', 'register/$3' ),
|
||||||
'in' => array( 'regex' => "#/register(/|$|\?)#i",
|
'in' => array( 'regex' => "#/register(/|$|\?)#i",
|
||||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'register' ) ) ) ),
|
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'register' ) ) ) ),
|
||||||
|
|
||||||
|
'tags' => array( 'app' => 'core',
|
||||||
|
'allowRedirect' => 0,
|
||||||
|
'out' => array( '#app=core(&|&)module=search(&|&)do=search(&|&)search_tags=(\S+?)(&|&)search_app=(\S+?)(&|&|$)#i', 'tags/$6/$4/$7' ),
|
||||||
|
'in' => array( 'regex' => "#/tags/(\S+?)/(\S+?)/#i",
|
||||||
|
'matches' => array( array( 'app', 'core' ), array( 'module', 'search' ), array( 'do', 'search' ), array( 'search_tags', '$2' ), array( 'search_app', '$1' ) ) ) ),
|
||||||
|
|
||||||
|
'privacy' => array( 'app' => 'core',
|
||||||
|
'allowRedirect' => 0,
|
||||||
|
'out' => array( '#app=core(&|&)module=global(&|&)section=privacy(&|&|$)#i', 'privacypolicy/$4/' ),
|
||||||
|
'in' => array( 'regex' => "#/privacypolicy/#i",
|
||||||
|
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'privacy' ) ) ) ),
|
||||||
|
|
||||||
'likeunsubscribe' => array( 'app' => 'core',
|
'likeunsubscribe' => array( 'app' => 'core',
|
||||||
'allowRedirect' => 0,
|
'allowRedirect' => 0,
|
||||||
'out' => array( '#app=core(&|&)module=global(&|&)section=like(&|&)do=unsubscribe(&|&)key=(\S+?)(&|&|$)#i', 'unsubscribe/$5/' ),
|
'out' => array( '#app=core(&|&)module=global(&|&)section=like(&|&)do=unsubscribe(&|&)key=(\S+?)(&|&|$)#i', 'unsubscribe/$5/' ),
|
||||||
'in' => array( 'regex' => "#/unsubscribe/(\S+?)/$#i",
|
'in' => array( 'regex' => "#/unsubscribe/(\S+?)/$#i",
|
||||||
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'like' ), array( 'do', 'unsubscribe' ), array( 'key', '$1' ) ) ) ),
|
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'like' ), array( 'do', 'unsubscribe' ), array( 'key', '$1' ) ) ) ),
|
||||||
|
'findcomment' => array( 'app' => 'core',
|
||||||
|
'allowRedirect' => 0,
|
||||||
|
'out' => array( '#app=core(&|&)module=global(&|&)section=comments(&|&)do=findComment(&|&)fromApp=(\S+?)(&|&)parentId=(\d+?)(&|&)commentId=(\d+?)(&|&|$)#i', 'findComment/$5/$7-$9' ),
|
||||||
|
'in' => array( 'regex' => "#/findComment/(\S+?-\S+?)/(\d+?)-(\d+?)$#i",
|
||||||
|
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'comments' ), array( 'do', 'findComment' ), array( 'fromApp', '$1' ), array( 'parentId', '$2' ), array( 'commentId', '$3' ) ) ) ),
|
||||||
'section=rss' => array( 'app' => 'core',
|
'section=rss' => array( 'app' => 'core',
|
||||||
'allowRedirect' => 0,
|
'allowRedirect' => 0,
|
||||||
'out' => array( '#app=core(&|&)module=global(&|&)section=rss(&|&)type=(\w+?)$#i', 'rss/$4/' ),
|
'out' => array( '#app=core(&|&)module=global(&|&)section=rss(&|&)type=(\w+?)$#i', 'rss/$4/' ),
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @file default.php Core like class (Core application)
|
||||||
|
*~TERABYTE_DOC_READY~
|
||||||
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
|
* $Author: mark $
|
||||||
|
* $LastChangedDate: 2011-12-08 16:43:34 +0000 (Thu, 08 Dec 2011) $
|
||||||
|
* @version v3.3.4
|
||||||
|
* $Revision: 9971 $
|
||||||
|
*/
|
||||||
|
|
||||||
|
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 like_core_default_composite
|
||||||
|
* @brief Core default like class (core application)
|
||||||
|
*/
|
||||||
|
class like_core_composite extends classes_like_composite
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Registry Object Shortcuts
|
||||||
|
*
|
||||||
|
* @var $registry
|
||||||
|
* @var $DB
|
||||||
|
* @var $settings
|
||||||
|
* @var $request
|
||||||
|
* @var $lang
|
||||||
|
* @var $member
|
||||||
|
* @var $memberData
|
||||||
|
* @var $cache
|
||||||
|
* @var $caches
|
||||||
|
*/
|
||||||
|
protected $registry;
|
||||||
|
protected $DB;
|
||||||
|
protected $settings;
|
||||||
|
protected $request;
|
||||||
|
protected $lang;
|
||||||
|
protected $member;
|
||||||
|
protected $memberData;
|
||||||
|
protected $cache;
|
||||||
|
protected $caches;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @return @e void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
/* Make registry objects */
|
||||||
|
$this->registry = ipsRegistry::instance();
|
||||||
|
$this->DB = $this->registry->DB();
|
||||||
|
$this->settings =& $this->registry->fetchSettings();
|
||||||
|
$this->request =& $this->registry->fetchRequest();
|
||||||
|
$this->lang = $this->registry->getClass('class_localization');
|
||||||
|
$this->member = $this->registry->member();
|
||||||
|
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||||
|
$this->cache = $this->registry->cache();
|
||||||
|
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,11 +3,11 @@
|
|||||||
* @file generate.php Navigation plugin: attachments
|
* @file generate.php Navigation plugin: attachments
|
||||||
*~TERABYTE_DOC_READY~
|
*~TERABYTE_DOC_READY~
|
||||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* $License: This is NULLED!
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* $Author: bfarber $
|
* $Author: bfarber $
|
||||||
* @since 3/8/2011
|
* @since 3/8/2011
|
||||||
* $LastChangedDate: 2011-05-12 22:28:10 -0400 (Thu, 12 May 2011) $
|
* $LastChangedDate: 2011-05-12 22:28:10 -0400 (Thu, 12 May 2011) $
|
||||||
* @version v3.2.3
|
* @version v3.3.4
|
||||||
* $Revision: 8754 $
|
* $Revision: 8754 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Define the core notification types
|
* Define the core notification types
|
||||||
* Last Updated: $Date: 2011-03-11 06:59:39 -0500 (Fri, 11 Mar 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 20th February 2002
|
* @since 20th February 2002
|
||||||
* @version $Rev: 8031 $
|
* @version $Rev: 10914 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Report Center :: Default plugin
|
* Report Center :: Default plugin
|
||||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @author Based on original "Report Center" by Luke Scott
|
* @author Based on original "Report Center" by Luke Scott
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 8644 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_IPB' ) )
|
if ( ! defined( 'IN_IPB' ) )
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* RSS output plugin :: report center
|
* RSS output plugin :: report center
|
||||||
* Last Updated: $Date: 2011-03-10 16:00:38 -0500 (Thu, 10 Mar 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 6/24/2008
|
* @since 6/24/2008
|
||||||
* @version $Revision: 8021 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_IPB' ) )
|
if ( ! defined( 'IN_IPB' ) )
|
||||||
|
|||||||
@@ -3,18 +3,18 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Config file
|
* Config file
|
||||||
* Last Updated: $Date: 2011-04-13 23:15:13 -0400 (Wed, 13 Apr 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $author$
|
* @author $author$
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Forums
|
* @subpackage Forums
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 8333 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_IPB' ) )
|
if ( ! defined( 'IN_IPB' ) )
|
||||||
|
|||||||
@@ -2,18 +2,18 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Basic Forum Search
|
* Basic Forum Search
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Forums
|
* @subpackage Forums
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 8644 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_IPB' ) )
|
if ( ! defined( 'IN_IPB' ) )
|
||||||
|
|||||||
@@ -3,18 +3,18 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Returns HTML for the form (optional class, not required)
|
* Returns HTML for the form (optional class, not required)
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $author$
|
* @author $author$
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Forums
|
* @subpackage Forums
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 8644 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_IPB' ) )
|
if ( ! defined( 'IN_IPB' ) )
|
||||||
|
|||||||
@@ -3,18 +3,18 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Formats forum search results
|
* Formats forum search results
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $author$
|
* @author $author$
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Forums
|
* @subpackage Forums
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 8644 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_IPB' ) )
|
if ( ! defined( 'IN_IPB' ) )
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
/**
|
/**
|
||||||
* @file plugin_attachments.php Shared media plugin: attachments
|
* @file plugin_attachments.php Shared media plugin: attachments
|
||||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* $License: This is NULLED!
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* $Author: rtissier $
|
* $Author: rtissier $
|
||||||
* @since 3/8/2011
|
* @since 3/8/2011
|
||||||
* $LastChangedDate: 2011-03-16 19:10:59 -0400 (Wed, 16 Mar 2011) $
|
* $LastChangedDate: 2011-03-16 19:10:59 -0400 (Wed, 16 Mar 2011) $
|
||||||
* @version v3.2.3
|
* @version v3.3.4
|
||||||
* $Revision: 8108 $
|
* $Revision: 8108 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,18 +3,18 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Sphinx template file
|
* Sphinx template file
|
||||||
* Last Updated: $Date: 2011-08-31 20:57:38 -0400 (Wed, 31 Aug 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Forums
|
* @subpackage Forums
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 9438 $
|
* @version $Rev: 10914 $
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -32,14 +32,14 @@ $appSphinxTemplate = <<<EOF
|
|||||||
source <!--SPHINX_CONF_PREFIX-->core_tags_search_main : <!--SPHINX_CONF_PREFIX-->ipb_source_config
|
source <!--SPHINX_CONF_PREFIX-->core_tags_search_main : <!--SPHINX_CONF_PREFIX-->ipb_source_config
|
||||||
{
|
{
|
||||||
# Set our forum PID counter
|
# Set our forum PID counter
|
||||||
|
<!--SPHINX_DB_SET_NAMES-->
|
||||||
sql_query_pre = REPLACE INTO <!--SPHINX_DB_PREFIX-->cache_store VALUES( 'sphinx_core_tags_counter', (SELECT max(tag_id) FROM <!--SPHINX_DB_PREFIX-->core_tags), 0, UNIX_TIMESTAMP(), 0 )
|
sql_query_pre = REPLACE INTO <!--SPHINX_DB_PREFIX-->cache_store VALUES( 'sphinx_core_tags_counter', (SELECT max(tag_id) FROM <!--SPHINX_DB_PREFIX-->core_tags), 0, UNIX_TIMESTAMP(), 0 )
|
||||||
|
|
||||||
# Query posts for the main source
|
# Query posts for the main source
|
||||||
sql_query = SELECT t.tag_id, t.tag_id as search_id, t.tag_added, t.tag_member_id, t.tag_meta_id, t.tag_meta_parent_id, t.tag_text, t.tag_meta_app, t.tag_meta_area, \
|
sql_query = SELECT t.tag_id, t.tag_id as search_id, t.tag_added, t.tag_member_id, t.tag_meta_id, t.tag_meta_parent_id, t.tag_text, t.tag_meta_app, REPLACE( t.tag_meta_area, '-', '_' ) as tag_meta_area, \
|
||||||
p.tag_perm_text, p.tag_perm_visible \
|
CONCAT( ',', p.tag_perm_text, ',') as tag_perm_text ,p.tag_perm_visible \
|
||||||
FROM <!--SPHINX_DB_PREFIX-->core_tags t \
|
FROM <!--SPHINX_DB_PREFIX-->core_tags t \
|
||||||
LEFT JOIN <!--SPHINX_DB_PREFIX-->core_tags_perms p ON ( t.tag_aai_lookup=p.tag_perm_aai_lookup ) \
|
LEFT JOIN <!--SPHINX_DB_PREFIX-->core_tags_perms p ON ( t.tag_aai_lookup=p.tag_perm_aai_lookup )
|
||||||
WHERE t.tag_id <= ( SELECT cs_value FROM <!--SPHINX_DB_PREFIX-->cache_store WHERE cs_key='sphinx_core_tags_counter' )
|
|
||||||
|
|
||||||
# Fields
|
# Fields
|
||||||
sql_attr_uint = search_id
|
sql_attr_uint = search_id
|
||||||
@@ -54,11 +54,12 @@ source <!--SPHINX_CONF_PREFIX-->core_tags_search_main : <!--SPHINX_CONF_PREFIX--
|
|||||||
source <!--SPHINX_CONF_PREFIX-->core_tags_search_delta : <!--SPHINX_CONF_PREFIX-->core_tags_search_main
|
source <!--SPHINX_CONF_PREFIX-->core_tags_search_delta : <!--SPHINX_CONF_PREFIX-->core_tags_search_main
|
||||||
{
|
{
|
||||||
# Override the base sql_query_pre
|
# Override the base sql_query_pre
|
||||||
|
<!--SPHINX_DB_SET_NAMES-->
|
||||||
sql_query_pre =
|
sql_query_pre =
|
||||||
|
|
||||||
# Query posts for the main source
|
# Query posts for the main source
|
||||||
sql_query = SELECT t.tag_id, t.tag_id as search_id, t.tag_added, t.tag_member_id, t.tag_meta_id, t.tag_meta_parent_id, t.tag_text, t.tag_meta_app, t.tag_meta_area, \
|
sql_query = SELECT t.tag_id, t.tag_id as search_id, t.tag_added, t.tag_member_id, t.tag_meta_id, t.tag_meta_parent_id, t.tag_text, t.tag_meta_app, REPLACE( t.tag_meta_area, '-', '_' ) as tag_meta_area, \
|
||||||
p.tag_perm_text, p.tag_perm_visible \
|
CONCAT( ',', p.tag_perm_text, ',') as tag_perm_text ,p.tag_perm_visible \
|
||||||
FROM <!--SPHINX_DB_PREFIX-->core_tags t \
|
FROM <!--SPHINX_DB_PREFIX-->core_tags t \
|
||||||
LEFT JOIN <!--SPHINX_DB_PREFIX-->core_tags_perms p ON ( t.tag_aai_lookup=p.tag_perm_aai_lookup ) \
|
LEFT JOIN <!--SPHINX_DB_PREFIX-->core_tags_perms p ON ( t.tag_aai_lookup=p.tag_perm_aai_lookup ) \
|
||||||
WHERE t.tag_id > ( SELECT cs_value FROM <!--SPHINX_DB_PREFIX-->cache_store WHERE cs_key='sphinx_core_tags_counter' )
|
WHERE t.tag_id > ( SELECT cs_value FROM <!--SPHINX_DB_PREFIX-->cache_store WHERE cs_key='sphinx_core_tags_counter' )
|
||||||
@@ -73,7 +74,7 @@ index <!--SPHINX_CONF_PREFIX-->core_tags_search_main
|
|||||||
mlock = 0
|
mlock = 0
|
||||||
morphology = none
|
morphology = none
|
||||||
min_word_len = 2
|
min_word_len = 2
|
||||||
charset_type = utf-8
|
charset_type = sbcs
|
||||||
html_strip = 0
|
html_strip = 0
|
||||||
#infix_fields = tag_text
|
#infix_fields = tag_text
|
||||||
#min_infix_len = 3
|
#min_infix_len = 3
|
||||||
|
|||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Core user control panel plugin
|
* Core user control panel plugin
|
||||||
* Last Updated: $Date: 2011-10-10 16:21:29 -0400 (Mon, 10 Oct 2011) $
|
* Last Updated: $Date: 2012-06-13 14:36:10 -0400 (Wed, 13 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: AndyMillne $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 20th February 2002
|
* @since 20th February 2002
|
||||||
* @version $Rev: 9590 $
|
* @version $Rev: 10917 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $tab_name = "Настройки";
|
public $tab_name = "Settings";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default area code
|
* Default area code
|
||||||
@@ -137,7 +137,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
'area' => 'email'
|
'area' => 'email'
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( $this->settings['auth_allow_dnames'] == 1 AND $this->memberData['g_dname_changes'] > 0 )
|
if ( $this->settings['auth_allow_dnames'] == 1 AND $this->memberData['g_dname_changes'] != 0 )
|
||||||
{
|
{
|
||||||
$array[] = array( 'url' => 'area=displayname',
|
$array[] = array( 'url' => 'area=displayname',
|
||||||
'title' => ipsRegistry::instance()->getClass('class_localization')->words['ucp_change_name'],
|
'title' => ipsRegistry::instance()->getClass('class_localization')->words['ucp_change_name'],
|
||||||
@@ -181,15 +181,6 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( IPSLib::vkontakte_enabled() === TRUE )
|
|
||||||
{
|
|
||||||
$array[] = array( 'url' => 'area=vkontakte',
|
|
||||||
'title' => ipsRegistry::instance()->getClass('class_localization')->words['m_vkontakte'],
|
|
||||||
'active' => $this->request['tab'] == 'core' && $this->request['area'] == 'vkontakte' ? 1 : 0,
|
|
||||||
'area' => 'vkontakte'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $this->memberData['g_attach_max'] != -1 )
|
if ( $this->memberData['g_attach_max'] != -1 )
|
||||||
{
|
{
|
||||||
$array[] = array(
|
$array[] = array(
|
||||||
@@ -257,9 +248,6 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
case 'facebookRemove':
|
case 'facebookRemove':
|
||||||
$html = $this->customEvent_facebookRemove();
|
$html = $this->customEvent_facebookRemove();
|
||||||
break;
|
break;
|
||||||
case 'vkontakteRemove':
|
|
||||||
$html = $this->customEvent_vkontakteRemove();
|
|
||||||
break;
|
|
||||||
case 'twitterRemove':
|
case 'twitterRemove':
|
||||||
$html = $this->customEvent_twitterRemove();
|
$html = $this->customEvent_twitterRemove();
|
||||||
break;
|
break;
|
||||||
@@ -615,39 +603,6 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
$this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=global§ion=login&do=logout&k=" . $this->member->form_hash );
|
$this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=global§ion=login&do=logout&k=" . $this->member->form_hash );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom Event: Remove facebook link
|
|
||||||
*
|
|
||||||
* @return @e void
|
|
||||||
*/
|
|
||||||
public function customEvent_vkontakteRemove()
|
|
||||||
{
|
|
||||||
//-----------------------------------------
|
|
||||||
// Check secure hash...
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
if ( $this->request['secure_key'] != $this->member->form_hash )
|
|
||||||
{
|
|
||||||
$this->registry->output->showError( 'authorization_error', 100, true, null, 403 );
|
|
||||||
}
|
|
||||||
|
|
||||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/vkontakte/connect.php', 'vkontakte_connect' );
|
|
||||||
$vkontakte = new $classToLoad( $this->registry );
|
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Okay...
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
if ( $this->memberData['vk_uid'] )
|
|
||||||
{
|
|
||||||
/* Remove the link */
|
|
||||||
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'vk_uid' => 0, 'vk_token' => '' ) ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Log the user out */
|
|
||||||
$this->registry->getClass('output')->silentRedirect( $this->settings['base_url']."app=core&module=global§ion=login&do=logout&k=" . $this->member->form_hash );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom Event: Create facebook link
|
* Custom Event: Create facebook link
|
||||||
*
|
*
|
||||||
@@ -884,9 +839,6 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
case 'twitter':
|
case 'twitter':
|
||||||
return $this->formTwitter();
|
return $this->formTwitter();
|
||||||
break;
|
break;
|
||||||
case 'vkontakte':
|
|
||||||
return $this->formVkontakte();
|
|
||||||
break;
|
|
||||||
case 'customize':
|
case 'customize':
|
||||||
return $this->formCustomize();
|
return $this->formCustomize();
|
||||||
break;
|
break;
|
||||||
@@ -950,64 +902,6 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
return $this->registry->getClass('output')->getTemplate('ucp')->membersProfileCustomize( $options, $input, $inlineMsg );
|
return $this->registry->getClass('output')->getTemplate('ucp')->membersProfileCustomize( $options, $input, $inlineMsg );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the vkontakte form
|
|
||||||
*
|
|
||||||
* @author Matt Mecham
|
|
||||||
* @param string Any inline message to show
|
|
||||||
* @return string Processed HTML
|
|
||||||
*/
|
|
||||||
public function formVkontakte( $inlineMsg='' )
|
|
||||||
{
|
|
||||||
//-----------------------------------------
|
|
||||||
// INIT
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
if( !IPSLib::vkontakte_enabled() )
|
|
||||||
{
|
|
||||||
$this->registry->getClass('output')->showError( 'twitter_disabled', 1005.1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Twitter user logged in?
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/vkontakte/connect.php', 'vkontakte_connect' );
|
|
||||||
$vkontakte = new $classToLoad( $this->registry, $this->memberData['vk_token'], $this->memberData['vk_uid'] );
|
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Thaw bitfield options
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$bwOptions = IPSBWOptions::thaw( $this->memberData['vk_bwoptions'], 'vkontakte' );
|
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Merge..
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
if ( is_array( $bwOptions ) )
|
|
||||||
{
|
|
||||||
foreach( $bwOptions as $k => $v )
|
|
||||||
{
|
|
||||||
$this->memberData[ $k ] = $v;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->hide_form_and_save_button = 1;
|
|
||||||
|
|
||||||
$userData = $vkontakte->fetchUserData();
|
|
||||||
|
|
||||||
if ( isset( $userData['status']['text'] ) )
|
|
||||||
{
|
|
||||||
if ( IPS_DOC_CHAR_SET != 'UTF-8' )
|
|
||||||
{
|
|
||||||
$userData['status']['text'] = IPSText::utf8ToEntities( $userData['status']['text'] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->registry->getClass('output')->getTemplate('vkontakte')->membersVkontakteConnect( $this->memberData['vk_uid'], $userData );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the twitter form
|
* Show the twitter form
|
||||||
*
|
*
|
||||||
@@ -1214,7 +1108,22 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
// Get ignored users
|
// Get ignored users
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$this->DB->build( array( 'select' => '*', 'from' => 'ignored_users', 'where' => 'ignore_owner_id=' . $this->memberData['member_id'] ) );
|
$perPage = 25;
|
||||||
|
|
||||||
|
/* Count */
|
||||||
|
$count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as dracula', 'from' => 'ignored_users', 'where' => 'ignore_owner_id=' . $this->memberData['member_id'] ) );
|
||||||
|
|
||||||
|
/* Sort out pagination */
|
||||||
|
$st = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0;
|
||||||
|
$pagination = $this->registry->output->generatePagination( array(
|
||||||
|
'totalItems' => $count['dracula'],
|
||||||
|
'itemsPerPage' => $perPage,
|
||||||
|
'currentStartValue' => $st,
|
||||||
|
'baseUrl' => 'app=core&module=usercp&tab=core&area=ignoredusers',
|
||||||
|
) );
|
||||||
|
|
||||||
|
/* Get em */
|
||||||
|
$this->DB->build( array( 'select' => '*', 'from' => 'ignored_users', 'where' => 'ignore_owner_id=' . $this->memberData['member_id'], 'limit' => array( $st, $perPage ) ) );
|
||||||
$this->DB->execute();
|
$this->DB->execute();
|
||||||
|
|
||||||
while( $row = $this->DB->fetch() )
|
while( $row = $this->DB->fetch() )
|
||||||
@@ -1251,7 +1160,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
|
|
||||||
$this->request['newbox_1'] = $this->request['newbox_1'] ? $this->request['newbox_1'] : '';
|
$this->request['newbox_1'] = $this->request['newbox_1'] ? $this->request['newbox_1'] : '';
|
||||||
|
|
||||||
return $this->registry->getClass('output')->getTemplate('ucp')->membersIgnoredUsersForm( $final_users );
|
return $this->registry->getClass('output')->getTemplate('ucp')->membersIgnoredUsersForm( $final_users, $pagination );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1314,20 +1223,22 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
$t_sig = '';
|
$t_sig = '';
|
||||||
|
|
||||||
/* Set content in editor */
|
/* Set content in editor */
|
||||||
$this->editor->setContent( $this->memberData['signature'] );
|
$this->editor->setAllowBbcode( true );
|
||||||
|
$this->editor->setAllowSmilies( false );
|
||||||
|
$this->editor->setAllowHtml( $this->memberData['g_dohtml'] );
|
||||||
|
$this->editor->setContent( $this->memberData['signature'], 'signatures' );
|
||||||
|
|
||||||
/* Current signature preview */
|
/* Current signature preview */
|
||||||
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
|
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
|
||||||
IPSText::getTextClass('bbcode')->parse_smilies = 0;
|
IPSText::getTextClass('bbcode')->parse_smilies = 0;
|
||||||
IPSText::getTextClass('bbcode')->parse_html = $this->caches['group_cache'][ $this->memberData['member_group_id'] ]['g_dohtml'];
|
IPSText::getTextClass('bbcode')->parse_html = $this->memberData['g_dohtml'];
|
||||||
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
|
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
|
||||||
IPSText::getTextClass('bbcode')->parsing_section = 'signatures';
|
IPSText::getTextClass('bbcode')->parsing_section = 'signatures';
|
||||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $this->memberData['member_group_id'];
|
IPSText::getTextClass('bbcode')->parsing_mgroup = $this->memberData['member_group_id'];
|
||||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $this->memberData['mgroup_others'];
|
IPSText::getTextClass('bbcode')->parsing_mgroup_others = $this->memberData['mgroup_others'];
|
||||||
|
|
||||||
$signature = IPSText::getTextClass('bbcode')->preDisplayParse( $this->memberData['signature'] );
|
$signature = IPSText::getTextClass('bbcode')->preDisplayParse( $this->memberData['signature'] );
|
||||||
|
|
||||||
|
|
||||||
return $this->registry->getClass('output')->getTemplate('ucp')->membersSignatureForm( $this->editor->show( 'Post', array( 'noSmilies' => true ) ), $sig_restrictions, $signature );
|
return $this->registry->getClass('output')->getTemplate('ucp')->membersSignatureForm( $this->editor->show( 'Post', array( 'noSmilies' => true ) ), $sig_restrictions, $signature );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1426,12 +1337,9 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* About me */
|
/* About me */
|
||||||
$aboutme = $this->DB->buildAndFetch( array( 'select' => 'pp_about_me', 'from' => 'profile_portal', 'where' => 'pp_member_id=' . $this->memberData['member_id'] ) );
|
$this->editor->setContent( $this->memberData['pp_about_me'] );
|
||||||
|
|
||||||
/* Set content in editor */
|
$amEditor = $this->editor->show( 'Post', array( 'delayInit' => 1 ) );
|
||||||
$this->editor->setContent( $aboutme['pp_about_me'] );
|
|
||||||
|
|
||||||
$amEditor = $this->editor->show( 'Post', array( 'noSmilies' => true, 'delayInit' => 1 ) );
|
|
||||||
|
|
||||||
/* Times */
|
/* Times */
|
||||||
foreach ( $this->lang->words as $k => $v )
|
foreach ( $this->lang->words as $k => $v )
|
||||||
@@ -1466,7 +1374,6 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
{
|
{
|
||||||
/* Init */
|
/* Init */
|
||||||
$start = intval( $this->request['st'] );
|
$start = intval( $this->request['st'] );
|
||||||
$clear = trim( $this->request['clear'] );
|
|
||||||
$perPage = 50;
|
$perPage = 50;
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -1477,6 +1384,14 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
$notifyLibrary = new $classToLoad( $this->registry );
|
$notifyLibrary = new $classToLoad( $this->registry );
|
||||||
$notifyLibrary->setMember( $this->memberData );
|
$notifyLibrary->setMember( $this->memberData );
|
||||||
|
|
||||||
|
/* Clear them? - used in mobile skin */
|
||||||
|
if ( isset($this->request['clear']) && trim($this->request['clear']) == 'true' )
|
||||||
|
{
|
||||||
|
$this->DB->update( 'inline_notifications', array( 'notify_read' => 1 ), 'notify_to_id=' . $this->memberData['member_id'] );
|
||||||
|
|
||||||
|
$notifyLibrary->rebuildUnreadCount();
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Turn off normal form
|
// Turn off normal form
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -1494,51 +1409,47 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
'from' => 'inline_notifications',
|
'from' => 'inline_notifications',
|
||||||
'where' => 'notify_to_id=' . $this->memberData['member_id'] ) );
|
'where' => 'notify_to_id=' . $this->memberData['member_id'] ) );
|
||||||
|
|
||||||
$this->DB->build( array( 'select' => '*',
|
if ( $count['er'] )
|
||||||
'from' => 'inline_notifications',
|
|
||||||
'where' => 'notify_to_id=' . $this->memberData['member_id'],
|
|
||||||
'limit' => array( $start, $perPage ),
|
|
||||||
'order' => 'notify_sent DESC' ) );
|
|
||||||
$outer = $this->DB->execute();
|
|
||||||
|
|
||||||
while( $r = $this->DB->fetch($outer) )
|
|
||||||
{
|
{
|
||||||
$r['notify_icon'] = $notifyLibrary->getNotificationIcon( $r['notify_type_key'] );
|
$this->DB->build( array( 'select' => '*',
|
||||||
|
'from' => 'inline_notifications',
|
||||||
|
'where' => 'notify_to_id=' . $this->memberData['member_id'],
|
||||||
|
'limit' => array( $start, $perPage ),
|
||||||
|
'order' => 'notify_sent DESC' ) );
|
||||||
|
$outer = $this->DB->execute();
|
||||||
|
|
||||||
$_notifications[] = $r;
|
while( $r = $this->DB->fetch($outer) )
|
||||||
|
|
||||||
$mids[ $r['notify_from_id'] ] = $r['notify_from_id'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get members */
|
|
||||||
if ( count( $mids ) )
|
|
||||||
{
|
|
||||||
$members = IPSMember::load( array_keys( $mids ), 'all' );
|
|
||||||
|
|
||||||
if ( count( $members ) )
|
|
||||||
{
|
{
|
||||||
foreach( $_notifications as $key => $data )
|
$r['notify_icon'] = $notifyLibrary->getNotificationIcon( $r['notify_type_key'] );
|
||||||
|
|
||||||
|
$_notifications[] = $r;
|
||||||
|
|
||||||
|
$mids[ $r['notify_from_id'] ] = $r['notify_from_id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get members */
|
||||||
|
if ( count( $mids ) )
|
||||||
|
{
|
||||||
|
$members = IPSMember::load( array_keys( $mids ), 'all' );
|
||||||
|
|
||||||
|
if ( count( $members ) )
|
||||||
{
|
{
|
||||||
if ( in_array( $data['notify_from_id'], array_keys( $members ) ) )
|
foreach( $_notifications as $key => $data )
|
||||||
{
|
{
|
||||||
$_notifications[ $key ]['member'] = IPSMember::buildProfilePhoto( $members[ $data['notify_from_id'] ] );
|
if ( isset($members[ $data['notify_from_id'] ]) )
|
||||||
|
{
|
||||||
|
$_notifications[ $key ]['member'] = IPSMember::buildProfilePhoto( $members[ $data['notify_from_id'] ] );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$pages = $this->registry->getClass('output')->generatePagination( array( 'totalItems' => $count['er'],
|
$pages = $this->registry->getClass('output')->generatePagination( array( 'totalItems' => $count['er'],
|
||||||
'itemsPerPage' => $perPage,
|
'itemsPerPage' => $perPage,
|
||||||
'currentStartValue' => $start,
|
'currentStartValue' => $start,
|
||||||
'baseUrl' => "app=core&module=usercp&tab=core&area=notificationlog" ) );
|
'baseUrl' => "app=core&module=usercp&tab=core&area=notificationlog"
|
||||||
|
) );
|
||||||
/* Clear them? - used in mobile skin */
|
|
||||||
if ( $clear == 'true' )
|
|
||||||
{
|
|
||||||
$this->DB->update( 'inline_notifications', array( 'notify_read' => 1 ), 'notify_to_id=' . $this->memberData['member_id'] );
|
|
||||||
|
|
||||||
$notifyLibrary->rebuildUnreadCount();
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Send to template
|
// Send to template
|
||||||
@@ -1552,6 +1463,8 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
*
|
*
|
||||||
* @author Brandon Farber
|
* @author Brandon Farber
|
||||||
* @return string Processed HTML
|
* @return string Processed HTML
|
||||||
|
*
|
||||||
|
* @note Updating this function update also mobileApiRequest::_handleNotificationTypes()
|
||||||
*/
|
*/
|
||||||
public function showFormNotifications()
|
public function showFormNotifications()
|
||||||
{
|
{
|
||||||
@@ -1567,7 +1480,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
// Show the form
|
// Show the form
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$_basicOptions = array( array( 'email', $this->lang->words['notopt__email'] ), array( 'pm', $this->lang->words['notopt__pm'] ), array( 'inline', $this->lang->words['notopt__inline'] ), array( 'mobile', $this->lang->words['notopt__mobile'] ) );
|
$_basicOptions = array( array( 'email', $this->lang->words['notopt__email'] ), array( 'inline', $this->lang->words['notopt__inline'] ), array( 'mobile', $this->lang->words['notopt__mobile'] ) );
|
||||||
$_configOptions = $notifyLibrary->getNotificationData( TRUE );
|
$_configOptions = $notifyLibrary->getNotificationData( TRUE );
|
||||||
$_notifyConfig = $notifyLibrary->getMemberNotificationConfig( $this->memberData );
|
$_notifyConfig = $notifyLibrary->getMemberNotificationConfig( $this->memberData );
|
||||||
$_defaultConfig = $notifyLibrary->getDefaultNotificationConfig();
|
$_defaultConfig = $notifyLibrary->getDefaultNotificationConfig();
|
||||||
@@ -1575,7 +1488,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
|
|
||||||
foreach( $_configOptions as $option )
|
foreach( $_configOptions as $option )
|
||||||
{
|
{
|
||||||
$_thisConfig = $_notifyConfig[ $option['key'] ];
|
$_thisConfig = isset($_notifyConfig[ $option['key'] ]) ? $_notifyConfig[ $option['key'] ] : $_defaultConfig[ $option['key'] ];
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Determine available options
|
// Determine available options
|
||||||
@@ -1619,7 +1532,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
|
|
||||||
//$_formOptions[ $option['key'] ]['options'] = $_available;
|
//$_formOptions[ $option['key'] ]['options'] = $_available;
|
||||||
|
|
||||||
$_formOptions[ $option['key'] ]['defaults'] = $_thisConfig['selected'];
|
$_formOptions[ $option['key'] ]['defaults'] = is_array($_thisConfig['selected']) ? $_thisConfig['selected'] : array();
|
||||||
$_formOptions[ $option['key'] ]['disabled'] = 0;
|
$_formOptions[ $option['key'] ]['disabled'] = 0;
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -1630,7 +1543,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
if( $_defaultConfig[ $option['key'] ]['disable_override'] )
|
if( $_defaultConfig[ $option['key'] ]['disable_override'] )
|
||||||
{
|
{
|
||||||
$_formOptions[ $option['key'] ]['disabled'] = 1;
|
$_formOptions[ $option['key'] ]['disabled'] = 1;
|
||||||
$_formOptions[ $option['key'] ]['defaults'] = $_defaultConfig[ $option['key'] ]['selected'];
|
$_formOptions[ $option['key'] ]['defaults'] = is_array($_defaultConfig[ $option['key'] ]['selected']) ? $_defaultConfig[ $option['key'] ]['selected'] : array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1892,7 +1805,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
// CHECK (please)
|
// CHECK (please)
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
if ( ! $this->settings['auth_allow_dnames'] OR $this->memberData['g_dname_changes'] < 1 OR $this->memberData['g_dname_date'] < 1 )
|
if ( ! $this->settings['auth_allow_dnames'] OR $this->memberData['g_dname_changes'] == 0 OR $this->memberData['g_dname_date'] == 0 )
|
||||||
{
|
{
|
||||||
$this->registry->getClass('output')->showError( 'no_permission_for_display_names', 1011 );
|
$this->registry->getClass('output')->showError( 'no_permission_for_display_names', 1011 );
|
||||||
}
|
}
|
||||||
@@ -1912,7 +1825,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
$time_check = $this->memberData['joined'];
|
$time_check = $this->memberData['joined'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$name_count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count, MIN(dname_date) as min_date', 'from' => 'dnames_change', 'where' => "dname_member_id=" . $this->memberData['member_id'] . " AND dname_date > $time_check" ) );
|
$name_count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count, MIN(dname_date) as min_date', 'from' => 'dnames_change', 'where' => "dname_member_id=" . $this->memberData['member_id'] . " AND dname_date > $time_check AND dname_discount=0" ) );
|
||||||
|
|
||||||
$name_count['count'] = intval( $name_count['count'] );
|
$name_count['count'] = intval( $name_count['count'] );
|
||||||
$name_count['min_date'] = intval( $name_count['min_date'] ) ? intval( $name_count['min_date'] ) : $time_check;
|
$name_count['min_date'] = intval( $name_count['min_date'] ) ? intval( $name_count['min_date'] ) : $time_check;
|
||||||
@@ -1948,22 +1861,29 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
|
|
||||||
if( !$form['_noPerm'] )
|
if( !$form['_noPerm'] )
|
||||||
{
|
{
|
||||||
$form['_changes_left'] = $this->memberData['g_dname_changes'] - $name_count['count'];
|
if ( $this->memberData['g_dname_changes'] == -1 )
|
||||||
$form['_changes_done'] = $name_count['count'];
|
|
||||||
|
|
||||||
# Make sure changes done isn't larger than allowed
|
|
||||||
# This happens when changing via ACP
|
|
||||||
|
|
||||||
if ( $form['_changes_done'] > $this->memberData['g_dname_changes'] )
|
|
||||||
{
|
{
|
||||||
$form['_changes_done'] = $this->memberData['g_dname_changes'];
|
$form['_lang_string'] = $this->lang->words['dname_string2'];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$form['_changes_left'] = $this->memberData['g_dname_changes'] - $name_count['count'];
|
||||||
|
$form['_changes_done'] = $name_count['count'];
|
||||||
|
|
||||||
$form['_first_change'] = $this->registry->getClass( 'class_localization')->getDate( $name_count['min_date'], 'date', 1 );
|
# Make sure changes done isn't larger than allowed
|
||||||
$form['_lang_string'] = sprintf( $this->lang->words['dname_string'],
|
# This happens when changing via ACP
|
||||||
$form['_changes_done'], $this->memberData['g_dname_changes'],
|
|
||||||
$form['_first_change'], $this->memberData['g_dname_changes'],
|
if ( $form['_changes_done'] > $this->memberData['g_dname_changes'] )
|
||||||
$this->memberData['g_dname_date'] );
|
{
|
||||||
|
$form['_changes_done'] = $this->memberData['g_dname_changes'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$form['_first_change'] = $this->registry->getClass( 'class_localization')->getDate( $name_count['min_date'], 'date', 1 );
|
||||||
|
$form['_lang_string'] = sprintf( $this->lang->words['dname_string'],
|
||||||
|
$form['_changes_done'], $this->memberData['g_dname_changes'],
|
||||||
|
$form['_first_change'], $this->memberData['g_dname_changes'],
|
||||||
|
$this->memberData['g_dname_date'] ) . $this->lang->words['dname_string2'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -2346,6 +2266,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
IPSText::getTextClass( 'bbcode' )->parsing_section = 'signatures';
|
IPSText::getTextClass( 'bbcode' )->parsing_section = 'signatures';
|
||||||
|
|
||||||
$signature = IPSText::getTextClass('bbcode')->preDbParse( $signature );
|
$signature = IPSText::getTextClass('bbcode')->preDbParse( $signature );
|
||||||
|
|
||||||
$testSignature = IPSText::getTextClass('bbcode')->preDisplayParse( $signature );
|
$testSignature = IPSText::getTextClass('bbcode')->preDisplayParse( $signature );
|
||||||
|
|
||||||
if ( IPSText::getTextClass( 'bbcode' )->error )
|
if ( IPSText::getTextClass( 'bbcode' )->error )
|
||||||
@@ -2367,7 +2288,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
|
|
||||||
if( isset($sig_restrictions[1]) and $sig_restrictions[1] !== '' )
|
if( isset($sig_restrictions[1]) and $sig_restrictions[1] !== '' )
|
||||||
{
|
{
|
||||||
if( mb_substr_count( mb_strtolower($signature), "[img]" ) > $sig_restrictions[1] )
|
if( substr_count( strtolower($signature), "[img]" ) > $sig_restrictions[1] )
|
||||||
{
|
{
|
||||||
$sig_errors[] = sprintf( $this->lang->words['sig_toomanyimages'], $sig_restrictions[1] );
|
$sig_errors[] = sprintf( $this->lang->words['sig_toomanyimages'], $sig_restrictions[1] );
|
||||||
}
|
}
|
||||||
@@ -2379,7 +2300,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
|
|
||||||
if( isset($sig_restrictions[4]) and $sig_restrictions[4] !== '' )
|
if( isset($sig_restrictions[4]) and $sig_restrictions[4] !== '' )
|
||||||
{
|
{
|
||||||
if( mb_substr_count( mb_strtolower($signature), "[url" ) > $sig_restrictions[4] )
|
if( substr_count( strtolower($signature), "[url" ) > $sig_restrictions[4] )
|
||||||
{
|
{
|
||||||
$sig_errors[] = sprintf( $this->lang->words['sig_toomanyurls'], $sig_restrictions[4] );
|
$sig_errors[] = sprintf( $this->lang->words['sig_toomanyurls'], $sig_restrictions[4] );
|
||||||
}
|
}
|
||||||
@@ -2404,6 +2325,10 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
|
|
||||||
$testSig = wordwrap( $signature, $this->settings['signature_line_length'], '<br />' );
|
$testSig = wordwrap( $signature, $this->settings['signature_line_length'], '<br />' );
|
||||||
|
|
||||||
|
// http://community.invisionpower.com/tracker/issue-35105-signature-restriction-minor-bug
|
||||||
|
$testSig = preg_replace( '#^\s*(<br />)+#i', '', $testSig );
|
||||||
|
$testSig = preg_replace( '#(<br />)+?\s*$#i', '', $testSig );
|
||||||
|
|
||||||
if( substr_count( $testSig, "<br />" ) >= $sig_restrictions[5] )
|
if( substr_count( $testSig, "<br />" ) >= $sig_restrictions[5] )
|
||||||
{
|
{
|
||||||
$sig_errors[] = sprintf( $this->lang->words['sig_toomanylines'], $sig_restrictions[5] );
|
$sig_errors[] = sprintf( $this->lang->words['sig_toomanylines'], $sig_restrictions[5] );
|
||||||
@@ -2509,7 +2434,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
// Make sure it's a legal date
|
// Make sure it's a legal date
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$_year = $this->request['year'] ? $this->request['year'] : 1999;
|
$_year = $this->request['year'] ? $this->request['year'] : 2000;
|
||||||
|
|
||||||
if ( ! checkdate( $this->request['month'], $this->request['day'], $_year ) )
|
if ( ! checkdate( $this->request['month'], $this->request['day'], $_year ) )
|
||||||
{
|
{
|
||||||
@@ -2565,7 +2490,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
|
|
||||||
if( $website_field && $fields->out_fields[ 'field_' . $website_field ] )
|
if( $website_field && $fields->out_fields[ 'field_' . $website_field ] )
|
||||||
{
|
{
|
||||||
if( ! stristr( $fields->out_fields[ 'field_' . $website_field ], 'http://' ) )
|
if( stristr( $fields->out_fields[ 'field_' . $website_field ], 'http://' ) === FALSE && stristr( $fields->out_fields[ 'field_' . $website_field ], 'https://' ) === FALSE )
|
||||||
{
|
{
|
||||||
$fields->out_fields[ 'field_' . $website_field ] = 'http://' . $fields->out_fields[ 'field_' . $website_field ];
|
$fields->out_fields[ 'field_' . $website_field ] = 'http://' . $fields->out_fields[ 'field_' . $website_field ];
|
||||||
}
|
}
|
||||||
@@ -2597,30 +2522,10 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
$timeZone = IPSText::alphanumericalClean( $this->request['timeZone'], '+.' );
|
$timeZone = IPSText::alphanumericalClean( $this->request['timeZone'], '+.' );
|
||||||
$dst_correct = intval( $this->request['dst_correct'] );
|
$dst_correct = intval( $this->request['dst_correct'] );
|
||||||
|
|
||||||
/* Ensure 1 account per openID */
|
|
||||||
if ( $this->request['identity_url'] )
|
|
||||||
{
|
|
||||||
$account = $this->DB->buildAndFetch( array( 'select' => 'member_id', 'from' => 'members', 'where' => "identity_url='" . trim($this->request['identity_url']) . "' AND member_id<>" . $this->memberData['member_id'] ) );
|
|
||||||
|
|
||||||
if( $account['member_id'] )
|
|
||||||
{
|
|
||||||
return array( 0 => $this->lang->words['identity_url_assoc'] );
|
|
||||||
}
|
|
||||||
|
|
||||||
$identityUrl = trim($this->request['identity_url']);
|
|
||||||
$identityUrl = rtrim( $identityUrl, "/" );
|
|
||||||
|
|
||||||
if( !strpos( $identityUrl, 'http://' ) === 0 AND !strpos( $identityUrl, 'https://' ) === 0 )
|
|
||||||
{
|
|
||||||
$identityUrl = 'http://' . $identityUrl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add into array */
|
/* Add into array */
|
||||||
$core['time_offset'] = $timeZone;
|
$core['time_offset'] = $timeZone;
|
||||||
$core['dst_in_use'] = $this->settings['time_dst_auto_correction'] ? ( ( $this->request['dstOption'] AND intval($this->request['dstCheck']) == 0 ) ? intval($this->request['dstOption']) : 0 ) : $this->memberData['dst_in_use'];
|
$core['dst_in_use'] = $this->settings['time_dst_auto_correction'] ? ( ( $this->request['dstOption'] AND intval($this->request['dstCheck']) == 0 ) ? intval($this->request['dstOption']) : 0 ) : $this->memberData['dst_in_use'];
|
||||||
$core['members_auto_dst'] = $this->settings['time_dst_auto_correction'] ? intval($this->request['dstCheck']) : $this->memberData['members_auto_dst'];
|
$core['members_auto_dst'] = $this->settings['time_dst_auto_correction'] ? intval($this->request['dstCheck']) : $this->memberData['members_auto_dst'];
|
||||||
$core['identity_url'] = isset($identityUrl) ? $identityUrl : $this->memberData['identity_url'];
|
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Update the DB
|
// Update the DB
|
||||||
@@ -2666,11 +2571,10 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
// Show the form
|
// Show the form
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$_basicOptions = array( array( 'email', $this->lang->words['notopt__email'] ), array( 'pm', $this->lang->words['notopt__pm'] ), array( 'inline', $this->lang->words['notopt__inline'] ), array( 'mobile' => $this->lang->words['notopt__mobile'] ) );
|
$_basicOptions = array( array( 'email', $this->lang->words['notopt__email'] ), array( 'inline', $this->lang->words['notopt__inline'] ), array( 'mobile' => $this->lang->words['notopt__mobile'] ) );
|
||||||
$_configOptions = $notifyLibrary->getNotificationData();
|
$_configOptions = $notifyLibrary->getNotificationData();
|
||||||
$_notifyConfig = $notifyLibrary->getMemberNotificationConfig( $this->memberData );
|
$_notifyConfig = $notifyLibrary->getMemberNotificationConfig( $this->memberData );
|
||||||
$_defaultConfig = $notifyLibrary->getDefaultNotificationConfig();
|
$_defaultConfig = $notifyLibrary->getDefaultNotificationConfig();
|
||||||
$_noPrivateMessage = array( 'new_private_message', 'reply_private_message' );
|
|
||||||
$_saveConfig = array();
|
$_saveConfig = array();
|
||||||
|
|
||||||
foreach( $_configOptions as $option )
|
foreach( $_configOptions as $option )
|
||||||
@@ -2699,50 +2603,6 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
{
|
{
|
||||||
$_saveConfig[ $option['key'] ]['selected'] = $_defaultConfig[ $option['key'] ]['selected'];
|
$_saveConfig[ $option['key'] ]['selected'] = $_defaultConfig[ $option['key'] ]['selected'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @link http://community.invisionpower.com/tracker/issue-23453-notification-defaults/
|
|
||||||
*/
|
|
||||||
if( in_array( $option['key'], $_noPrivateMessage ) AND in_array( 'pm', $_saveConfig[ $option['key'] ]['selected'] ) )
|
|
||||||
{
|
|
||||||
$_newSelected = array();
|
|
||||||
|
|
||||||
foreach( $_saveConfig[ $option['key'] ]['selected'] as $_v )
|
|
||||||
{
|
|
||||||
if( $_v != 'pm' )
|
|
||||||
{
|
|
||||||
$_newSelected[] = $_v;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$_saveConfig[ $option['key'] ]['selected'] = $_newSelected;
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Nothing selected, default to inline/email/pm
|
|
||||||
// based on availability, or inline if none are available
|
|
||||||
// Decided to allow nothing selected to be 'no notification'
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
//if( !count($_saveConfig[ $option['key'] ]['selected']) )
|
|
||||||
//{
|
|
||||||
// if( !in_array( 'inline', $_defaultConfig[ $option['key'] ]['disabled'] ) )
|
|
||||||
// {
|
|
||||||
// $_saveConfig[ $option['key'] ]['selected'][] = 'inline';
|
|
||||||
// }
|
|
||||||
// else if( !in_array( 'email', $_defaultConfig[ $option['key'] ]['disabled'] ) )
|
|
||||||
// {
|
|
||||||
// $_saveConfig[ $option['key'] ]['selected'][] = 'email';
|
|
||||||
// }
|
|
||||||
// else if( !in_array( 'pm', $_defaultConfig[ $option['key'] ]['disabled'] ) )
|
|
||||||
// {
|
|
||||||
// $_saveConfig[ $option['key'] ]['selected'][] = 'pm';
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// $_saveConfig[ $option['key'] ]['selected'][] = 'inline';
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -3172,7 +3032,7 @@ class usercpForms_core extends public_core_usercp_manualResolver implements inte
|
|||||||
|
|
||||||
IPSText::getTextClass( 'email' )->sendMail();
|
IPSText::getTextClass( 'email' )->sendMail();
|
||||||
|
|
||||||
$this->registry->getClass('output')->redirectScreen( $this->lang->words['ce_redirect'], $this->settings['base_url'] . 'app=core&module=global&section=register&do=07' );
|
$this->registry->getClass('output')->silentRedirect( $this->settings['base_url'] . 'app=core&module=global&section=register&do=07' );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @file warnings.php Warnings extension for core
|
||||||
|
*~TERABYTE_DOC_READY~
|
||||||
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
|
* $Author: bfarber $ (Original: Mark)
|
||||||
|
* @since -
|
||||||
|
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
|
* @version v3.3.4
|
||||||
|
* $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 warnings_core
|
||||||
|
* @brief Warnings Extension for core
|
||||||
|
*/
|
||||||
|
class warnings_core
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get Content URL
|
||||||
|
*
|
||||||
|
* @param array $warning Row from members_warn_logs
|
||||||
|
* @return @e array array( url => URL to the content the warning came from, title => Title )
|
||||||
|
*/
|
||||||
|
public function getContentUrl( $warning )
|
||||||
|
{
|
||||||
|
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_profile' ), 'members' );
|
||||||
|
|
||||||
|
if ( $warning['wl_content_id1'] == 'mreport' )
|
||||||
|
{
|
||||||
|
$report = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', 'from' => 'rc_reports_index', 'where' => "id=" . intval( $warning['wl_content_id2'] ) ) );
|
||||||
|
|
||||||
|
if ( ! empty($report['id']) )
|
||||||
|
{
|
||||||
|
return array( 'url' => ipsRegistry::getClass('output')->buildUrl( "app=core&module=reports&do=show_report&rid={$report['id']}" ), 'title' => $report['title'] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif ( $warning['wl_content_id1'] == 'core-reports' )
|
||||||
|
{
|
||||||
|
$exploded = explode( '-', $warning['wl_content_id2'] );
|
||||||
|
|
||||||
|
require_once( IPS_ROOT_PATH . 'sources/classes/comments/bootstrap.php' );/*noLibHook*/
|
||||||
|
$comments = classes_comments_bootstrap::controller( $warning['wl_content_id1'] );
|
||||||
|
|
||||||
|
$parent = $comments->remapFromLocal( $comments->fetchParent( $exploded[0] ), 'parent' );
|
||||||
|
|
||||||
|
if ( ! empty($parent['parent_id']) )
|
||||||
|
{
|
||||||
|
return array( 'url' => ipsRegistry::getClass('output')->buildUrl( "app=core&module=global§ion=comments&fromApp={$warning['wl_content_id1']}&do=findComment&parentId={$exploded[0]}&comment_id={$exploded[1]}" ), 'title' => $parent['parent_title'] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -253,17 +253,17 @@ function IPB3TemplateDiffResults()
|
|||||||
{
|
{
|
||||||
if ( json['data_type'] == 'css' )
|
if ( json['data_type'] == 'css' )
|
||||||
{
|
{
|
||||||
content = '<div class="acp-box"><h3>' + _text + ': ' + json['data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow:auto"><pre>' + json['data_content'] + '</pre></div></div>';
|
content = '<div class="acp-box"><h3>' + _text + ': ' + json['data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow:auto;max-height: 575px;"><pre>' + json['data_content'] + '</pre></div></div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
content = '<div class="acp-box"><h3>' + _text + ': ' + json['data_group'] + ' > ' + json['data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow:auto"><pre>' + json['data_content'] + '</pre></div></div>';
|
content = '<div class="acp-box"><h3>' + _text + ': ' + json['data_group'] + ' > ' + json['data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow:auto;max-height: 575px;"><pre>' + json['data_content'] + '</pre></div></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
max = document.viewport.getHeight();
|
max = document.viewport.getHeight();
|
||||||
max = ( max < 600 ) ? max : 600;
|
max = ( max < 600 ) ? max : 600;
|
||||||
|
|
||||||
popup = new ipb.Popup('VPopUp', { type: 'pane', modal: false, hideAtStart: true, w: '600px', h: max + 'px', initial: content } );
|
popup = new ipb.Popup('VPopUp', { type: 'pane', modal: false, hideAtStart: true, w: '600px', h: max, initial: content } );
|
||||||
popup.show();
|
popup.show();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -335,17 +335,17 @@ function IPB3TemplateDiffResults()
|
|||||||
|
|
||||||
if ( json['change_data_type'] == 'css' )
|
if ( json['change_data_type'] == 'css' )
|
||||||
{
|
{
|
||||||
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_title'] + '.css</h3><div style="padding:4px;line-height:125%;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
|
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow: auto;max-height: 575px;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_group'] + ' > ' + json['change_data_title'] + '</h3><div style="padding:4px;line-height:125%;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
|
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_group'] + ' > ' + json['change_data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow: auto;max-height: 575px;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
max = document.viewport.getHeight();
|
max = document.viewport.getHeight();
|
||||||
max = ( max < 600 ) ? max : 600;
|
max = ( max < 600 ) ? max : 600;
|
||||||
|
|
||||||
IPB3TemplateDiffResults.popUps['preview-' + changeId ] = new ipb.Popup('diffPopUp', { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: max + 'px', initial: content } );
|
IPB3TemplateDiffResults.popUps['preview-' + changeId ] = new ipb.Popup('diffPopUp', { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: max, initial: content } );
|
||||||
IPB3TemplateDiffResults.popUps['preview-' + changeId ].show();
|
IPB3TemplateDiffResults.popUps['preview-' + changeId ].show();
|
||||||
|
|
||||||
/* Observe */
|
/* Observe */
|
||||||
@@ -402,16 +402,16 @@ function IPB3TemplateDiffResults()
|
|||||||
/* otherwise... */
|
/* otherwise... */
|
||||||
if ( json['change_merge_content'] )
|
if ( json['change_merge_content'] )
|
||||||
{
|
{
|
||||||
/* Ok, for some reason Safari (and possibly others) doesn't show the pop-up when viewing a
|
/* Ok, for some reason Safari (and possibly others) doesn't show the pop-up when viewing a
|
||||||
template bit. I presume it's because prototype/javascript will not insert invalid HTML into a node even
|
template bit. I presume it's because prototype/javascript will not insert invalid HTML into a node even
|
||||||
though it's encoded properly. After a few days working on merge, this is a quick hack to get it done
|
though it's encoded properly. After a few days working on merge, this is a quick hack to get it done
|
||||||
Force a 750px div in to position pop-up correctly on the screen, then once the pop-up has been created
|
Force a 750px div in to position pop-up correctly on the screen, then once the pop-up has been created
|
||||||
shove the content in.
|
shove the content in.
|
||||||
<3 javascript */
|
<3 javascript */
|
||||||
var _tmp = Math.floor( Math.random() * 1001 );
|
var _tmp = Math.floor( Math.random() * 1001 );
|
||||||
|
|
||||||
_qb = "<div style='float:left; margin-top:6px'><input type='button' id='mergeResolveCustom_" + _tmp + "' class='button __rc" + changeId + "' value='" + ipb.lang['resolveall_button'] + "' /> <input type='button' id='mergeResolveNew_" + _tmp + "' class='button __rn" + changeId + "' value='" + ipb.lang['resolveall_newwin'] + "' /></div>";
|
_qb = "<div style='float:left; margin-top:6px'><input type='button' id='mergeResolveCustom_" + _tmp + "' class='button __rc" + changeId + "' value='" + ipb.lang['resolveall_button'] + "' /> <input type='button' id='mergeResolveNew_" + _tmp + "' class='button __rn" + changeId + "' value='" + ipb.lang['resolveall_newwin'] + "' /></div>";
|
||||||
_tb = '<textarea name="content" id="mergeContent" style="width:100%; height:700px; line-height:150%">' + json['change_merge_content'] + '</textarea>' + _qb + '<div style="text-align:right" class="acp-actionbar"><input type="button" id="mergeSubmit" value="' + ipb.lang['save_button'] + '" class="button primary __i' + changeId + '" /></div>';
|
_tb = '<textarea name="content" id="mergeContent" style="width:100%; height:500px; line-height:150%">' + json['change_merge_content'] + '</textarea>' + _qb + '<div style="text-align:right" class="acp-actionbar"><input type="button" id="mergeSubmit" value="' + ipb.lang['save_button'] + '" class="button primary __i' + changeId + '" /></div>';
|
||||||
|
|
||||||
if ( json['change_data_type'] == 'css' )
|
if ( json['change_data_type'] == 'css' )
|
||||||
{
|
{
|
||||||
@@ -422,7 +422,7 @@ function IPB3TemplateDiffResults()
|
|||||||
content = '<div class="acp-box"><h3>' + json['change_data_group'] + ' > ' + json['change_data_title'] + '</h3><div style="padding:4px;">' + _tb + '</div></div>';
|
content = '<div class="acp-box"><h3>' + json['change_data_group'] + ' > ' + json['change_data_title'] + '</h3><div style="padding:4px;">' + _tb + '</div></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
IPB3TemplateDiffResults.popUps['edit-' + changeId ] = new ipb.Popup('diffEditPopUp_' + _tmp, { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: '600px', initial: '<div style="height:750px"> </div>' } );
|
IPB3TemplateDiffResults.popUps['edit-' + changeId ] = new ipb.Popup('diffEditPopUp_' + _tmp, { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: 650, initial: '<div style="height:590px"> </div>' } );
|
||||||
IPB3TemplateDiffResults.popUps['edit-' + changeId ].show();
|
IPB3TemplateDiffResults.popUps['edit-' + changeId ].show();
|
||||||
|
|
||||||
$('diffEditPopUp_' + _tmp + '_inner').update( content );
|
$('diffEditPopUp_' + _tmp + '_inner').update( content );
|
||||||
@@ -611,10 +611,10 @@ function IPB3TemplateDiffResults()
|
|||||||
alert( ipb.lang['oops'] + t.responseText );
|
alert( ipb.lang['oops'] + t.responseText );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ ACPHomepage = {
|
|||||||
{
|
{
|
||||||
if ( $('members_display_name').value == "" )
|
if ( $('members_display_name').value == "" )
|
||||||
{
|
{
|
||||||
alert("Нужно ввести имя пользователя!");
|
alert("You must enter a username!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/************************************************/
|
||||||
|
/* IPB3 Javascript */
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/* acp.hooksList.js - Hooks listing */
|
||||||
|
/* (c) IPS, Inc 2011 */
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/* Author: Terabyte */
|
||||||
|
/************************************************/
|
||||||
|
|
||||||
|
var _hooksList = window.IPBACP;
|
||||||
|
|
||||||
|
_hooksList.prototype.hooksList = {
|
||||||
|
popups: [],
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Init function
|
||||||
|
*/
|
||||||
|
init: function()
|
||||||
|
{
|
||||||
|
Debug.write("Initializing acp.hooksList.js");
|
||||||
|
|
||||||
|
document.observe("dom:loaded", function(){
|
||||||
|
acp.hooksList.initPage();
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
initPage: function()
|
||||||
|
{
|
||||||
|
$('install_new_hook').observe('click', acp.hooksList.addFolder);
|
||||||
|
},
|
||||||
|
|
||||||
|
addFolder: function( e, elem )
|
||||||
|
{
|
||||||
|
Event.stop(e);
|
||||||
|
|
||||||
|
if ( ! Object.isUndefined(acp.hooksList.popups['install']) )
|
||||||
|
{
|
||||||
|
acp.hooksList.popups['install'].show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Make a new popup
|
||||||
|
acp.hooksList.popups['install'] = new ipb.Popup( 'install', {
|
||||||
|
type: 'modal',
|
||||||
|
initial: ipb.templates['install_new_hook'].evaluate(),
|
||||||
|
w: '550px',
|
||||||
|
stem: false,
|
||||||
|
hideAtStart: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
acp.hooksList.init();
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/************************************************/
|
||||||
|
/* IPB3 Javascript */
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/* acp.mmobileimages.js */
|
||||||
|
/* (c) IPS, Inc 2011 */
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/* Author: Matt Mecham */
|
||||||
|
/************************************************/
|
||||||
|
|
||||||
|
var _mobileImages = window.IPBACP;
|
||||||
|
|
||||||
|
_mobileImages.prototype.mobileImages = {
|
||||||
|
popups: [],
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Init function
|
||||||
|
*/
|
||||||
|
init: function()
|
||||||
|
{
|
||||||
|
Debug.write("Initializing acp.mobileImages.js");
|
||||||
|
|
||||||
|
document.observe("dom:loaded", function(){
|
||||||
|
acp.mobileImages.initPage();
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
initPage: function()
|
||||||
|
{
|
||||||
|
$('importXml').observe('click', acp.mobileImages.importPop);
|
||||||
|
},
|
||||||
|
|
||||||
|
importPop: function( e, elem )
|
||||||
|
{
|
||||||
|
Event.stop(e);
|
||||||
|
|
||||||
|
if ( ! Object.isUndefined(acp.mobileImages.popups['install']) )
|
||||||
|
{
|
||||||
|
acp.mobileImages.popups['install'].show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Make a new popup
|
||||||
|
acp.mobileImages.popups['install'] = new ipb.Popup( 'install', {
|
||||||
|
type: 'modal',
|
||||||
|
initial: ipb.templates['import_xml'].evaluate(),
|
||||||
|
w: '550px',
|
||||||
|
stem: false,
|
||||||
|
hideAtStart: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
acp.mobileImages.init();
|
||||||
@@ -85,11 +85,11 @@ function IPBCSS()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert( "Похоже у нас проблемы: " + t.responseText );
|
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -133,21 +133,21 @@ function IPBCSS()
|
|||||||
if ( json['errors'] )
|
if ( json['errors'] )
|
||||||
{
|
{
|
||||||
/* Something inline would be very nice here.. rather than this ugly alert */
|
/* Something inline would be very nice here.. rather than this ugly alert */
|
||||||
alert("Ошибка: " + json['errors'] );
|
alert("Message: " + json['errors'] );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert("Сохранено!");
|
alert("Error:: Saved!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert( "Похоже у нас проблемы: " + t.responseText );
|
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -159,14 +159,14 @@ function IPBCSS()
|
|||||||
/* Make sure we're mean it... */
|
/* Make sure we're mean it... */
|
||||||
if ( $('tplate_cssRow_' + css_id ).hasClassName( 'tplateRow_new') )
|
if ( $('tplate_cssRow_' + css_id ).hasClassName( 'tplateRow_new') )
|
||||||
{
|
{
|
||||||
if ( ! confirm( "Удалить CSS файл ?\nФайл будет удален из ВСЕХ стилей!" ) )
|
if ( ! confirm( "REMOVE CSS file?\n This will remove this template bit in ALL skins!" ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( ! confirm( "Отменить изменения в CSS файле ?\nВсе изменения будут утеряны!" ) )
|
if ( ! confirm( "Revert CSS file?\n All changes WILL be lost!" ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -196,17 +196,17 @@ function IPBCSS()
|
|||||||
if ( json['errors'] )
|
if ( json['errors'] )
|
||||||
{
|
{
|
||||||
/* Something inline would be very nice here.. rather than this ugly alert */
|
/* Something inline would be very nice here.. rather than this ugly alert */
|
||||||
alert("Ошибка: " + json['errors'] );
|
alert("Error:: " + json['errors'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert( "Похоже у нас проблемы: " + t.responseText );
|
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -239,11 +239,11 @@ function IPBCSS()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert( "Похоже у нас проблемы: " + t.responseText );
|
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,34 @@ function addAnotherRequirement()
|
|||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getAppVersions( getIndex )
|
||||||
|
{
|
||||||
|
getIndex = parseInt(getIndex);
|
||||||
|
indexValue = $F('requireApp[' + getIndex + ']');
|
||||||
|
|
||||||
|
// Show the versions dropdowns now
|
||||||
|
if ( indexValue == 0 )
|
||||||
|
{
|
||||||
|
$('requirementRow_' + getIndex + '_versions').update('');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getAppVersions&secure_key=" + ipb.vars['md5_hash'] + "&i=" + getIndex + "&chosenApp=" + indexValue;
|
||||||
|
url = url.replace( /&/g, '&' );
|
||||||
|
|
||||||
|
new Ajax.Request( url,
|
||||||
|
{
|
||||||
|
method: 'GET',
|
||||||
|
onSuccess: function ( t )
|
||||||
|
{
|
||||||
|
$('requirementRow_' + getIndex + '_versions').update( t.responseText );
|
||||||
|
},
|
||||||
|
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||||
|
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function removeRequirement( idToRemove )
|
function removeRequirement( idToRemove )
|
||||||
{
|
{
|
||||||
idToRemove = parseInt(idToRemove);
|
idToRemove = parseInt(idToRemove);
|
||||||
@@ -305,6 +333,7 @@ function getHookIds( elementIndex )
|
|||||||
{
|
{
|
||||||
var template = $F('skinFunction[' + elementIndex + ']');
|
var template = $F('skinFunction[' + elementIndex + ']');
|
||||||
var type = $F('type[' + elementIndex + ']');
|
var type = $F('type[' + elementIndex + ']');
|
||||||
|
var group = $F('skinGroup[' + elementIndex + ']');
|
||||||
|
|
||||||
if( $('tr_id[' + elementIndex + ']') != null )
|
if( $('tr_id[' + elementIndex + ']') != null )
|
||||||
{
|
{
|
||||||
@@ -319,7 +348,7 @@ function getHookIds( elementIndex )
|
|||||||
/* Got a type? */
|
/* Got a type? */
|
||||||
if( type != '0' )
|
if( type != '0' )
|
||||||
{
|
{
|
||||||
url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getHookIds&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&type=" + type + "&template=" + template;
|
url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getHookIds&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&type=" + type + "&template=" + template + "&group=" + group;
|
||||||
url = url.replace( /&/g, '&' );
|
url = url.replace( /&/g, '&' );
|
||||||
|
|
||||||
new Ajax.Request( url,
|
new Ajax.Request( url,
|
||||||
|
|||||||
@@ -217,14 +217,14 @@ function IPBTemplateDiff()
|
|||||||
*/
|
*/
|
||||||
this.timeOutAjax = function( t )
|
this.timeOutAjax = function( t )
|
||||||
{
|
{
|
||||||
if ( confirm( "Нет ответа от сервера.\nХотите подождать?" ) )
|
if ( confirm( "No response from the webserver.\nDo you wish to continue waiting?" ) )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
t.transport.abort();
|
t.transport.abort();
|
||||||
alert( "Запрос отменен" );
|
alert( "Request Cancelled" );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@ function IPBTemplateDiff()
|
|||||||
*/
|
*/
|
||||||
this.failureAjax = function( t )
|
this.failureAjax = function( t )
|
||||||
{
|
{
|
||||||
alert( "Ошибка: " + t.responseText );
|
alert( "Failure: " + t.responseText );
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -241,7 +241,7 @@ function IPBTemplateDiff()
|
|||||||
*/
|
*/
|
||||||
this.exceptionAjax = function( t )
|
this.exceptionAjax = function( t )
|
||||||
{
|
{
|
||||||
alert( "Исключение: " + t.responseText );
|
alert( "Exception: " + t.responseText );
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -255,7 +255,7 @@ function IPBTemplateDiff()
|
|||||||
/* Not a JSON response? */
|
/* Not a JSON response? */
|
||||||
if ( ! t.responseText.match( /^(\s+?)?\{/ ) )
|
if ( ! t.responseText.match( /^(\s+?)?\{/ ) )
|
||||||
{
|
{
|
||||||
alert( "Ошибка:\n" + t.responseText );
|
alert( "Error:\n" + t.responseText );
|
||||||
Debug.write( t );
|
Debug.write( t );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -265,7 +265,7 @@ function IPBTemplateDiff()
|
|||||||
|
|
||||||
if ( json['error'] )
|
if ( json['error'] )
|
||||||
{
|
{
|
||||||
alert( "Ошибка: " . json['error'] );
|
alert( "An error occurred: " . json['error'] );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,11 +102,11 @@ function IPBTemplateSandR()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText );
|
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -161,22 +161,22 @@ function IPBTemplateSandR()
|
|||||||
if ( json['errors'] )
|
if ( json['errors'] )
|
||||||
{
|
{
|
||||||
/* Something inline would be very nice here.. rather than this ugly alert */
|
/* Something inline would be very nice here.. rather than this ugly alert */
|
||||||
alert("Ошибка: " + json['errors'] );
|
alert("Message: " + json['errors'] );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$('replaceButton').disabled = false;
|
$('replaceButton').disabled = false;
|
||||||
$('replaceButton').value = "Заменить выбранные";
|
$('replaceButton').value = "Replace Selected";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText );
|
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -218,7 +218,7 @@ function IPBTemplateSandR()
|
|||||||
if ( json['errors'] )
|
if ( json['errors'] )
|
||||||
{
|
{
|
||||||
/* Something inline would be very nice here.. rather than this ugly alert */
|
/* Something inline would be very nice here.. rather than this ugly alert */
|
||||||
alert("Ошибка: " + json['errors'] );
|
alert("Message: " + json['errors'] );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -228,11 +228,11 @@ function IPBTemplateSandR()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText );
|
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//onException: function( f,e ){ alert( "Исключение: " + e ) },
|
//onException: function( f,e ){ alert( "Exception: " + e ) },
|
||||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -303,7 +303,7 @@ function IPBTemplateSandR()
|
|||||||
for( i = 0 ; i < json['templates'].length; i++ )
|
for( i = 0 ; i < json['templates'].length; i++ )
|
||||||
{
|
{
|
||||||
_output += _tplate.evaluate( json['templates'][i] );
|
_output += _tplate.evaluate( json['templates'][i] );
|
||||||
};
|
}
|
||||||
|
|
||||||
/* Clear out any current listing */
|
/* Clear out any current listing */
|
||||||
$$( '#groupRowTemplates_' + groupName + " table.ipsTable" ).each( function(elem) {
|
$$( '#groupRowTemplates_' + groupName + " table.ipsTable" ).each( function(elem) {
|
||||||
@@ -328,7 +328,7 @@ function IPBTemplateSandR()
|
|||||||
/* Checked, please? */
|
/* Checked, please? */
|
||||||
IPB3TemplatesSandR.toggleGroupBox( json['templates'][i]['template_group'] );
|
IPB3TemplatesSandR.toggleGroupBox( json['templates'][i]['template_group'] );
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -103,11 +103,11 @@ function IPBTemplates()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert( "Ошибка: " + t.responseText );
|
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -169,11 +169,11 @@ function IPBTemplates()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert( "Ошибка: " + t.responseText );
|
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -222,21 +222,21 @@ function IPBTemplates()
|
|||||||
if ( json['errors'] )
|
if ( json['errors'] )
|
||||||
{
|
{
|
||||||
/* Something inline would be very nice here.. rather than this ugly alert */
|
/* Something inline would be very nice here.. rather than this ugly alert */
|
||||||
alert("Ошибка: " + json['errors'] );
|
alert("Error:: " + json['errors'] );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert("Сохранено!");
|
alert("Error:: Saved!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert( "Ошибка: " + t.responseText );
|
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -248,14 +248,14 @@ function IPBTemplates()
|
|||||||
/* Make sure we're mean it... */
|
/* Make sure we're mean it... */
|
||||||
if ( $('tplate_templaterow_' + template_id ).hasClassName( 'tplateRow_new') )
|
if ( $('tplate_templaterow_' + template_id ).hasClassName( 'tplateRow_new') )
|
||||||
{
|
{
|
||||||
if ( ! confirm( "Удалить шаблон?\n Произойдет удаление шаблона из ВСЕХ стилей!" ) )
|
if ( ! confirm( "REMOVE template bit?\n This will remove this template bit in ALL skins!" ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( ! confirm( "Откатить изменения?\n Все изменения БУДУТ УТРАЧЕНЫ!" ) )
|
if ( ! confirm( "Revert template bit?\n All changes WILL be lost!" ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -295,17 +295,17 @@ function IPBTemplates()
|
|||||||
if ( json['errors'] )
|
if ( json['errors'] )
|
||||||
{
|
{
|
||||||
/* Something inline would be very nice here.. rather than this ugly alert */
|
/* Something inline would be very nice here.. rather than this ugly alert */
|
||||||
alert("Ошибка: " + json['errors'] );
|
alert("Error:: " + json['errors'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert( "Ошибка: " + t.responseText );
|
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -338,11 +338,11 @@ function IPBTemplates()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert( "Ошибка: " + t.responseText );
|
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -499,7 +499,7 @@ function IPBTemplates()
|
|||||||
}
|
}
|
||||||
|
|
||||||
_output += _tplate.evaluate( json['templates'][i] );
|
_output += _tplate.evaluate( json['templates'][i] );
|
||||||
};
|
}
|
||||||
|
|
||||||
/* Write it out */
|
/* Write it out */
|
||||||
$('tplate_bitList').update( _output );
|
$('tplate_bitList').update( _output );
|
||||||
|
|||||||
@@ -124,11 +124,11 @@ function IPBUAgents()
|
|||||||
if ( json['errors'] )
|
if ( json['errors'] )
|
||||||
{
|
{
|
||||||
/* Something inline would be very nice here.. rather than this ugly alert */
|
/* Something inline would be very nice here.. rather than this ugly alert */
|
||||||
alert("Ошибка: " + json['errors'] );
|
alert("Error:: " + json['errors'] );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert("Сохранено!");
|
alert("Error:: Saved!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -179,7 +179,7 @@ function IPBUAgents()
|
|||||||
if ( json['errors'] )
|
if ( json['errors'] )
|
||||||
{
|
{
|
||||||
/* Something inline would be very nice here.. rather than this ugly alert */
|
/* Something inline would be very nice here.. rather than this ugly alert */
|
||||||
alert("Ошибка: " + json['errors'] );
|
alert("Error:: " + json['errors'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -249,7 +249,7 @@ function IPBUAgents()
|
|||||||
{
|
{
|
||||||
_box.selectedIndex = i;
|
_box.selectedIndex = i;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
ipb.positionCenter( 'tplate_editor_' + uagent_id );
|
ipb.positionCenter( 'tplate_editor_' + uagent_id );
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Template comparison
|
* Template comparison
|
||||||
* Last Updated: $Date: 2011-07-12 10:53:25 -0400 (Tue, 12 Jul 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since Friday 19th May 2006 17:33
|
* @since Friday 19th May 2006 17:33
|
||||||
* @version $Revision: 9208 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -132,7 +132,6 @@ class admin_core_ajax_compare extends ipsAjaxCommand
|
|||||||
$classDifference = new classDifference();
|
$classDifference = new classDifference();
|
||||||
$classDifference->method = 'PHP';
|
$classDifference->method = 'PHP';
|
||||||
|
|
||||||
|
|
||||||
$difference = $classDifference->getDifferences( $original['css_content'], $current['css_content'] );
|
$difference = $classDifference->getDifferences( $original['css_content'], $current['css_content'] );
|
||||||
|
|
||||||
if( $classDifference->diff_found )
|
if( $classDifference->diff_found )
|
||||||
@@ -201,23 +200,44 @@ class admin_core_ajax_compare extends ipsAjaxCommand
|
|||||||
$classDifference->method = 'PHP';
|
$classDifference->method = 'PHP';
|
||||||
|
|
||||||
|
|
||||||
$difference = $classDifference->getDifferences( $original['template_content'], $current['template_content'] );
|
$difference = $classDifference->getDifferences( $original['template_content'], $current['template_content'], 'unified' );
|
||||||
|
|
||||||
if( $classDifference->diff_found )
|
if ( 1 == 1 )
|
||||||
{
|
{
|
||||||
$difference = str_replace( "\n", "<br>", $difference );
|
$difference = str_replace( array( "\r\n", "\r" ), "\n", $difference );
|
||||||
$difference = str_replace( "><", ">\n<" ,$difference );
|
|
||||||
$difference = preg_replace( "#(?<!(\<del|\<ins)) {1}(?!:style)#i", " " ,$difference );
|
$difference = preg_replace( '#(^|\n)(\-|\+)([^\n]+?)\n#', "\n\\1\\2\\3\n\n", $difference );
|
||||||
$difference = str_replace( "\t", " ", $difference );
|
|
||||||
|
$difference = htmlspecialchars( $difference );
|
||||||
|
$difference = preg_replace( '#^@@([^@]+?)@@#m', '', $difference );
|
||||||
|
$difference = preg_replace( '#(^|\n)\-([^\n]+?)\n#', "\\1<del>\\2</del>\n", $difference );
|
||||||
|
$difference = preg_replace( '#(^|\n)\+([^\n]+?)\n#', "\\1<ins>\\2</ins>\n", $difference );
|
||||||
|
|
||||||
|
$difference = str_replace( "</ins>\n\n", "</ins>\n", $difference );
|
||||||
|
$difference = str_replace( "</del>\n", '</del>', $difference );
|
||||||
|
$difference = str_replace( "\n\n<ins>", "\n<ins>", $difference );
|
||||||
|
$difference = str_replace( "\n\n<del>", "\n<del>", $difference );
|
||||||
|
|
||||||
|
$difference = '<pre>' . $difference . '</pre>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$difference = htmlspecialchars($current['template_content']);
|
if( $classDifference->diff_found )
|
||||||
$difference = str_replace( ' ', ' ', $difference );
|
{
|
||||||
$difference = str_replace( "\r", '<br />', $difference );
|
$difference = str_replace( "\n", "<br>", $difference );
|
||||||
$difference = str_replace( "\n", '<br />', $difference );
|
$difference = str_replace( "><", ">\n<" ,$difference );
|
||||||
$difference = str_replace( "><", ">\n<" ,$difference );
|
$difference = preg_replace( "#(?<!(\<del|\<ins)) {1}(?!:style)#i", " " ,$difference );
|
||||||
$difference = str_replace( "\t", " ", $difference );
|
$difference = str_replace( "\t", " ", $difference );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$difference = htmlspecialchars($current['template_content']);
|
||||||
|
$difference = str_replace( ' ', ' ', $difference );
|
||||||
|
$difference = str_replace( "\r", '<br />', $difference );
|
||||||
|
$difference = str_replace( "\n", '<br />', $difference );
|
||||||
|
$difference = str_replace( "><", ">\n<" ,$difference );
|
||||||
|
$difference = str_replace( "\t", " ", $difference );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->returnHtml( $this->html->differenceResult( $difference ) );
|
$this->returnHtml( $this->html->differenceResult( $difference ) );
|
||||||
|
|||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* AJAX Functions For applications/core/js/ipb3CSS.js file
|
* AJAX Functions For applications/core/js/ipb3CSS.js file
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since Friday 19th May 2006 17:33
|
* @since Friday 19th May 2006 17:33
|
||||||
* @version $Revision: 8644 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Login handler abstraction : AJAX Find Names functions
|
* Login handler abstraction : AJAX Find Names functions
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since Tuesday 1st March 2005 (11:52)
|
* @since Tuesday 1st March 2005 (11:52)
|
||||||
* @version $Revision: 8644 $
|
* @version $Revision: 10914 $
|
||||||
* @see public_core_ajax_findnames
|
* @see public_core_ajax_findnames
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -55,7 +55,8 @@ class admin_core_ajax_findnames extends ipsAjaxCommand
|
|||||||
// INIT
|
// INIT
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$name = IPSText::convertUnicode( $this->convertAndMakeSafe( ipsRegistry::$request['name'], 0 ) );
|
$name = IPSText::convertUnicode( $this->convertAndMakeSafe( $this->request['name'], 0 ), true );
|
||||||
|
$name = IPSText::convertCharsets( $name, 'utf-8', IPS_DOC_CHAR_SET );
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Check length
|
// Check length
|
||||||
@@ -72,7 +73,7 @@ class admin_core_ajax_findnames extends ipsAjaxCommand
|
|||||||
|
|
||||||
$this->DB->build( array( 'select' => 'm.members_display_name, m.name, m.member_id, m.member_group_id',
|
$this->DB->build( array( 'select' => 'm.members_display_name, m.name, m.member_id, m.member_group_id',
|
||||||
'from' => array( 'members' => 'm' ),
|
'from' => array( 'members' => 'm' ),
|
||||||
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( mb_strtolower( $name ) ) . "%'",
|
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( strtolower( $name ) ) . "%'",
|
||||||
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
|
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
|
||||||
'limit' => array( 0, 15 ),
|
'limit' => array( 0, 15 ),
|
||||||
'add_join' => array( array( 'select' => 'p.*',
|
'add_join' => array( array( 'select' => 'p.*',
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Hooks (AJAX)
|
* Hooks (AJAX)
|
||||||
* Last Updated: $Date: 2011-10-07 22:31:51 -0400 (Fri, 07 Oct 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 1st march 2002
|
* @since 1st march 2002
|
||||||
* @version $Revision: 9588 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_IPB' ) )
|
if ( ! defined( 'IN_IPB' ) )
|
||||||
@@ -72,7 +72,7 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
// Load skin
|
// Load skin
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$this->html = ipsRegistry::getClass('output')->loadTemplate('cp_skin_hooks_export');
|
$this->html = ipsRegistry::getClass('output')->loadTemplate( 'cp_skin_hooks_export', 'core' );
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Load hooks library
|
// Load hooks library
|
||||||
@@ -126,6 +126,10 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
$this->_getApplications();
|
$this->_getApplications();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'getAppVersions':
|
||||||
|
$this->_getAppVersions();
|
||||||
|
break;
|
||||||
|
|
||||||
case 'save':
|
case 'save':
|
||||||
$this->save();
|
$this->save();
|
||||||
break;
|
break;
|
||||||
@@ -147,6 +151,7 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
/* Init vars */
|
/* Init vars */
|
||||||
$i = intval($this->request['i']);
|
$i = intval($this->request['i']);
|
||||||
$name = empty($this->request['name']) ? 'libApplication' : trim($this->request['name']);
|
$name = empty($this->request['name']) ? 'libApplication' : trim($this->request['name']);
|
||||||
|
$js = '';
|
||||||
$apps = array();
|
$apps = array();
|
||||||
|
|
||||||
foreach( ipsRegistry::$applications as $dir => $appdata )
|
foreach( ipsRegistry::$applications as $dir => $appdata )
|
||||||
@@ -160,13 +165,54 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
if ( $name != 'libApplication' )
|
if ( $name != 'libApplication' )
|
||||||
{
|
{
|
||||||
array_unshift( $apps, array( 0, $this->lang->words['a_selectone'] ) );
|
array_unshift( $apps, array( 0, $this->lang->words['a_selectone'] ) );
|
||||||
|
|
||||||
|
$js = "onchange='getAppVersions({$i})'";
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = $this->registry->output->formDropdown( "{$name}[{$i}]", $apps );
|
$output = $this->registry->output->formDropdown( "{$name}[{$i}]", $apps, '', '', $js );
|
||||||
|
|
||||||
$this->returnHtml( $output );
|
$this->returnHtml( $output );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get application versions
|
||||||
|
*
|
||||||
|
* @return @e void [Outputs to screen]
|
||||||
|
*/
|
||||||
|
protected function _getAppVersions()
|
||||||
|
{
|
||||||
|
/* Init vars */
|
||||||
|
$i = intval($this->request['i']);
|
||||||
|
$app = trim($this->request['chosenApp']);
|
||||||
|
$versions = array();
|
||||||
|
|
||||||
|
/* Load setup library & get versions */
|
||||||
|
require_once( IPS_ROOT_PATH . 'setup/sources/base/setup.php' );/*noLibHook*/
|
||||||
|
|
||||||
|
$_versions = IPSSetUp::fetchXmlAppVersions( $app );
|
||||||
|
|
||||||
|
krsort($_versions);
|
||||||
|
|
||||||
|
/* Setup our default 'no version' value */
|
||||||
|
$versions[] = array( 0, $this->lang->words['h_any_version'] );
|
||||||
|
|
||||||
|
foreach( $_versions as $long => $human )
|
||||||
|
{
|
||||||
|
if ( $long < 30000 && in_array( $app, array( 'core', 'forums', 'members' ) ) )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$versions[] = array( $long, $human );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return data ;o */
|
||||||
|
$minVersions = $this->registry->output->formDropdown( "minVersion[{$i}]", $versions );
|
||||||
|
$maxVersions = $this->registry->output->formDropdown( "minVersion[{$i}]", $versions );
|
||||||
|
|
||||||
|
$this->returnHtml( "{$this->lang->words['a_min']}: {$minVersions}<br /><br />{$this->lang->words['a_max']}: {$maxVersions}" );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get data hook locations
|
* Get data hook locations
|
||||||
*
|
*
|
||||||
@@ -189,9 +235,10 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
protected function _getHookIds()
|
protected function _getHookIds()
|
||||||
{
|
{
|
||||||
$i = intval( $this->request['i'] );
|
$i = intval( $this->request['i'] );
|
||||||
|
$group = IPSText::alphanumericalClean( $this->request['group'] );
|
||||||
$template = IPSText::alphanumericalClean( $this->request['template'] );
|
$template = IPSText::alphanumericalClean( $this->request['template'] );
|
||||||
$type = IPSText::alphanumericalClean( $this->request['type'] );
|
$type = IPSText::alphanumericalClean( $this->request['type'] );
|
||||||
$return = $this->hooksFunctions->getHookIds( $template, $type );
|
$return = $this->hooksFunctions->getHookIds( $template, $type, $group );
|
||||||
|
|
||||||
$output = ( count($return) > 1 ) ? $this->registry->output->formDropdown( "id[{$i}]", $return, '', "id[{$i}]", "onchange='getHookEntryPoints({$i});'" ) : $this->lang->words['hook_no_hook_ids_found'];
|
$output = ( count($return) > 1 ) ? $this->registry->output->formDropdown( "id[{$i}]", $return, '', "id[{$i}]", "onchange='getHookEntryPoints({$i});'" ) : $this->lang->words['hook_no_hook_ids_found'];
|
||||||
|
|
||||||
@@ -325,7 +372,7 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
$name = trim( IPSText::alphanumericalClean( $this->request['name'] ) );
|
$name = trim( IPSText::alphanumericalClean( $this->request['name'] ) );
|
||||||
$this->hookId = intval( $this->request['id'] );
|
$this->hookId = intval( $this->request['id'] );
|
||||||
$this->hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $this->hookId ) );
|
$this->hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $this->hookId ) );
|
||||||
$this->data = unserialize($this->hook['hook_extra_data']);
|
$this->data = IPSLib::isSerialized($this->hook['hook_extra_data']) ? unserialize($this->hook['hook_extra_data']) : array( 'display' => array() );
|
||||||
|
|
||||||
$output = '';
|
$output = '';
|
||||||
|
|
||||||
@@ -417,15 +464,13 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
$this->data['display']['settings'] = $output;
|
$this->data['display']['settings'] = $output;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
unset($this->data['display']['settings']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId );
|
|
||||||
|
|
||||||
if( !$output )
|
|
||||||
{
|
{
|
||||||
$output = $this->lang->words['hook_no_settings'];
|
$output = $this->lang->words['hook_no_settings'];
|
||||||
|
|
||||||
|
if ( isset($this->data['display']['settings']) )
|
||||||
|
{
|
||||||
|
unset($this->data['display']['settings']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -456,7 +501,7 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !count($this->data['language']) )
|
if( ! count($this->data['language']) )
|
||||||
{
|
{
|
||||||
unset($this->data['language']);
|
unset($this->data['language']);
|
||||||
}
|
}
|
||||||
@@ -471,15 +516,13 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
$this->data['display']['language'] = $output;
|
$this->data['display']['language'] = $output;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
unset($this->data['display']['language']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId );
|
|
||||||
|
|
||||||
if( !$output )
|
|
||||||
{
|
{
|
||||||
$output = $this->lang->words['hook_no_language'];
|
$output = $this->lang->words['hook_no_language'];
|
||||||
|
|
||||||
|
if ( isset($this->data['display']['language']) )
|
||||||
|
{
|
||||||
|
unset($this->data['display']['language']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -520,15 +563,13 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
$this->data['display']['modules'] = $output;
|
$this->data['display']['modules'] = $output;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
unset($this->data['display']['modules']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId );
|
|
||||||
|
|
||||||
if( !$output )
|
|
||||||
{
|
{
|
||||||
$output = $this->lang->words['hook_no_modules'];
|
$output = $this->lang->words['hook_no_modules'];
|
||||||
|
|
||||||
|
if ( isset($this->data['display']['modules']) )
|
||||||
|
{
|
||||||
|
unset($this->data['display']['modules']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -569,15 +610,13 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
$this->data['display']['help'] = $output;
|
$this->data['display']['help'] = $output;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
unset($this->data['display']['help']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId );
|
|
||||||
|
|
||||||
if( !$output )
|
|
||||||
{
|
{
|
||||||
$output = $this->lang->words['hook_no_help'];
|
$output = $this->lang->words['hook_no_help'];
|
||||||
|
|
||||||
|
if ( isset($this->data['display']['help']) )
|
||||||
|
{
|
||||||
|
unset($this->data['display']['help']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -633,15 +672,13 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
$this->data['display']['templates'] = $output;
|
$this->data['display']['templates'] = $output;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
unset($this->data['display']['templates']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId );
|
|
||||||
|
|
||||||
if( !$output )
|
|
||||||
{
|
{
|
||||||
$output = $this->lang->words['hook_no_skin'];
|
$output = $this->lang->words['hook_no_skin'];
|
||||||
|
|
||||||
|
if ( isset($this->data['display']['templates']) )
|
||||||
|
{
|
||||||
|
unset($this->data['display']['templates']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -687,15 +724,63 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unset($this->data['display']['css']);
|
$output = $this->lang->words['hook_no_css'];
|
||||||
|
|
||||||
|
if ( isset($this->data['display']['css']) )
|
||||||
|
{
|
||||||
|
unset($this->data['display']['css']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'replacements':
|
||||||
|
/* INIT */
|
||||||
|
$_replacements = $this->hooksFunctions->getSkinReplacements();
|
||||||
|
$toSave = array();
|
||||||
|
$toDisplay = array();
|
||||||
|
|
||||||
|
/* Check to see if any were selected */
|
||||||
|
if( is_array( $this->request['replacements'] ) && count( $this->request['replacements'] ) )
|
||||||
|
{
|
||||||
|
$toSave = $this->request['replacements'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize( $this->data ) ), 'hook_id=' . $this->hookId );
|
/* Output */
|
||||||
|
foreach( $_replacements as $data )
|
||||||
/* None found? */
|
|
||||||
if( ! $output )
|
|
||||||
{
|
{
|
||||||
$output = $this->lang->words['hook_no_css'];
|
if( in_array( $data[0], $toSave ) )
|
||||||
|
{
|
||||||
|
$toDisplay[] = $data[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( count( $toDisplay ) )
|
||||||
|
{
|
||||||
|
$output .= "{$this->lang->words['hook_replacements']} " . implode( ', ', $toDisplay );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Save */
|
||||||
|
if( count($toSave) )
|
||||||
|
{
|
||||||
|
$this->data['replacements'] = $toSave;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unset($this->data['replacements']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if( $output )
|
||||||
|
{
|
||||||
|
$this->data['display']['replacements'] = $output;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$output = $this->lang->words['hook_no_replacements'];
|
||||||
|
|
||||||
|
if ( isset($this->data['display']['replacements']) )
|
||||||
|
{
|
||||||
|
unset($this->data['display']['replacements']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -736,15 +821,13 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
$this->data['display']['tasks'] = $output;
|
$this->data['display']['tasks'] = $output;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
unset($this->data['display']['tasks']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId );
|
|
||||||
|
|
||||||
if( !$output )
|
|
||||||
{
|
{
|
||||||
$output = $this->lang->words['hook_no_tasks'];
|
$output = $this->lang->words['hook_no_tasks'];
|
||||||
|
|
||||||
|
if ( isset($this->data['display']['tasks']) )
|
||||||
|
{
|
||||||
|
unset($this->data['display']['tasks']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -937,6 +1020,11 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( ! count($this->data['database']) )
|
||||||
|
{
|
||||||
|
unset($this->data['database']);
|
||||||
|
}
|
||||||
|
|
||||||
if( count($toDisplay) )
|
if( count($toDisplay) )
|
||||||
{
|
{
|
||||||
$output .= implode( '<br />', $toDisplay );
|
$output .= implode( '<br />', $toDisplay );
|
||||||
@@ -947,22 +1035,14 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
$this->data['display']['database'] = $output;
|
$this->data['display']['database'] = $output;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
unset($this->data['display']['database']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if( !count($this->data['database']) )
|
|
||||||
{
|
|
||||||
unset($this->data['database']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId );
|
|
||||||
|
|
||||||
if( !$output )
|
|
||||||
{
|
{
|
||||||
$output = $this->lang->words['hook_no_db'];
|
$output = $this->lang->words['hook_no_db'];
|
||||||
}
|
|
||||||
|
|
||||||
|
if ( isset($this->data['display']['database']) )
|
||||||
|
{
|
||||||
|
unset($this->data['display']['database']);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'custom':
|
case 'custom':
|
||||||
@@ -994,19 +1074,25 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
$this->data['display']['custom'] = $output;
|
$this->data['display']['custom'] = $output;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
unset($this->data['display']['custom']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->DB->update( 'core_hooks', array( 'hook_extra_data' => serialize($this->data) ), 'hook_id=' . $this->hookId );
|
|
||||||
|
|
||||||
if( !$output )
|
|
||||||
{
|
{
|
||||||
$output = $this->lang->words['hook_no_custom'];
|
$output = $this->lang->words['hook_no_custom'];
|
||||||
|
|
||||||
|
if ( isset($this->data['display']['custom']) )
|
||||||
|
{
|
||||||
|
unset($this->data['display']['custom']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Handle array data and save to DB */
|
||||||
|
if ( empty($this->data['display']) )
|
||||||
|
{
|
||||||
|
unset($this->data['display']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->DB->update( 'core_hooks', array( 'hook_extra_data' => count($this->data) ? serialize($this->data) : '' ), 'hook_id=' . $this->hookId );
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Print...
|
// Print...
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -1135,6 +1221,15 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
$output = $this->html->inline_css( $this->hook, $form );
|
$output = $this->html->inline_css( $this->hook, $form );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'replacements':
|
||||||
|
$_replacements = $this->hooksFunctions->getSkinReplacements();
|
||||||
|
|
||||||
|
$form = array();
|
||||||
|
$form['replacements'] = $this->registry->output->formMultiDropdown( "replacements[]", $_replacements, $this->data['replacements'], 5, "replacements" );
|
||||||
|
|
||||||
|
$output = $this->html->inline_replacements( $this->hook, $form );
|
||||||
|
break;
|
||||||
|
|
||||||
case 'tasks':
|
case 'tasks':
|
||||||
$_tasks = $this->hooksFunctions->getTasks();
|
$_tasks = $this->hooksFunctions->getTasks();
|
||||||
|
|
||||||
@@ -1174,7 +1269,7 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
case 'create':
|
case 'create':
|
||||||
$form['field_1_' . $i ] = $this->registry->output->formInput( "name_{$i}", $change['name'] );
|
$form['field_1_' . $i ] = $this->registry->output->formInput( "name_{$i}", $change['name'] );
|
||||||
$form['description_1_' . $i ] = $this->lang->words['desc_newtable'];
|
$form['description_1_' . $i ] = $this->lang->words['desc_newtable'];
|
||||||
$form['field_2_' . $i ] = $this->registry->output->formTextarea( "fields_{$i}", htmlspecialchars($change['fields']) );
|
$form['field_2_' . $i ] = $this->registry->output->formTextarea( "fields_{$i}", htmlspecialchars( $change['fields'], ENT_QUOTES ) );
|
||||||
$form['description_2_' . $i ] = $this->lang->words['desc_fieldnames'];
|
$form['description_2_' . $i ] = $this->lang->words['desc_fieldnames'];
|
||||||
$form['field_3_' . $i ] = $this->registry->output->formInput( "tabletype_{$i}", $change['tabletype'] );
|
$form['field_3_' . $i ] = $this->registry->output->formInput( "tabletype_{$i}", $change['tabletype'] );
|
||||||
$form['description_4_' . $i ] = $this->lang->words['desc_tabletype'];
|
$form['description_4_' . $i ] = $this->lang->words['desc_tabletype'];
|
||||||
@@ -1191,7 +1286,7 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
$form['description_4_' . $i ] = $this->lang->words['desc_changefield'];
|
$form['description_4_' . $i ] = $this->lang->words['desc_changefield'];
|
||||||
$form['field_5_' . $i ] = $this->registry->output->formInput( "fieldtype_{$i}", $change['fieldtype'] );
|
$form['field_5_' . $i ] = $this->registry->output->formInput( "fieldtype_{$i}", $change['fieldtype'] );
|
||||||
$form['description_5_' . $i ] = $this->lang->words['desc_definition'];
|
$form['description_5_' . $i ] = $this->lang->words['desc_definition'];
|
||||||
$form['field_6_' . $i ] = $this->registry->output->formInput( "default_{$i}", htmlspecialchars($change['default']) );
|
$form['field_6_' . $i ] = $this->registry->output->formInput( "default_{$i}", htmlspecialchars( $change['default'], ENT_QUOTES ) );
|
||||||
$form['description_6_' . $i ] = $this->lang->words['desc_defaultvalue'];
|
$form['description_6_' . $i ] = $this->lang->words['desc_defaultvalue'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1200,20 +1295,20 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
|
|||||||
$form['description_1_' . $i ] = $this->lang->words['desc_newtable'];
|
$form['description_1_' . $i ] = $this->lang->words['desc_newtable'];
|
||||||
$form['field_2_' . $i ] = $this->registry->output->formInput( "field_{$i}", $change['field'] );
|
$form['field_2_' . $i ] = $this->registry->output->formInput( "field_{$i}", $change['field'] );
|
||||||
$form['description_2_' . $i ] = $this->lang->words['desc_field'];
|
$form['description_2_' . $i ] = $this->lang->words['desc_field'];
|
||||||
$form['field_3_' . $i ] = $this->registry->output->formInput( "newvalue_{$i}", htmlspecialchars($change['newvalue']) );
|
$form['field_3_' . $i ] = $this->registry->output->formInput( "newvalue_{$i}", htmlspecialchars( $change['newvalue'], ENT_QUOTES ) );
|
||||||
$form['description_3_' . $i ] = $this->lang->words['desc_newvalue'];
|
$form['description_3_' . $i ] = $this->lang->words['desc_newvalue'];
|
||||||
$form['field_4_' . $i ] = $this->registry->output->formInput( "oldvalue_{$i}", htmlspecialchars($change['oldvalue']) );
|
$form['field_4_' . $i ] = $this->registry->output->formInput( "oldvalue_{$i}", htmlspecialchars( $change['oldvalue'], ENT_QUOTES ) );
|
||||||
$form['description_4_' . $i ] = $this->lang->words['desc_oldvalue'];
|
$form['description_4_' . $i ] = $this->lang->words['desc_oldvalue'];
|
||||||
$form['field_5_' . $i ] = $this->registry->output->formInput( "where_{$i}", htmlspecialchars($change['where']) );
|
$form['field_5_' . $i ] = $this->registry->output->formInput( "where_{$i}", htmlspecialchars( $change['where'], ENT_QUOTES ) );
|
||||||
$form['description_5_' . $i ] = $this->lang->words['desc_where'];
|
$form['description_5_' . $i ] = $this->lang->words['desc_where'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'insert':
|
case 'insert':
|
||||||
$form['field_1_' . $i ] = $this->registry->output->formInput( "table_{$i}", $change['table'] );
|
$form['field_1_' . $i ] = $this->registry->output->formInput( "table_{$i}", $change['table'] );
|
||||||
$form['description_1_' . $i ] = $this->lang->words['desc_newtable'];
|
$form['description_1_' . $i ] = $this->lang->words['desc_newtable'];
|
||||||
$form['field_2_' . $i ] = $this->registry->output->formTextarea( "updates_{$i}", htmlspecialchars($change['updates']) );
|
$form['field_2_' . $i ] = $this->registry->output->formTextarea( "updates_{$i}", htmlspecialchars( $change['updates'], ENT_QUOTES ) );
|
||||||
$form['description_2_' . $i ] = $this->lang->words['desc_data'];
|
$form['description_2_' . $i ] = $this->lang->words['desc_data'];
|
||||||
$form['field_3_' . $i ] = $this->registry->output->formInput( "fordelete_{$i}", htmlspecialchars($change['fordelete']) );
|
$form['field_3_' . $i ] = $this->registry->output->formInput( "fordelete_{$i}", htmlspecialchars( $change['fordelete'], ENT_QUOTES ) );
|
||||||
$form['description_3_' . $i ] = $this->lang->words['desc_revert'];
|
$form['description_3_' . $i ] = $this->lang->words['desc_revert'];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,18 +3,18 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Live Search
|
* Live Search
|
||||||
* Last Updated: $Date: 2011-08-23 10:24:47 -0400 (Tue, 23 Aug 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: mark $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 9404 $
|
* @version $Rev: 10914 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
// Init
|
// Init
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$search_term = $this->request['search_term'];
|
$search_term = IPSText::convertCharsets( $this->request['search_term'], 'utf-8', IPS_DOC_CHAR_SET );
|
||||||
$results = array();
|
$results = array();
|
||||||
$results = array( 'members' => array(), 'groups' => array(), 'groupLangs' => false, 'settings' => array(), 'forums' => array(), 'location' => array() );
|
$results = array( 'members' => array(), 'groups' => array(), 'groupLangs' => false, 'settings' => array(), 'forums' => array(), 'location' => array() );
|
||||||
|
|
||||||
@@ -100,7 +100,13 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
*/
|
*/
|
||||||
protected function _getMembers( $term, $results )
|
protected function _getMembers( $term, $results )
|
||||||
{
|
{
|
||||||
$term = mb_strtolower($term);
|
if ( !$this->registry->getClass('class_permissions')->checkPermission( 'member_edit', 'members', 'members' ) )
|
||||||
|
{
|
||||||
|
$results['members'] = array();
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
|
||||||
|
$term = strtolower($term);
|
||||||
|
|
||||||
$this->DB->build( array('select' => 'm.*, pp.*, g.g_title',
|
$this->DB->build( array('select' => 'm.*, pp.*, g.g_title',
|
||||||
'from' => array('members' => 'm'),
|
'from' => array('members' => 'm'),
|
||||||
@@ -122,11 +128,11 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
$member = $r = IPSMember::buildProfilePhoto( $member );
|
$member = $r = IPSMember::buildProfilePhoto( $member );
|
||||||
$r = array();
|
$r = array();
|
||||||
|
|
||||||
if( $member['members_l_display_name'] AND mb_strpos( $term, $member['members_l_display_name'] ) !== false )
|
if( $member['members_l_display_name'] AND strpos( $term, $member['members_l_display_name'] ) !== false )
|
||||||
{
|
{
|
||||||
$r['_matched'] = 'members_display_name';
|
$r['_matched'] = 'members_display_name';
|
||||||
}
|
}
|
||||||
else if( $member['members_l_username'] AND mb_strpos( $term, $member['members_l_username'] ) !== false )
|
else if( $member['members_l_username'] AND strpos( $term, $member['members_l_username'] ) !== false )
|
||||||
{
|
{
|
||||||
$r['_matched'] = 'name';
|
$r['_matched'] = 'name';
|
||||||
}
|
}
|
||||||
@@ -157,7 +163,13 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
*/
|
*/
|
||||||
protected function _checkGroups( $term, $results )
|
protected function _checkGroups( $term, $results )
|
||||||
{
|
{
|
||||||
$term = mb_strtolower($term);
|
if ( !$this->registry->getClass('class_permissions')->checkPermission( 'groups_edit', 'members', 'groups' ) )
|
||||||
|
{
|
||||||
|
$results['groups'] = array();
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
|
||||||
|
$term = strtolower($term);
|
||||||
|
|
||||||
$this->registry->class_localization->loadLanguageFile( array( 'admin_groups' ), 'members' );
|
$this->registry->class_localization->loadLanguageFile( array( 'admin_groups' ), 'members' );
|
||||||
$this->registry->class_localization->loadLanguageFile( array( 'admin_forums' ), 'forums' );
|
$this->registry->class_localization->loadLanguageFile( array( 'admin_forums' ), 'forums' );
|
||||||
@@ -167,7 +179,7 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
|
|
||||||
foreach( $this->lang->words as $k => $v )
|
foreach( $this->lang->words as $k => $v )
|
||||||
{
|
{
|
||||||
if( strpos( $k, 'gf_' ) !== false AND mb_strpos( $v, $term ) !== false )
|
if( strpos( $k, 'gf_' ) !== false AND strpos( $v, $term ) !== false )
|
||||||
{
|
{
|
||||||
IPSDebug::fireBug( 'info', array( 'Group key found: ' . $k . ': ' . $v ) );
|
IPSDebug::fireBug( 'info', array( 'Group key found: ' . $k . ': ' . $v ) );
|
||||||
|
|
||||||
@@ -185,7 +197,7 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
{
|
{
|
||||||
$_term = preg_quote( $term, '#' );
|
$_term = preg_quote( $term, '#' );
|
||||||
|
|
||||||
if ( preg_match( "#" . $_term . "#iu", $data['g_title'] ) )
|
if ( preg_match( "#" . $_term . "#i", $data['g_title'] ) )
|
||||||
{
|
{
|
||||||
$results['groups'][] = array(
|
$results['groups'][] = array(
|
||||||
'name' => IPSMember::makeNameFormatted( $data['g_title'], $data['g_id'] ),
|
'name' => IPSMember::makeNameFormatted( $data['g_title'], $data['g_id'] ),
|
||||||
@@ -207,7 +219,13 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
*/
|
*/
|
||||||
protected function _checkForums( $term, $results )
|
protected function _checkForums( $term, $results )
|
||||||
{
|
{
|
||||||
$term = mb_strtolower($term);
|
if ( !$this->registry->getClass('class_permissions')->checkPermission( 'forums_edit', 'forums', 'forums' ) )
|
||||||
|
{
|
||||||
|
$results['forums'] = array();
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
|
||||||
|
$term = strtolower($term);
|
||||||
$results['forums'] = false;
|
$results['forums'] = false;
|
||||||
|
|
||||||
/* Fetch forums lib */
|
/* Fetch forums lib */
|
||||||
@@ -221,9 +239,9 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
{
|
{
|
||||||
$_term = preg_quote( $term, '#' );
|
$_term = preg_quote( $term, '#' );
|
||||||
|
|
||||||
if ( preg_match( "#" . $_term . "#iu", $data['name'] ) )
|
if ( preg_match( "#" . $_term . "#i", $data['name'] ) )
|
||||||
{
|
{
|
||||||
$data['extra'] = ( ( $data['posts'] == null ) ? 0 : $data['posts'] ) . " сообщений";
|
$data['extra'] = ( ( $data['posts'] == null ) ? 0 : $data['posts'] ) . " posts";
|
||||||
$data['url'] = $this->settings['_base_url']."&app=forums&module=forums&section=forums&do=edit&f=".$data['id'];
|
$data['url'] = $this->settings['_base_url']."&app=forums&module=forums&section=forums&do=edit&f=".$data['id'];
|
||||||
$results['forums'][] = $data;
|
$results['forums'][] = $data;
|
||||||
}
|
}
|
||||||
@@ -241,7 +259,13 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
*/
|
*/
|
||||||
protected function _getSettings( $term, $results )
|
protected function _getSettings( $term, $results )
|
||||||
{
|
{
|
||||||
$term = mb_strtolower($term);
|
if ( !$this->registry->getClass('class_permissions')->checkPermission( 'settings_manage', 'core', 'settings' ) )
|
||||||
|
{
|
||||||
|
$results['settings'] = array();
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
|
||||||
|
$term = strtolower($term);
|
||||||
|
|
||||||
if( !IN_DEV )
|
if( !IN_DEV )
|
||||||
{
|
{
|
||||||
@@ -283,7 +307,13 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
*/
|
*/
|
||||||
protected function _checkNexus( $term, $results )
|
protected function _checkNexus( $term, $results )
|
||||||
{
|
{
|
||||||
$textTerm = $this->DB->addSlashes( mb_strtolower( $term ) );
|
if ( !$this->registry->getClass('class_permissions')->checkForAppAccess('nexus') )
|
||||||
|
{
|
||||||
|
$results['nexus'] = array();
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
|
||||||
|
$textTerm = $this->DB->addSlashes( strtolower( $term ) );
|
||||||
$intTerm = intval( $term );
|
$intTerm = intval( $term );
|
||||||
$encodedTerm = urlencode( $encodedTerm );
|
$encodedTerm = urlencode( $encodedTerm );
|
||||||
|
|
||||||
@@ -298,36 +328,58 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
if ( (string) $term == (string) $intTerm )
|
if ( (string) $term == (string) $intTerm )
|
||||||
{
|
{
|
||||||
/* Invoice? */
|
/* Invoice? */
|
||||||
$invoice = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'nexus_invoices', 'where' => "i_id={$intTerm}" ) );
|
if ( $this->registry->getClass('class_permissions')->checkPermission( 'invoices_manage', 'nexus', 'payments' ) )
|
||||||
if ( $invoice['i_id'] )
|
|
||||||
{
|
{
|
||||||
$tempResults['invoice'] = array( 'name' => $invoice['i_title'], 'url' => $this->settings['_base_url']."&app=nexus&module=payments&section=invoices&do=view_invoice&id={$invoice['i_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/invoice.png' );
|
$invoice = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'nexus_invoices', 'where' => "i_id={$intTerm}" ) );
|
||||||
|
if ( $invoice['i_id'] )
|
||||||
|
{
|
||||||
|
$tempResults['invoice'] = array( 'name' => $invoice['i_title'], 'url' => $this->settings['_base_url']."&app=nexus&module=payments&section=invoices&do=view_invoice&id={$invoice['i_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/invoice.png' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Purchase? */
|
/* Purchase? */
|
||||||
$purchase = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'nexus_purchases', 'where' => "ps_id={$intTerm}" ) );
|
if ( $this->registry->getClass('class_permissions')->checkPermission( 'purchases_view', 'nexus', 'payments' ) )
|
||||||
if ( $purchase['ps_id'] )
|
|
||||||
{
|
{
|
||||||
$tempResults['purchase'] = array( 'name' => $purchase['ps_name'], 'url' => $this->settings['_base_url']."&app=nexus&module=payments&section=purchases&id={$purchase['ps_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/purchase.png' );
|
$purchase = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'nexus_purchases', 'where' => "ps_id={$intTerm}" ) );
|
||||||
|
if ( $purchase['ps_id'] )
|
||||||
|
{
|
||||||
|
$tempResults['purchase'] = array( 'name' => $purchase['ps_name'], 'url' => $this->settings['_base_url']."&app=nexus&module=payments&section=purchases&id={$purchase['ps_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/purchase.png' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Support */
|
/* Support */
|
||||||
$support = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'nexus_support_requests', 'where' => "r_id={$intTerm}" ) );
|
if ( $this->registry->getClass('class_permissions')->checkPermission( 'sr_view', 'nexus', 'tickets' ) )
|
||||||
if ( $support['r_id'] )
|
|
||||||
{
|
{
|
||||||
$tempResults['support'] = array( 'name' => $support['r_title'], 'url' => $this->settings['_base_url']."&app=nexus&module=tickets&section=view&id={$support['r_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/support.png' );
|
$support = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'nexus_support_requests', 'where' => "r_id={$intTerm}" ) );
|
||||||
|
if ( $support['r_id'] )
|
||||||
|
{
|
||||||
|
$tempResults['support'] = array( 'name' => $support['r_title'], 'url' => $this->settings['_base_url']."&app=nexus&module=tickets&section=view&id={$support['r_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/support.png' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Customer */
|
/* Customer */
|
||||||
$customer = $this->DB->buildAndFetch( array( 'select' => 'member_id, members_display_name', 'from' => 'members', 'where' => "member_id={$intTerm}" ) );
|
if ( $this->registry->getClass('class_permissions')->checkForModuleAccess( 'nexus', 'customers' ) )
|
||||||
if ( $customer['member_id'] )
|
|
||||||
{
|
{
|
||||||
if ( !preg_replace( '/\s/', '', $customer['members_display_name'] ) )
|
$customer = $this->DB->buildAndFetch( array( 'select' => 'member_id, members_display_name', 'from' => 'members', 'where' => "member_id={$intTerm}" ) );
|
||||||
|
if ( $customer['member_id'] )
|
||||||
{
|
{
|
||||||
$customer['members_display_name'] = '?????';
|
if ( !preg_replace( '/\s/', '', $customer['members_display_name'] ) )
|
||||||
}
|
{
|
||||||
|
$customer['members_display_name'] = '?????';
|
||||||
|
}
|
||||||
|
|
||||||
$tempResults['member'] = array( 'name' => $customer['members_display_name'], 'url' => $this->settings['_base_url']."&app=nexus&module=customers&section=view&id={$customer['member_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/info.png' );
|
$tempResults['member'] = array( 'name' => $customer['members_display_name'], 'url' => $this->settings['_base_url']."&app=nexus&module=customers&section=view&id={$customer['member_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/info.png' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Transaction? */
|
||||||
|
if ( $this->registry->getClass('class_permissions')->checkPermission( 'transactions_manage', 'nexus', 'payments' ) )
|
||||||
|
{
|
||||||
|
$transaction = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'nexus_transactions', 'where' => "t_id={$intTerm}" ) );
|
||||||
|
if ( $transaction['t_id'] )
|
||||||
|
{
|
||||||
|
$tempResults['transactions'] = array( 'name' => $transaction['t_id'], 'url' => $this->settings['_base_url']."&app=nexus&module=payments&section=transactions&do=view&id={$transaction['i_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/transaction.png' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -339,90 +391,99 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* License Key */
|
/* License Key */
|
||||||
$lkey = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'nexus_licensekeys', 'where' => $this->DB->buildLower('lkey_key') ."='{$textTerm}'" ) );
|
if ( $this->registry->getClass('class_permissions')->checkPermission( 'purchases_view', 'nexus', 'payments' ) )
|
||||||
if ( $lkey['lkey_key'] )
|
|
||||||
{
|
{
|
||||||
$tempResults['lkey'] = array( 'name' => $lkey['lkey_key'], 'url' => $this->settings['_base_url']."&app=nexus&module=payments&section=purchases&id={$lkey['lkey_purchase']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/lkey.png' );
|
$lkey = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'nexus_licensekeys', 'where' => $this->DB->buildLower('lkey_key') ."='{$textTerm}'" ) );
|
||||||
|
if ( $lkey['lkey_key'] )
|
||||||
|
{
|
||||||
|
$tempResults['lkey'] = array( 'name' => $lkey['lkey_key'], 'url' => $this->settings['_base_url']."&app=nexus&module=payments&section=purchases&id={$lkey['lkey_purchase']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/lkey.png' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Customers */
|
/* Customers */
|
||||||
$customer = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'members', 'where' => $this->DB->buildLower('email') ." LIKE '%{$textTerm}%'" ) );
|
if ( $this->registry->getClass('class_permissions')->checkForModuleAccess( 'nexus', 'customers' ) )
|
||||||
if ( $customer['count'] )
|
|
||||||
{
|
{
|
||||||
if ( $customer['count'] > 50 )
|
$customer = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'members', 'where' => $this->DB->buildLower('email') ." LIKE '%{$textTerm}%'" ) );
|
||||||
|
if ( $customer['count'] )
|
||||||
{
|
{
|
||||||
$tempResults['member'] = array( 'name' => sprintf( $this->lang->words['livesearch_more'], $customer['count'] ), 'url' => "{$this->settings['base_url']}app=nexus&module=customers&section=search&searchpag=1&option=email&criteria=contains&value={$encodedTerm}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/info.png' );
|
if ( $customer['count'] > 50 )
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->DB->build( array( 'select' => 'member_id, email', 'from' => 'members', 'where' => $this->DB->buildLower('email') ." LIKE '%{$textTerm}%'" ) );
|
|
||||||
$this->DB->execute();
|
|
||||||
while ( $row = $this->DB->fetch() )
|
|
||||||
{
|
{
|
||||||
$tempResults['member'][] = array( 'name' => $row['email'], 'url' => $this->settings['_base_url']."&app=nexus&module=customers&section=view&id={$row['member_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/info.png' );
|
$tempResults['member'] = array( 'name' => sprintf( $this->lang->words['livesearch_more'], $customer['count'] ), 'url' => "{$this->settings['base_url']}app=nexus&module=customers&section=search&searchpag=1&option=email&criteria=contains&value={$encodedTerm}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/info.png' );
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->DB->build( array( 'select' => 'member_id, email', 'from' => 'members', 'where' => $this->DB->buildLower('email') ." LIKE '%{$textTerm}%'" ) );
|
||||||
|
$this->DB->execute();
|
||||||
|
while ( $row = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
$tempResults['member'][] = array( 'name' => $row['email'], 'url' => $this->settings['_base_url']."&app=nexus&module=customers&section=view&id={$row['member_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/info.png' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$customer = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'members', 'where' => "members_l_display_name LIKE '%{$textTerm}%'" ) );
|
$customer = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'members', 'where' => "members_l_display_name LIKE '%{$textTerm}%'" ) );
|
||||||
if ( $customer['count'] )
|
if ( $customer['count'] )
|
||||||
{
|
|
||||||
if ( $customer['count'] > 50 )
|
|
||||||
{
|
{
|
||||||
$tempResults['member'] = array( 'name' => sprintf( $this->lang->words['livesearch_more'], $customer['count'] ), 'url' => "{$this->settings['base_url']}app=nexus&module=customers&section=search&searchpag=1&option=email&criteria=contains&value={$encodedTerm}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/info.png' );
|
if ( $customer['count'] > 50 )
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->DB->build( array( 'select' => 'member_id, members_display_name', 'from' => 'members', 'where' => "members_l_display_name LIKE '%{$textTerm}%'" ) );
|
|
||||||
$this->DB->execute();
|
|
||||||
while ( $row = $this->DB->fetch() )
|
|
||||||
{
|
{
|
||||||
$tempResults['member'][] = array( 'name' => $row['members_display_name'], 'url' => $this->settings['_base_url']."&app=nexus&module=customers&section=view&id={$row['member_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/info.png' );
|
$tempResults['member'] = array( 'name' => sprintf( $this->lang->words['livesearch_more'], $customer['count'] ), 'url' => "{$this->settings['base_url']}app=nexus&module=customers&section=search&searchpag=1&option=email&criteria=contains&value={$encodedTerm}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/info.png' );
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->DB->build( array( 'select' => 'member_id, members_display_name', 'from' => 'members', 'where' => "members_l_display_name LIKE '%{$textTerm}%'" ) );
|
||||||
|
$this->DB->execute();
|
||||||
|
while ( $row = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
$tempResults['member'][] = array( 'name' => $row['members_display_name'], 'url' => $this->settings['_base_url']."&app=nexus&module=customers&section=view&id={$row['member_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/info.png' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hosting Accounts */
|
/* Hosting Accounts */
|
||||||
if ( strpos( $textTerm, '.' ) === FALSE )
|
if ( $this->registry->getClass('class_permissions')->checkPermission( 'purchases_view', 'nexus', 'payments' ) )
|
||||||
{
|
{
|
||||||
$hosting = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'nexus_hosting_accounts', 'where' => $this->DB->buildLower('account_username') . " LIKE '%{$textTerm}%'" ) );
|
if ( strpos( $textTerm, '.' ) === FALSE )
|
||||||
if ( $hosting['count'] )
|
|
||||||
{
|
{
|
||||||
if ( $hosting['count'] > 50 )
|
$hosting = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'nexus_hosting_accounts', 'where' => $this->DB->buildLower('account_username') . " LIKE '%{$textTerm}%'" ) );
|
||||||
|
if ( $hosting['count'] )
|
||||||
{
|
{
|
||||||
$tempResults['hosting'] = array( 'name' => sprintf( $this->lang->words['livesearch_more'], $customer['count'] ), 'url' => "&app=nexus&module=search&section=search&nexus_search={$encodedTerm}&nexus_searchby=username", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/nexus_icons/hosting.png' );
|
if ( $hosting['count'] > 50 )
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->DB->build( array( 'select' => 'ps_id, account_username', 'from' => 'nexus_hosting_accounts', 'where' => $this->DB->buildLower('account_username') . " LIKE '%{$textTerm}%'" ) );
|
|
||||||
$this->DB->execute();
|
|
||||||
while ( $row = $this->DB->fetch() )
|
|
||||||
{
|
{
|
||||||
$tempResults['hosting'][] = array( 'name' => $row['account_username'], 'url' => $this->settings['_base_url']."&app=nexus&module=payments&section=purchases&id={$row['ps_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/nexus_icons/hosting.png' );
|
$tempResults['hosting'] = array( 'name' => sprintf( $this->lang->words['livesearch_more'], $customer['count'] ), 'url' => "&app=nexus&module=search&section=search&nexus_search={$encodedTerm}&nexus_searchby=username", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/nexus_icons/hosting.png' );
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->DB->build( array( 'select' => 'ps_id, account_username', 'from' => 'nexus_hosting_accounts', 'where' => $this->DB->buildLower('account_username') . " LIKE '%{$textTerm}%'" ) );
|
||||||
|
$this->DB->execute();
|
||||||
|
while ( $row = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
$tempResults['hosting'][] = array( 'name' => $row['account_username'], 'url' => $this->settings['_base_url']."&app=nexus&module=payments&section=purchases&id={$row['ps_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/nexus_icons/hosting.png' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if ( empty( $tempResults['hosting'] ) )
|
||||||
if ( empty( $tempResults['hosting'] ) )
|
|
||||||
{
|
|
||||||
$hosting = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'nexus_hosting_accounts', 'where' => $this->DB->buildLower('account_domain') . " LIKE '%{$textTerm}%'" ) );
|
|
||||||
if ( $hosting['count'] )
|
|
||||||
{
|
{
|
||||||
if ( $hosting['count'] > 50 )
|
$hosting = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'nexus_hosting_accounts', 'where' => $this->DB->buildLower('account_domain') . " LIKE '%{$textTerm}%'" ) );
|
||||||
|
if ( $hosting['count'] )
|
||||||
{
|
{
|
||||||
$tempResults['hosting'] = array( 'name' => sprintf( $this->lang->words['livesearch_more'], $customer['count'] ), 'url' => "&app=nexus&module=search&section=search&nexus_search={$encodedTerm}&nexus_searchby=domain", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/info.png' );
|
if ( $hosting['count'] > 50 )
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->DB->build( array( 'select' => 'ps_id, account_domain', 'from' => 'nexus_hosting_accounts', 'where' => $this->DB->buildLower('account_domain') . " LIKE '%{$textTerm}%'" ) );
|
|
||||||
$this->DB->execute();
|
|
||||||
while ( $row = $this->DB->fetch() )
|
|
||||||
{
|
{
|
||||||
$tempResults['hosting'][] = array( 'name' => $row['account_domain'], 'url' => $this->settings['_base_url']."&app=nexus&module=payments&section=purchases&id={$row['ps_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/nexus_icons/hosting.png' );
|
$tempResults['hosting'] = array( 'name' => sprintf( $this->lang->words['livesearch_more'], $customer['count'] ), 'url' => "&app=nexus&module=search&section=search&nexus_search={$encodedTerm}&nexus_searchby=domain", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/customers/info.png' );
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->DB->build( array( 'select' => 'ps_id, account_domain', 'from' => 'nexus_hosting_accounts', 'where' => $this->DB->buildLower('account_domain') . " LIKE '%{$textTerm}%'" ) );
|
||||||
|
$this->DB->execute();
|
||||||
|
while ( $row = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
$tempResults['hosting'][] = array( 'name' => $row['account_domain'], 'url' => $this->settings['_base_url']."&app=nexus&module=payments&section=purchases&id={$row['ps_id']}", 'img' => $this->settings['base_acp_url'] . '/applications_addon/ips/nexus/skin_cp/images/nexus_icons/hosting.png' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -434,7 +495,7 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
|
|
||||||
foreach ( array( 'invoice', 'purchase', 'lkey', 'support', 'member', 'hosting' ) as $k )
|
foreach ( array( 'invoice', 'purchase', 'transactions', 'lkey', 'support', 'member', 'hosting' ) as $k )
|
||||||
{
|
{
|
||||||
if ( isset( $tempResults[ $k ] ) )
|
if ( isset( $tempResults[ $k ] ) )
|
||||||
{
|
{
|
||||||
@@ -466,7 +527,7 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
{
|
{
|
||||||
foreach( $this->cache->getCache('app_menu_cache') as $app => $cache )
|
foreach( $this->cache->getCache('app_menu_cache') as $app => $cache )
|
||||||
{
|
{
|
||||||
if( IPSLib::appIsInstalled( $app ) )
|
if( IPSLib::appIsInstalled( $app ) and $this->registry->getClass('class_permissions')->checkForAppAccess( $app ) )
|
||||||
{
|
{
|
||||||
foreach( $cache as $entry )
|
foreach( $cache as $entry )
|
||||||
{
|
{
|
||||||
@@ -474,22 +535,25 @@ class admin_core_ajax_livesearch extends ipsAjaxCommand
|
|||||||
{
|
{
|
||||||
foreach( $entry['items'] as $item )
|
foreach( $entry['items'] as $item )
|
||||||
{
|
{
|
||||||
if( $item['section'] )
|
if ( $this->registry->getClass('class_permissions')->checkForModuleAccess( $app, $item['module'] ) and ( !$item['rolekey'] or $this->registry->getClass('class_permissions')->checkPermission( $item['rolekey'], $app, $item['module'] ) ) )
|
||||||
{
|
{
|
||||||
$item['url'] = "section={$item['section']}&" . $item['url'];
|
if( $item['section'] )
|
||||||
}
|
{
|
||||||
|
$item['url'] = "section={$item['section']}&" . $item['url'];
|
||||||
|
}
|
||||||
|
|
||||||
if( isset($item['keywords']) AND mb_stripos( $item['keywords'], $term ) !== false )
|
if( isset($item['keywords']) AND stripos( $item['keywords'], $term ) !== false )
|
||||||
{
|
{
|
||||||
$item['name'] = $item['title'];
|
$item['name'] = $item['title'];
|
||||||
$item['url'] = $this->settings['_base_url']."&app={$app}&module={$item['module']}&{$item['url']}";
|
$item['url'] = $this->settings['_base_url']."&app={$app}&module={$item['module']}&{$item['url']}";
|
||||||
$results['location'][] = $item;
|
$results['location'][] = $item;
|
||||||
}
|
}
|
||||||
else if( mb_stripos( $item['title'], $term ) !== false )
|
else if( stripos( $item['title'], $term ) !== false )
|
||||||
{
|
{
|
||||||
$item['name'] = $item['title'];
|
$item['name'] = $item['title'];
|
||||||
$item['url'] = $this->settings['_base_url']."&app={$app}&module={$item['module']}&{$item['url']}";
|
$item['url'] = $this->settings['_base_url']."&app={$app}&module={$item['module']}&{$item['url']}";
|
||||||
$results['location'][] = $item;
|
$results['location'][] = $item;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,21 +3,21 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* AJAX Functions For applications/core/js/ipb3CSS.js file
|
* AJAX Functions For applications/core/js/ipb3CSS.js file
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* Author: Matt Mecham
|
* Author: Matt Mecham
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since Friday 19th May 2006 17:33
|
* @since Friday 19th May 2006 17:33
|
||||||
* @version $Revision: 8644 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,17 +3,17 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* AJAX Functions For applications/core/js/ipb3CSS.js file
|
* AJAX Functions For applications/core/js/ipb3CSS.js file
|
||||||
* Last Updated: $Date: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: ips_terabyte $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since Friday 19th May 2006 17:33
|
* @since Friday 19th May 2006 17:33
|
||||||
* @version $Revision: 8644 $
|
* @version $Revision: 8644 $
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
* @file tabs.php AJAX storage of tab order preference
|
* @file tabs.php AJAX storage of tab order preference
|
||||||
*~TERABYTE_DOC_READY~
|
*~TERABYTE_DOC_READY~
|
||||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* $License: This is NULLED!
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* $Author: bfarber $
|
* $Author: bfarber $
|
||||||
* @since 8th Feb 2011
|
* @since 8th Feb 2011
|
||||||
* $LastChangedDate: 2011-03-10 16:00:38 -0500 (Thu, 10 Mar 2011) $
|
* $LastChangedDate: 2011-03-10 16:00:38 -0500 (Thu, 10 Mar 2011) $
|
||||||
* @version v3.2.3
|
* @version v3.3.4
|
||||||
* $Revision: 8021 $
|
* $Revision: 8021 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,21 +3,21 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* AJAX Functions For applications/core/js/ipb3Templates.js file
|
* AJAX Functions For applications/core/js/ipb3Templates.js file
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* Author: Matt Mecham
|
* Author: Matt Mecham
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since Friday 19th May 2006 17:33
|
* @since Friday 19th May 2006 17:33
|
||||||
* @version $Revision: 8644 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -251,16 +251,16 @@ class admin_core_ajax_templatediff extends ipsAjaxCommand
|
|||||||
{
|
{
|
||||||
if ( $item['change_final_content'] )
|
if ( $item['change_final_content'] )
|
||||||
{
|
{
|
||||||
$_desc .= ', <strong>' . $item['_conflicts'] . '</strong>' . $this->lang->words['ajax_resolvedconflicts'];
|
$_desc .= ', <strong>' . $item['_conflicts'] . '</strong>' . ' ' . $this->lang->words['ajax_resolvedconflicts'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$_desc .= ', <strong>' . $item['_conflicts'] . '</strong>' . $this->lang->words['ajax_mergeconflicts'];
|
$_desc .= ', <strong>' . $item['_conflicts'] . '</strong>' . ' ' . $this->lang->words['ajax_mergeconflicts'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$_desc .= ',' . $this->lang->words['ajax_noconflicts'];
|
$_desc .= ',' . ' ' . $this->lang->words['ajax_noconflicts'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $item['change_changes_applied'] )
|
if ( $item['change_changes_applied'] )
|
||||||
|
|||||||
@@ -3,21 +3,21 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* AJAX Functions For applications/core/js/ipb3Templates.js file
|
* AJAX Functions For applications/core/js/ipb3Templates.js file
|
||||||
* Last Updated: $Date: 2011-07-12 17:54:40 -0400 (Tue, 12 Jul 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* Author: Matt Mecham
|
* Author: Matt Mecham
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since Friday 19th May 2006 17:33
|
* @since Friday 19th May 2006 17:33
|
||||||
* @version $Revision: 9218 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,21 +3,21 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* AJAX Functions For applications/core/js/ipb3Templates.js file
|
* AJAX Functions For applications/core/js/ipb3Templates.js file
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* Author: Matt Mecham
|
* Author: Matt Mecham
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since Friday 19th May 2006 17:33
|
* @since Friday 19th May 2006 17:33
|
||||||
* @version $Revision: 8644 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,21 +3,21 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* AJAX Functions For applications/core/js/ipb3CSS.js file
|
* AJAX Functions For applications/core/js/ipb3CSS.js file
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* Author: Matt Mecham
|
* Author: Matt Mecham
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since Friday 19th May 2006 17:33
|
* @since Friday 19th May 2006 17:33
|
||||||
* @version $Revision: 8644 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* @file applications.php Applications management
|
||||||
* Invision Power Services
|
*~TERABYTE_DOC_READY~
|
||||||
* IP.Board v3.2.3
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* Group management
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* Last Updated: $Date: 2011-09-09 19:44:48 -0400 (Fri, 09 Sep 2011) $
|
* $Author: bfarber $
|
||||||
* </pre>
|
* @since 15 January 2007
|
||||||
*
|
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* @author $Author: bfarber $
|
* @version v3.3.4
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* $Revision: 10914 $
|
||||||
* @license This is NULLED!
|
|
||||||
* @package IP.Board
|
|
||||||
* @subpackage Core
|
|
||||||
* @link http://hatynka.in
|
|
||||||
* @since Monday 15th January 2007 (15:01)
|
|
||||||
* @version $Revision: 9476 $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -23,34 +17,39 @@ if ( ! defined( 'IN_ACP' ) )
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @class admin_core_applications_applications
|
||||||
|
* @brief Applications management
|
||||||
|
*/
|
||||||
class admin_core_applications_applications extends ipsCommand
|
class admin_core_applications_applications extends ipsCommand
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Skin object
|
* Skin object shortcut
|
||||||
*
|
*
|
||||||
* @var object Skin templates
|
* @var $html
|
||||||
*/
|
*/
|
||||||
public $html;
|
public $html;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shortcut for url
|
* String for the screen url bit
|
||||||
*
|
*
|
||||||
* @var string URL shortcut
|
* @var $form_code
|
||||||
*/
|
*/
|
||||||
public $form_code;
|
public $form_code = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shortcut for url (javascript)
|
* String for the JS url bit
|
||||||
*
|
*
|
||||||
* @var string JS URL shortcut
|
* @var $form_code_js
|
||||||
*/
|
*/
|
||||||
public $form_code_js;
|
public $form_code_js = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main class entry point
|
* Main function executed automatically by the controller
|
||||||
*
|
*
|
||||||
* @param object ipsRegistry reference
|
* @param object $registry Registry object
|
||||||
* @return @e void [Outputs to screen]
|
* @return @e void
|
||||||
*/
|
*/
|
||||||
public function doExecute( ipsRegistry $registry )
|
public function doExecute( ipsRegistry $registry )
|
||||||
{
|
{
|
||||||
@@ -58,17 +57,11 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
// Load skin
|
// Load skin
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
|
|
||||||
$this->html = $this->registry->output->loadTemplate( 'cp_skin_applications' );
|
$this->html = $this->registry->output->loadTemplate( 'cp_skin_applications' );
|
||||||
$this->registry->class_localization->loadLanguageFile( array( 'admin_applications' ) );
|
$this->registry->class_localization->loadLanguageFile( array( 'admin_applications' ) );
|
||||||
|
|
||||||
//-----------------------------------------
|
$this->form_code = $this->html->form_code = 'module=applications&section=applications&';
|
||||||
// Set up stuff
|
$this->form_code_js = $this->html->form_code_js = 'module=applications§ion=applications&';
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
$this->form_code = $this->html->form_code = 'module=applications&section=applications&';
|
|
||||||
$this->form_code_js = $this->html->form_code_js = 'module=applications§ion=applications&';
|
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// What to do...
|
// What to do...
|
||||||
@@ -82,6 +75,9 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
$this->request['do'] = 'applications_overview';
|
$this->request['do'] = 'applications_overview';
|
||||||
$this->applicationsOverview();
|
$this->applicationsOverview();
|
||||||
break;
|
break;
|
||||||
|
case 'application_details' :
|
||||||
|
$this->applicationViewDetails();
|
||||||
|
break;
|
||||||
case 'application_manage_position' :
|
case 'application_manage_position' :
|
||||||
$this->registry->getClass( 'class_permissions' )->checkPermissionAutoMsg( 'app_manage' );
|
$this->registry->getClass( 'class_permissions' )->checkPermissionAutoMsg( 'app_manage' );
|
||||||
$this->applicationManagePosition();
|
$this->applicationManagePosition();
|
||||||
@@ -194,17 +190,8 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
*/
|
*/
|
||||||
public function applicationToggle()
|
public function applicationToggle()
|
||||||
{
|
{
|
||||||
//--------------------------------------------
|
/* Get application */
|
||||||
// INIT
|
$application = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_applications', 'where' => 'app_id=' . intval( $this->request['app_id'] ) ) );
|
||||||
//--------------------------------------------
|
|
||||||
|
|
||||||
$app_id = intval( $this->request['app_id'] );
|
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Got an application?
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$application = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_applications', 'where' => 'app_id=' . $app_id ) );
|
|
||||||
|
|
||||||
if ( ! $application['app_id'] )
|
if ( ! $application['app_id'] )
|
||||||
{
|
{
|
||||||
@@ -216,8 +203,20 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
$this->registry->output->showError( $this->lang->words['cannot_toggle_defaults'], 111161.1 );
|
$this->registry->output->showError( $this->lang->words['cannot_toggle_defaults'], 111161.1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->DB->update( 'core_applications', array( 'app_enabled' => $application['app_enabled'] ? 0 : 1 ), 'app_id=' . $app_id );
|
/* We're disabling the app? */
|
||||||
|
if ( $application['app_enabled'] )
|
||||||
|
{
|
||||||
|
$this->DB->update( 'core_applications', array( 'app_enabled' => 0, 'app_position' => 0 ), 'app_id=' . $application['app_id'] );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$appsCount = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'core_applications', 'where' => 'app_enabled=1' ) );
|
||||||
|
$appsCount['total'] = intval($appsCount['total']) + 1;
|
||||||
|
|
||||||
|
$this->DB->update( 'core_applications', array( 'app_enabled' => 1, 'app_position' => $appsCount['total'] ), 'app_id=' . $application['app_id'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Recache */
|
||||||
$this->moduleRecacheAll( 1 );
|
$this->moduleRecacheAll( 1 );
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -360,7 +359,6 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
// Replace out the SQL details
|
// Replace out the SQL details
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
|
|
||||||
$sphinxTemplate = str_replace( "<!--SPHINX_CONF_HOST-->", ipsRegistry::$settings['sql_host'], $sphinxTemplate );
|
$sphinxTemplate = str_replace( "<!--SPHINX_CONF_HOST-->", ipsRegistry::$settings['sql_host'], $sphinxTemplate );
|
||||||
$sphinxTemplate = str_replace( "<!--SPHINX_CONF_USER-->", ipsRegistry::$settings['sql_user'], $sphinxTemplate );
|
$sphinxTemplate = str_replace( "<!--SPHINX_CONF_USER-->", ipsRegistry::$settings['sql_user'], $sphinxTemplate );
|
||||||
$sphinxTemplate = str_replace( "<!--SPHINX_CONF_PASS-->", ipsRegistry::$settings['sql_pass'], $sphinxTemplate );
|
$sphinxTemplate = str_replace( "<!--SPHINX_CONF_PASS-->", ipsRegistry::$settings['sql_pass'], $sphinxTemplate );
|
||||||
@@ -393,6 +391,8 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$appSphinxTemplate = str_replace( "<!--SPHINX_DB_SET_NAMES-->", ( ! empty( ipsRegistry::$settings['sql_charset'] ) ) ? 'sql_query_pre = SET NAMES ' . ipsRegistry::$settings['sql_charset'] : '', $appSphinxTemplate );
|
||||||
|
|
||||||
$sphinxCompiled .= $appSphinxTemplate;
|
$sphinxCompiled .= $appSphinxTemplate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -855,6 +855,8 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
// Done...
|
// Done...
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
|
/* Recache menu */
|
||||||
|
$this->applicationsMenuDataRecache();
|
||||||
|
|
||||||
if ( $return )
|
if ( $return )
|
||||||
{
|
{
|
||||||
@@ -1204,13 +1206,11 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
if ( ! $app_id )
|
if ( ! $app_id )
|
||||||
{
|
{
|
||||||
$ajax->returnString( $this->lang->words['postform_badmd5'] );
|
$ajax->returnString( $this->lang->words['postform_badmd5'] );
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false )
|
if ( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false )
|
||||||
{
|
{
|
||||||
$ajax->returnString( $this->lang->words['postform_badmd5'] );
|
$ajax->returnString( $this->lang->words['postform_badmd5'] );
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -1248,10 +1248,15 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Load known modules
|
// Load known modules
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
$this->DB->build( array( 'select' => 'm.*',
|
||||||
|
'from' => array( 'core_sys_module' => 'm' ),
|
||||||
$this->DB->build( array( 'select' => 'm.*', 'from' => array( 'core_sys_module' => 'm' ), 'where' => 'm.sys_module_visible=1', 'order' => 'a.app_position, m.sys_module_position ASC', 'add_join' => array( array( 'select' => 'a.*', 'from' => array( 'core_applications' => 'a' ), 'where' => 'm.sys_module_application=a.app_directory', 'type' => 'inner' ) ) ) );
|
'where' => 'm.sys_module_visible=1',
|
||||||
|
'order' => 'a.app_position, m.sys_module_position ASC',
|
||||||
|
'add_join' => array( array( 'select' => 'a.*',
|
||||||
|
'from' => array( 'core_applications' => 'a' ),
|
||||||
|
'where' => 'm.sys_module_application=a.app_directory',
|
||||||
|
'type' => 'inner' ) )
|
||||||
|
) );
|
||||||
$this->DB->execute();
|
$this->DB->execute();
|
||||||
|
|
||||||
while ( $row = $this->DB->fetch() )
|
while ( $row = $this->DB->fetch() )
|
||||||
@@ -1266,7 +1271,7 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$modules[$row['sys_module_application']][] = $_row;
|
$modules[ $row['sys_module_application'] ][] = $_row;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->cache->setCache( 'module_cache', $modules, array( 'array' => 1 ) );
|
$this->cache->setCache( 'module_cache', $modules, array( 'array' => 1 ) );
|
||||||
@@ -1462,6 +1467,31 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
|
|
||||||
$this->DB->delete( 'core_sys_settings_titles', "conf_title_app='{$application['app_directory']}'" );
|
$this->DB->delete( 'core_sys_settings_titles', "conf_title_app='{$application['app_directory']}'" );
|
||||||
|
|
||||||
|
$settingsFile = IPSLib::getAppDir( $application['app_directory'] ) . '/xml/' . $application['app_directory'] . '_settings.xml';
|
||||||
|
if( is_file( $settingsFile ) )
|
||||||
|
{
|
||||||
|
require_once( IPS_KERNEL_PATH.'classXML.php' );/*noLibHook*/
|
||||||
|
$xml = new classXML( IPS_DOC_CHAR_SET );
|
||||||
|
$xml->load( $settingsFile );
|
||||||
|
|
||||||
|
$keys = array();
|
||||||
|
foreach( $xml->fetchElements('setting') as $setting )
|
||||||
|
{
|
||||||
|
$entry = $xml->fetchElementsFromRecord( $setting );
|
||||||
|
if ( $entry['conf_is_title'] )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$keys[] = "'{$entry['conf_key']}'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !empty( $keys ) )
|
||||||
|
{
|
||||||
|
$this->DB->delete( 'core_sys_conf_settings', 'conf_key IN(' . implode( ',', $keys ) . ')' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Remove Application Caches
|
// Remove Application Caches
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -1487,7 +1517,6 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
// Remove tables
|
// Remove tables
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
|
|
||||||
$_file = IPSLib::getAppDir( $application['app_directory'] ) . '/setup/versions/install/sql/' . $application['app_directory'] . '_' . ipsRegistry::dbFunctions()->getDriverType() . '_tables.php';
|
$_file = IPSLib::getAppDir( $application['app_directory'] ) . '/setup/versions/install/sql/' . $application['app_directory'] . '_' . ipsRegistry::dbFunctions()->getDriverType() . '_tables.php';
|
||||||
|
|
||||||
if ( is_file( $_file ) )
|
if ( is_file( $_file ) )
|
||||||
@@ -1501,7 +1530,6 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
// Capture create tables first
|
// Capture create tables first
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
|
|
||||||
preg_match( "/CREATE TABLE (\S+)(\s)?\(/", $q, $match );
|
preg_match( "/CREATE TABLE (\S+)(\s)?\(/", $q, $match );
|
||||||
|
|
||||||
if ( $match[1] )
|
if ( $match[1] )
|
||||||
@@ -1514,7 +1542,6 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
// Then capture alter tables
|
// Then capture alter tables
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
|
|
||||||
preg_match( "/ALTER TABLE (\S+)\sADD\s(\S+)\s/i", $q, $match );
|
preg_match( "/ALTER TABLE (\S+)\sADD\s(\S+)\s/i", $q, $match );
|
||||||
|
|
||||||
if ( $match[1] and $match[2] )
|
if ( $match[1] and $match[2] )
|
||||||
@@ -1529,7 +1556,6 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
// Check for uninstall sql
|
// Check for uninstall sql
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
|
|
||||||
/* Any "extra" configs required for this driver? */
|
/* Any "extra" configs required for this driver? */
|
||||||
if ( is_file( IPS_ROOT_PATH . 'setup/sql/' . $this->settings['sql_driver'] . '_install.php' ) )
|
if ( is_file( IPS_ROOT_PATH . 'setup/sql/' . $this->settings['sql_driver'] . '_install.php' ) )
|
||||||
{
|
{
|
||||||
@@ -1569,7 +1595,7 @@ class admin_core_applications_applications extends ipsCommand
|
|||||||
$this->DB->delete( 'permission_index', "app='{$application['app_directory']}'" );
|
$this->DB->delete( 'permission_index', "app='{$application['app_directory']}'" );
|
||||||
$this->DB->delete( 'reputation_index', "app='{$application['app_directory']}'" );
|
$this->DB->delete( 'reputation_index', "app='{$application['app_directory']}'" );
|
||||||
$this->DB->delete( 'reputation_cache', "app='{$application['app_directory']}'" );
|
$this->DB->delete( 'reputation_cache', "app='{$application['app_directory']}'" );
|
||||||
$this->DB->delete( 'tags_index', "app='{$application['app_directory']}'" );
|
$this->DB->delete( 'core_tags', "tag_meta_app='{$application['app_directory']}'" );
|
||||||
$this->DB->delete( 'faq', "app='{$application['app_directory']}'" );
|
$this->DB->delete( 'faq', "app='{$application['app_directory']}'" );
|
||||||
$this->DB->delete( 'custom_bbcode', "bbcode_app='{$application['app_directory']}'" );
|
$this->DB->delete( 'custom_bbcode', "bbcode_app='{$application['app_directory']}'" );
|
||||||
$this->DB->delete( 'upgrade_history', "upgrade_app='{$application['app_directory']}'" );
|
$this->DB->delete( 'upgrade_history', "upgrade_app='{$application['app_directory']}'" );
|
||||||
@@ -2036,10 +2062,12 @@ XML;
|
|||||||
public function applicationSave( $type = 'add' )
|
public function applicationSave( $type = 'add' )
|
||||||
{
|
{
|
||||||
/* Init vars */
|
/* Init vars */
|
||||||
$app_title = trim( $this->request['app_title'] );
|
$app_title = trim( $this->request['app_title'] );
|
||||||
|
$app_public = trim( $this->request['app_public_title'] );
|
||||||
$app_directory = trim( $this->request['app_directory'] );
|
$app_directory = trim( $this->request['app_directory'] );
|
||||||
$app_enabled = intval( $this->request['app_enabled'] );
|
$app_enabled = intval( $this->request['app_enabled'] );
|
||||||
$application = array();
|
$application = array();
|
||||||
|
$sphinxRebuild = false;
|
||||||
|
|
||||||
/* Editing? */
|
/* Editing? */
|
||||||
if ( $type == 'edit' )
|
if ( $type == 'edit' )
|
||||||
@@ -2071,13 +2099,24 @@ XML;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! $app_enabled && in_array( $app_directory, array( 'core', 'forums', 'members' ) ) )
|
if ( ( empty($app_enabled) || empty($app_public) ) && in_array( $app_directory, array( 'core', 'forums', 'members' ) ) )
|
||||||
{
|
{
|
||||||
$this->registry->output->showError( $this->lang->words['cannot_toggle_defaults'], 111161.2 );
|
$this->registry->output->showError( $this->lang->words['cannot_toggle_defaults'], 111161.2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* $setup update array */
|
/* $etup update array */
|
||||||
$array = array( 'app_title' => $app_title, 'app_public_title' => trim( $this->request['app_public_title'] ), 'app_enabled' => $app_enabled, 'app_hide_tab' => intval( $this->request['app_hide_tab'] ), 'app_description' => trim( $this->request['app_description'] ), 'app_author' => trim( $this->request['app_author'] ), 'app_version' => trim( $this->request['app_version'] ), 'app_directory' => $app_directory, 'app_website' => trim( $this->request['app_website'] ), 'app_update_check' => trim( $this->request['app_update_check'] ), 'app_global_caches' => ( is_array( $this->request['app_global_caches'] ) && count( $this->request['app_global_caches'] ) ) ? implode( ',', $this->request['app_global_caches'] ) : '', 'app_tab_groups' => ( is_array( $this->request['app_tab_groups'] ) && count( $this->request['app_tab_groups'] ) ) ? implode( ',', $this->request['app_tab_groups'] ) : '' );
|
$array = array( 'app_title' => $app_title,
|
||||||
|
'app_public_title' => $app_public,
|
||||||
|
'app_enabled' => $app_enabled,
|
||||||
|
'app_hide_tab' => intval( $this->request['app_hide_tab'] ),
|
||||||
|
'app_description' => trim( $this->request['app_description'] ),
|
||||||
|
'app_author' => trim( $this->request['app_author'] ),
|
||||||
|
'app_version' => trim( $this->request['app_version'] ),
|
||||||
|
'app_directory' => $app_directory,
|
||||||
|
'app_website' => trim( $this->request['app_website'] ),
|
||||||
|
'app_update_check' => trim( $this->request['app_update_check'] ),
|
||||||
|
'app_global_caches' => ( is_array( $this->request['app_global_caches'] ) && count( $this->request['app_global_caches'] ) ) ? implode( ',', $this->request['app_global_caches'] ) : '',
|
||||||
|
'app_tab_groups' => ( is_array( $this->request['app_tab_groups'] ) && count( $this->request['app_tab_groups'] ) ) ? implode( ',', $this->request['app_tab_groups'] ) : '' );
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// IN DEV?
|
// IN DEV?
|
||||||
@@ -2096,24 +2135,41 @@ XML;
|
|||||||
|
|
||||||
if ( $type == 'add' )
|
if ( $type == 'add' )
|
||||||
{
|
{
|
||||||
$array['app_added'] = time();
|
$array['app_added'] = IPS_UNIX_TIME_NOW;
|
||||||
$array['app_location'] = 'other';
|
$array['app_location'] = 'other';
|
||||||
|
|
||||||
$max = $this->DB->buildAndFetch( array( 'select' => 'MAX(app_position) as position', 'from' => 'core_applications' ) );
|
$max = $this->DB->buildAndFetch( array( 'select' => 'MAX(app_position) as position', 'from' => 'core_applications' ) );
|
||||||
|
|
||||||
$array['app_position'] = $max['position'] + 1;
|
$array['app_position'] = intval($max['position']) + 1;
|
||||||
|
|
||||||
$this->DB->insert( 'core_applications', $array );
|
$this->DB->insert( 'core_applications', $array );
|
||||||
$this->registry->output->global_message = $this->lang->words['a_newapp'];
|
$this->registry->output->global_message = $this->lang->words['a_newapp'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* We're disabling the app? */
|
||||||
|
if ( empty($app_enabled) )
|
||||||
|
{
|
||||||
|
$array['app_position'] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( empty($application['app_enabled']) )
|
||||||
|
{
|
||||||
|
$appsCount = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'core_applications', 'where' => 'app_enabled=1' ) );
|
||||||
|
|
||||||
|
$array['app_position'] = $appsCount['total'] + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Update the application record */
|
/* Update the application record */
|
||||||
$this->DB->update( 'core_applications', $array, 'app_id=' . $application['app_id'] );
|
$this->DB->update( 'core_applications', $array, 'app_id=' . $application['app_id'] );
|
||||||
|
|
||||||
/* Update modules and tasks, if the application directory changed */
|
/* Update modules and tasks, if the application directory changed */
|
||||||
if ( $application['app_directory'] != $app_directory )
|
if ( $application['app_directory'] != $app_directory )
|
||||||
{
|
{
|
||||||
|
$sphinxRebuild = true;
|
||||||
|
|
||||||
$this->DB->update( 'task_manager', array( 'task_application' => $app_directory ), "task_application='{$application['app_directory']}'" );
|
$this->DB->update( 'task_manager', array( 'task_application' => $app_directory ), "task_application='{$application['app_directory']}'" );
|
||||||
$this->DB->update( 'core_sys_module', array( 'sys_module_application' => $app_directory ), "sys_module_application='{$application['app_directory']}'" );
|
$this->DB->update( 'core_sys_module', array( 'sys_module_application' => $app_directory ), "sys_module_application='{$application['app_directory']}'" );
|
||||||
$this->DB->update( 'admin_logs', array( 'appcomponent' => $app_directory ), "appcomponent='{$application['app_directory']}'" );
|
$this->DB->update( 'admin_logs', array( 'appcomponent' => $app_directory ), "appcomponent='{$application['app_directory']}'" );
|
||||||
@@ -2134,7 +2190,6 @@ XML;
|
|||||||
$this->DB->update( 'reputation_index', array( 'app' => $app_directory ), "app='{$application['app_directory']}'" );
|
$this->DB->update( 'reputation_index', array( 'app' => $app_directory ), "app='{$application['app_directory']}'" );
|
||||||
$this->DB->update( 'skin_css', array( 'css_app' => $app_directory ), "css_app='{$application['app_directory']}'" );
|
$this->DB->update( 'skin_css', array( 'css_app' => $app_directory ), "css_app='{$application['app_directory']}'" );
|
||||||
$this->DB->update( 'skin_css_previous', array( 'p_css_app' => $app_directory ), "p_css_app='{$application['app_directory']}'" );
|
$this->DB->update( 'skin_css_previous', array( 'p_css_app' => $app_directory ), "p_css_app='{$application['app_directory']}'" );
|
||||||
$this->DB->update( 'tags_index', array( 'app' => $app_directory ), "app='{$application['app_directory']}'" );
|
|
||||||
$this->DB->update( 'upgrade_history', array( 'upgrade_app' => $app_directory ), "upgrade_app='{$application['app_directory']}'" );
|
$this->DB->update( 'upgrade_history', array( 'upgrade_app' => $app_directory ), "upgrade_app='{$application['app_directory']}'" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2142,6 +2197,12 @@ XML;
|
|||||||
$this->registry->output->global_message = $this->lang->words['a_editappdone'];
|
$this->registry->output->global_message = $this->lang->words['a_editappdone'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Have we toggled this? */
|
||||||
|
if ( $app_enabled != $application['app_enabled'] )
|
||||||
|
{
|
||||||
|
$sphinxRebuild = true;
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Recache
|
// Recache
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -2180,8 +2241,7 @@ XML;
|
|||||||
// Sphinx involved?
|
// Sphinx involved?
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
|
if ( $sphinxRebuild AND $this->settings['search_method'] == 'sphinx' && is_file( IPSLib::getAppDir( $app_directory ) . '/extensions/sphinxTemplate.php' ) )
|
||||||
if ( $this->settings['search_method'] == 'sphinx' )
|
|
||||||
{
|
{
|
||||||
$this->registry->output->global_message .= sprintf( $this->lang->words['rebuild_sphinx'], $this->settings['_base_url'] );
|
$this->registry->output->global_message .= sprintf( $this->lang->words['rebuild_sphinx'], $this->settings['_base_url'] );
|
||||||
}
|
}
|
||||||
@@ -2200,13 +2260,13 @@ XML;
|
|||||||
{
|
{
|
||||||
/* Init vars */
|
/* Init vars */
|
||||||
$application = array();
|
$application = array();
|
||||||
$form = array();
|
$form = array();
|
||||||
|
$defaultTab = '';
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Add or edit?
|
// Add or edit?
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
|
|
||||||
if ( $type == 'add' )
|
if ( $type == 'add' )
|
||||||
{
|
{
|
||||||
$formcode = 'application_add_do';
|
$formcode = 'application_add_do';
|
||||||
@@ -2273,8 +2333,14 @@ XML;
|
|||||||
|
|
||||||
$form['app_global_caches'] = $this->registry->output->formMultiDropdown( 'app_global_caches[]', $_caches, isset( $_POST['app_global_caches'] ) ? $_POST['app_global_caches'] : explode( ',', $application['app_global_caches'] ), 15 );
|
$form['app_global_caches'] = $this->registry->output->formMultiDropdown( 'app_global_caches[]', $_caches, isset( $_POST['app_global_caches'] ) ? $_POST['app_global_caches'] : explode( ',', $application['app_global_caches'] ), 15 );
|
||||||
|
|
||||||
|
/* Got a default tab specified? */
|
||||||
|
if ( !empty($this->request['_tab']) )
|
||||||
|
{
|
||||||
|
$defaultTab = trim($this->request['_tab']);
|
||||||
|
}
|
||||||
|
|
||||||
/* Output */
|
/* Output */
|
||||||
$this->registry->output->html .= $this->html->application_form( $form, $title, $formcode, $button, $application );
|
$this->registry->output->html .= $this->html->application_form( $form, $title, $formcode, $button, $application, $defaultTab );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2300,32 +2366,31 @@ XML;
|
|||||||
if ( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false )
|
if ( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false )
|
||||||
{
|
{
|
||||||
$ajax->returnString( $this->lang->words['postform_badmd5'] );
|
$ajax->returnString( $this->lang->words['postform_badmd5'] );
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Save new position
|
// Save new position
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$position = 1;
|
||||||
|
|
||||||
$position = 1;
|
if ( is_array($this->request['apps']) && count($this->request['apps']) )
|
||||||
|
{
|
||||||
|
/* Reset all apps to 0 temporarily */
|
||||||
|
$this->DB->update( 'core_applications', array( 'app_position' => 0 ) );
|
||||||
|
|
||||||
if ( is_array( $this->request['apps'] ) and count( $this->request['apps'] ) )
|
foreach( $this->request['apps'] as $this_id )
|
||||||
{
|
{
|
||||||
foreach( $this->request['apps'] as $this_id )
|
$this->DB->update( 'core_applications', array( 'app_position' => $position ), 'app_id=' . intval($this_id) );
|
||||||
{
|
|
||||||
$location = $this->DB->buildAndFetch( array( 'select' => 'app_location', 'from' => 'core_applications', 'where' => 'app_id=' . $this_id ) );
|
|
||||||
$buffer = array( 'root' => 0, 'ips' => 100, 'other' => 200 );
|
|
||||||
$this->DB->update( 'core_applications', array( 'app_position' => $position + $buffer[$location['app_location']] ), 'app_id=' . $this_id );
|
|
||||||
|
|
||||||
$position ++;
|
$position++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->applicationsRecache();
|
$this->applicationsRecache();
|
||||||
$this->applicationsMenuDataRecache();
|
$this->applicationsMenuDataRecache();
|
||||||
|
|
||||||
$ajax->returnString( 'OK' );
|
$ajax->returnString('OK');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2336,20 +2401,27 @@ XML;
|
|||||||
public function applicationsOverview()
|
public function applicationsOverview()
|
||||||
{
|
{
|
||||||
/* Init vars */
|
/* Init vars */
|
||||||
$folders = array();
|
$folders = array();
|
||||||
$application = array();
|
$applications = array( 'enabled' => array( 'core' => array() ), 'disabled' => array() );
|
||||||
$_apps = array();
|
$_apps = array();
|
||||||
$uninstalled = array();
|
$uninstalled = array();
|
||||||
$appsUpdates = 0;
|
$checkUpdates = false;
|
||||||
$checkUpdates = ! empty( $this->request['checkUpdates'] ) ? true : false;
|
$appsUpdates = 0;
|
||||||
|
$message = '';
|
||||||
|
|
||||||
/* Get the setup class */
|
/* Get the setup class */
|
||||||
require_once ( IPS_ROOT_PATH . "setup/sources/base/setup.php" );/*noLibHook*/
|
require_once ( IPS_ROOT_PATH . "setup/sources/base/setup.php" );/*noLibHook*/
|
||||||
|
|
||||||
/* Get hooks file for update check */
|
/* Checking for updates? */
|
||||||
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/hooks.php', 'admin_core_applications_hooks' );
|
if ( !empty( $this->request['checkUpdates'] ) )
|
||||||
$hooksClass = new $classToLoad();
|
{
|
||||||
$hooksClass->makeRegistryShortcuts( $this->registry );
|
$checkUpdates = true;
|
||||||
|
|
||||||
|
/* Get hooks file for update check */
|
||||||
|
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/hooks.php', 'admin_core_applications_hooks' );
|
||||||
|
$hooksClass = new $classToLoad();
|
||||||
|
$hooksClass->makeRegistryShortcuts( $this->registry );
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Get DB applications
|
// Get DB applications
|
||||||
@@ -2375,7 +2447,7 @@ XML;
|
|||||||
$row['app_update_available'] = array( 0 );
|
$row['app_update_available'] = array( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
$_apps[IPSLib::getAppFolder( $row['app_directory'] ) . '/' . $row['app_directory']] = $row;
|
$_apps[ IPSLib::getAppFolder( $row['app_directory'] ) . '/' . $row['app_directory'] ] = $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -2412,12 +2484,6 @@ XML;
|
|||||||
{
|
{
|
||||||
$app_dir = $row['app_directory'];
|
$app_dir = $row['app_directory'];
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Enabled?
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$row['_app_enabled'] = ( $row['app_enabled'] ) ? 'tick.png' : 'cross.png';
|
|
||||||
|
|
||||||
/* Version numbers */
|
/* Version numbers */
|
||||||
$_a = ( $app_dir == 'forums' or $app_dir == 'members' ) ? 'core' : $app_dir;
|
$_a = ( $app_dir == 'forums' or $app_dir == 'members' ) ? 'core' : $app_dir;
|
||||||
$numbers = IPSSetUp::fetchAppVersionNumbers( $_a );
|
$numbers = IPSSetUp::fetchAppVersionNumbers( $_a );
|
||||||
@@ -2441,7 +2507,7 @@ XML;
|
|||||||
$phpVersion = str_replace( substr( $phpVersion, strrpos( $phpVersion, '.' ) ), '', $phpVersion );
|
$phpVersion = str_replace( substr( $phpVersion, strrpos( $phpVersion, '.' ) ), '', $phpVersion );
|
||||||
$encoding = "Zend {$phpVersion}";
|
$encoding = "Zend {$phpVersion}";
|
||||||
}
|
}
|
||||||
elseif ( substr( $file, 36, 7 ) == 'ionCube' )
|
elseif ( substr( $file, 36, 7 ) == 'ionCube' or substr( $file, 37, 7 ) == 'ionCube' )
|
||||||
{
|
{
|
||||||
$encoding = 'Ioncube';
|
$encoding = 'Ioncube';
|
||||||
}
|
}
|
||||||
@@ -2449,18 +2515,16 @@ XML;
|
|||||||
$row['_human_current'] .= " ({$encoding})";
|
$row['_human_current'] .= " ({$encoding})";
|
||||||
}
|
}
|
||||||
|
|
||||||
$application[$row['app_location']][] = $row;
|
if ( $row['app_enabled'] )
|
||||||
|
{
|
||||||
|
$applications['enabled'][ $row['app_directory'] ] = $row;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$applications['disabled'][ $row['app_directory'] ] = $row;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure they are in the proper order, hacky but it works :) */
|
|
||||||
$__apps = array();
|
|
||||||
|
|
||||||
$__apps['root'] = $application['root'] ? $application['root'] : array();
|
|
||||||
$__apps['ips'] = $application['ips'] ? $application['ips'] : array();
|
|
||||||
$__apps['other'] = $application['other'] ? $application['other'] : array();
|
|
||||||
|
|
||||||
$application = $__apps;
|
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Uninstalled
|
// Uninstalled
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -2499,14 +2563,115 @@ XML;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Got updates to show? */
|
/* Got updates to show? */
|
||||||
$message = NULL;
|
|
||||||
if ( $checkUpdates === true )
|
if ( $checkUpdates === true )
|
||||||
{
|
{
|
||||||
$message = ( $appsUpdates == 1 ) ? $this->lang->words['updates_string_single'] : sprintf( $this->lang->words['updates_string_more'], $appsUpdates );
|
$message = ( $appsUpdates == 1 ) ? $this->lang->words['updates_string_single'] : sprintf( $this->lang->words['updates_string_more'], $appsUpdates );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Output */
|
/* Output */
|
||||||
$this->registry->output->html .= $this->html->applications_list( $application, $uninstalled, $message );
|
$this->registry->output->html .= $this->html->applications_list( $applications, $uninstalled, $message );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View details about an application
|
||||||
|
*
|
||||||
|
* @return @e void [Outputs to screen]
|
||||||
|
*/
|
||||||
|
protected function applicationViewDetails()
|
||||||
|
{
|
||||||
|
$id = intval($this->request['app_id']);
|
||||||
|
|
||||||
|
if( !$id )
|
||||||
|
{
|
||||||
|
$this->registry->output->showError( $this->lang->words['a_noid'], 11110.1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
$appData = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_applications', 'where' => 'app_id=' . $id ) );
|
||||||
|
|
||||||
|
if( !$appData['app_id'] )
|
||||||
|
{
|
||||||
|
$this->registry->output->showError( $this->lang->words['a_nodetails'], 11111.1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Format dates */
|
||||||
|
$lastUpdate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'upgrade_history', 'where' => "upgrade_app='{$appData['app_directory']}'", 'order' => 'upgrade_version_id DESC', 'limit' => array( 1 ) ) );
|
||||||
|
|
||||||
|
$appData['_installed'] = $this->registry->getClass('class_localization')->getDate( $appData['app_added'], 'DATE' );
|
||||||
|
$appData['_updated'] = ( $lastUpdate['upgrade_date'] > $appData['app_added'] ) ? $this->registry->getClass('class_localization')->getDate( $lastUpdate['upgrade_date'], 'DATE' ) : '--';
|
||||||
|
|
||||||
|
/* Get the setup class */
|
||||||
|
require_once ( IPS_ROOT_PATH . "setup/sources/base/setup.php" );/*noLibHook*/
|
||||||
|
|
||||||
|
/* Version numbers */
|
||||||
|
$_a = in_array( $appData['app_directory'], array( 'forums', 'members' ) ) ? 'core' : $appData['app_directory'];
|
||||||
|
$numbers = IPSSetUp::fetchAppVersionNumbers( $_a );
|
||||||
|
|
||||||
|
$appData['_human_version'] = $numbers['latest'][1];
|
||||||
|
$appData['_long_version'] = $numbers['latest'][0];
|
||||||
|
|
||||||
|
$appData['_human_current'] = $numbers['current'][1];
|
||||||
|
$appData['_long_current'] = $numbers['current'][0];
|
||||||
|
|
||||||
|
/* Got updates? */
|
||||||
|
if ( $appData['app_update_check'] )
|
||||||
|
{
|
||||||
|
/* Get hooks file for update check */
|
||||||
|
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/hooks.php', 'admin_core_applications_hooks' );
|
||||||
|
$hooksClass = new $classToLoad();
|
||||||
|
$hooksClass->makeRegistryShortcuts( $this->registry );
|
||||||
|
|
||||||
|
$appData['app_update_available'] = $hooksClass->_updateAvailable( $appData['app_update_check'], $appData['app_long_version'] );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$appData['app_update_available'] = array( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get related hooks */
|
||||||
|
$hooks = array();
|
||||||
|
|
||||||
|
$this->DB->build( array( 'select' => '*',
|
||||||
|
'from' => 'core_hooks',
|
||||||
|
//This is a bit hackish but there's no way around...
|
||||||
|
'where' => 'hook_requirements LIKE \'%:"' . $this->DB->addSlashes( $appData['app_directory'] ) . '";a:%\'',
|
||||||
|
'order' => 'hook_id ASC'
|
||||||
|
) );
|
||||||
|
$outer = $this->DB->execute();
|
||||||
|
|
||||||
|
/* Got results? */
|
||||||
|
if ( $this->DB->getTotalRows( $outer ) )
|
||||||
|
{
|
||||||
|
/* Get hooks file for update check */
|
||||||
|
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/hooks.php', 'admin_core_applications_hooks' );
|
||||||
|
$hooksClass = new $classToLoad();
|
||||||
|
$hooksClass->makeRegistryShortcuts( $this->registry );
|
||||||
|
|
||||||
|
/* Loop */
|
||||||
|
while ( $rh = $this->DB->fetch( $outer ) )
|
||||||
|
{
|
||||||
|
/* Check requirements */
|
||||||
|
if( $rh['hook_enabled'] )
|
||||||
|
{
|
||||||
|
$rh['_require_errors'] = $hooksClass->checkHookRequirements( $rh );
|
||||||
|
}
|
||||||
|
|
||||||
|
$hooks[] = $rh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Upgrade history */
|
||||||
|
$upgradeHistory = array();
|
||||||
|
|
||||||
|
$this->DB->build( array( 'select' => '*', 'from' => 'upgrade_history', 'where' => "upgrade_app='" . $this->DB->addSlashes( $appData['app_directory'] ) . "'", 'order' => 'upgrade_version_id DESC' ) );
|
||||||
|
$this->DB->execute();
|
||||||
|
|
||||||
|
while( $r = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
$upgradeHistory[] = $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Output */
|
||||||
|
$this->registry->output->html .= $this->html->application_details( $appData, $upgradeHistory, $hooks );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2582,6 +2747,7 @@ XML;
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->cache->setCache( 'app_cache', $apps, array( 'array' => 1 ) );
|
$this->cache->setCache( 'app_cache', $apps, array( 'array' => 1 ) );
|
||||||
|
ipsRegistry::$applications = $apps;
|
||||||
|
|
||||||
/* Do we have an incomingEmails extension anywhere? */
|
/* Do we have an incomingEmails extension anywhere? */
|
||||||
$systemvars = $this->cache->getCache( 'systemvars' );
|
$systemvars = $this->cache->getCache( 'systemvars' );
|
||||||
@@ -2592,11 +2758,12 @@ XML;
|
|||||||
$tabs = array();
|
$tabs = array();
|
||||||
foreach( $apps as $dir => $data )
|
foreach( $apps as $dir => $data )
|
||||||
{
|
{
|
||||||
if ( ! $data['app_hide_tab'] )
|
# app_hide_tab is already checked in the output class
|
||||||
{
|
#if ( ! $data['app_hide_tab'] )
|
||||||
|
#{
|
||||||
$tabs[] = array( 'app' => $dir, 'groups' => $data['app_tab_groups'], 'module' => '', // Can't use IPSLib::getAppTitle() because of the IN_ACP check in it
|
$tabs[] = array( 'app' => $dir, 'groups' => $data['app_tab_groups'], 'module' => '', // Can't use IPSLib::getAppTitle() because of the IN_ACP check in it
|
||||||
'title' => $this->lang->words[$data['app_public_title']] ? $this->lang->words[$data['app_public_title']] : $data['app_public_title'] );
|
'title' => $this->lang->words[$data['app_public_title']] ? $this->lang->words[$data['app_public_title']] : $data['app_public_title'] );
|
||||||
}
|
#}
|
||||||
|
|
||||||
if ( is_file( IPSLib::getAppDir( $dir ) . '/extensions/coreVariables.php' ) )
|
if ( is_file( IPSLib::getAppDir( $dir ) . '/extensions/coreVariables.php' ) )
|
||||||
{
|
{
|
||||||
@@ -2648,11 +2815,11 @@ XML;
|
|||||||
*/
|
*/
|
||||||
protected function _getHasExtensionItemMarking( $appDir )
|
protected function _getHasExtensionItemMarking( $appDir )
|
||||||
{
|
{
|
||||||
if ( is_file( IPSLib::getAppDir( $appDir ) . '/extensions/coreExtensions.php' ) )
|
$_file = IPSLib::getAppDir( $appDir ) . '/extensions/coreExtensions.php';
|
||||||
|
if ( is_file( $_file ) )
|
||||||
{
|
{
|
||||||
require_once( IPSLib::getAppDir( $appDir ) . '/extensions/coreExtensions.php' );/*noLibHook*/
|
$classToLoad = IPSLib::loadLibrary( $_file, 'itemMarking__'.$appDir, $appDir );
|
||||||
|
if ( class_exists( $classToLoad ) )
|
||||||
if ( class_exists( 'itemMarking__' . $appDir ) )
|
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -2794,7 +2961,7 @@ XML;
|
|||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
|
|
||||||
$this->DB->build( array( 'select' => '*', 'from' => 'core_sys_module', 'order' => 'sys_module_position ASC' ) );
|
$this->DB->build( array( 'select' => '*', 'from' => 'core_sys_module', 'where' => 'sys_module_visible=1 AND sys_module_admin=1', 'order' => 'sys_module_position ASC' ) );
|
||||||
$this->DB->execute();
|
$this->DB->execute();
|
||||||
|
|
||||||
while ( $module = $this->DB->fetch() )
|
while ( $module = $this->DB->fetch() )
|
||||||
|
|||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Blog Application
|
* Blog Application
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 27th Aug 2004
|
* @since 27th Aug 2004
|
||||||
* @version $Revision: 8644 $
|
* @version $Revision: 10914 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -37,6 +37,6 @@ class admin_core_applications_blog extends ipsCommand
|
|||||||
{
|
{
|
||||||
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
|
||||||
|
|
||||||
$this->registry->output->showInsideIframe("http://myipb.in/products/blog/");
|
$this->registry->output->showInsideIframe("http://external.ipslink.com/ipboard30/landing/?p=blog");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,18 +2,18 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Blog Application
|
* Blog Application
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Revision: 8644 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -34,6 +34,6 @@ class admin_core_applications_ccs extends ipsCommand
|
|||||||
{
|
{
|
||||||
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
|
||||||
|
|
||||||
$this->registry->output->showInsideIframe("http://myipb.in/products/content/");
|
$this->registry->output->showInsideIframe("http://www.invisionpower.com/products/content/");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Download Manager Application
|
* Download Manager Application
|
||||||
* Last Updated: $Date: 2011-05-11 12:57:46 -0400 (Wed, 11 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 17 February 2003
|
* @since 17 February 2003
|
||||||
* @version $Revision: 8727 $
|
* @version $Revision: 10914 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
* @file defaultSection.php Define the default section for the 'applications' module
|
* @file defaultSection.php Define the default section for the 'applications' module
|
||||||
*~TERABYTE_DOC_READY~
|
*~TERABYTE_DOC_READY~
|
||||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* $License: This is NULLED!
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* $Author: ips_terabyte $
|
* $Author: ips_terabyte $
|
||||||
* @since 20th February 2002
|
* @since 20th February 2002
|
||||||
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
||||||
* @version v3.2.3
|
* @version v3.3.4
|
||||||
* $Revision: 8655 $
|
* $Revision: 8655 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Download Manager Application
|
* Download Manager Application
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since Who knows...
|
* @since Who knows...
|
||||||
* @version $Revision: 8644 $
|
* @version $Revision: 10914 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -37,6 +37,6 @@ class admin_core_applications_downloads extends ipsCommand
|
|||||||
{
|
{
|
||||||
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
|
||||||
|
|
||||||
$this->registry->output->showInsideIframe("http://myipb.in/products/downloads/");
|
$this->registry->output->showInsideIframe("http://www.invisionpower.com/products/downloads/");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Gallery Application
|
* Gallery Application
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since Who knows...
|
* @since Who knows...
|
||||||
* @version $Revision: 8644 $
|
* @version $Revision: 10914 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -37,6 +37,6 @@ class admin_core_applications_gallery extends ipsCommand
|
|||||||
{
|
{
|
||||||
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
|
||||||
|
|
||||||
$this->registry->output->showInsideIframe("http://myipb.in/products/gallery/");
|
$this->registry->output->showInsideIframe("http://www.invisionpower.com/products/gallery/");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,19 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Hooks Management
|
* Hooks Management
|
||||||
* Last Updated: $Date: 2011-10-07 22:31:51 -0400 (Fri, 07 Oct 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
* @version $Revision: 9588 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -305,7 +305,6 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false )
|
if( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false )
|
||||||
{
|
{
|
||||||
$ajax->returnString( $this->lang->words['postform_badmd5'] );
|
$ajax->returnString( $this->lang->words['postform_badmd5'] );
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -329,8 +328,7 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
|
|
||||||
$this->rebuildHooksCache();
|
$this->rebuildHooksCache();
|
||||||
|
|
||||||
$ajax->returnString( 'OK' );
|
$ajax->returnString('OK');
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -373,10 +371,7 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
$skinCaching->flagSetForRecache();
|
$skinCaching->flagSetForRecache();
|
||||||
|
|
||||||
/* Redirect */
|
/* Redirect */
|
||||||
$_msg = $this->registry->output->global_message;
|
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' );
|
||||||
$this->registry->output->global_message = '';
|
|
||||||
|
|
||||||
$this->registry->output->redirect( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview', $_msg );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -575,7 +570,8 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
// Set the custom script
|
// Set the custom script
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$custom = array();
|
$custom = array();
|
||||||
|
$customClass = null;
|
||||||
|
|
||||||
foreach( $xml->fetchElements('hookextras_custom') as $node )
|
foreach( $xml->fetchElements('hookextras_custom') as $node )
|
||||||
{
|
{
|
||||||
@@ -592,6 +588,26 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Got any custom file to initialize? */
|
||||||
|
if ( $custom['filename'] && $custom['source'] )
|
||||||
|
{
|
||||||
|
# Our dirty trick to avoid saving the file on disk just yet...
|
||||||
|
$_custom = preg_replace( '#^(\s*)<\?(php)+#i', '', $custom['source'] );
|
||||||
|
eval($_custom);
|
||||||
|
|
||||||
|
$classname = str_replace( '.php', '', $custom['filename'] );
|
||||||
|
|
||||||
|
if( class_exists( $classname ) )
|
||||||
|
{
|
||||||
|
$customClass = new $classname( $this->registry );
|
||||||
|
|
||||||
|
if( method_exists( $customClass, 'pre_install' ) )
|
||||||
|
{
|
||||||
|
$customClass->pre_install();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Set the settings
|
// Set the settings
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -655,7 +671,7 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
'word_key' => $langbit['word_key'],
|
'word_key' => $langbit['word_key'],
|
||||||
'word_default' => $langbit['word_default'],
|
'word_default' => $langbit['word_default'],
|
||||||
'word_custom' => $langbit['word_custom'],
|
'word_custom' => $langbit['word_custom'],
|
||||||
'word_js' => $langbit['word_js'],
|
'word_js' => intval($langbit['word_js']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -759,6 +775,24 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Set the Replacements
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$replacements = array();
|
||||||
|
|
||||||
|
foreach( $xml->fetchElements('hookextras_replacements') as $node )
|
||||||
|
{
|
||||||
|
foreach( $xml->fetchElements('replacements', $node) as $_r )
|
||||||
|
{
|
||||||
|
$_r = $xml->fetchElementsFromRecord( $_r );
|
||||||
|
$replacements[] = array(
|
||||||
|
'replacement_key' => $_r['replacement_key'],
|
||||||
|
'replacement_content' => $_r['replacement_content'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Set the tasks
|
// Set the tasks
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -882,19 +916,8 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
$insertQueries = 0;
|
$insertQueries = 0;
|
||||||
$cssInserted = 0;
|
$cssInserted = 0;
|
||||||
$cssUpdated = 0;
|
$cssUpdated = 0;
|
||||||
|
$replacementsInserted = 0;
|
||||||
//-----------------------------------------
|
$replacementsUpdated = 0;
|
||||||
// Need to recache skins?
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
foreach( $files as $_f )
|
|
||||||
{
|
|
||||||
if ( $_f['hook_type'] AND $_f['hook_type'] == 'templateHooks' )
|
|
||||||
{
|
|
||||||
$templateHooks = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Insert/update DB records
|
// Insert/update DB records
|
||||||
@@ -965,6 +988,12 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
|
|
||||||
$this->DB->insert( 'core_hooks_files', $file );
|
$this->DB->insert( 'core_hooks_files', $file );
|
||||||
$filesInserted++;
|
$filesInserted++;
|
||||||
|
|
||||||
|
/* Need to recache skins? */
|
||||||
|
if ( $file['hook_type'] == 'templateHooks' )
|
||||||
|
{
|
||||||
|
$templateHooks = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -972,10 +1001,12 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
// Put custom install/uninstall file
|
// Put custom install/uninstall file
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
if( $custom['source'] AND $custom['filename'] )
|
if( is_object($customClass) )
|
||||||
{
|
{
|
||||||
file_put_contents( IPS_HOOKS_PATH . "install_" . $custom['filename'], $custom['source'] );
|
$extra_data['display']['custom'] = $custom['filename'];
|
||||||
chmod( IPS_HOOKS_PATH . "install_" . $custom['filename'], IPS_FILE_PERMISSION );
|
|
||||||
|
file_put_contents( IPS_HOOKS_PATH . 'install_' . $custom['filename'], $custom['source'] );
|
||||||
|
chmod( IPS_HOOKS_PATH . 'install_' . $custom['filename'], IPS_FILE_PERMISSION );
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -1199,7 +1230,7 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
{
|
{
|
||||||
$this->DB->insert( 'core_sys_module', $module );
|
$this->DB->insert( 'core_sys_module', $module );
|
||||||
$modulesInserted++;
|
$modulesInserted++;
|
||||||
$module_id = $this->DB->getInsertId();
|
|
||||||
$extra_data['modules'][] = ( $module['sys_module_admin'] ? 'admin' : 'public' ) . '-' . $module['sys_module_application'] . '-' . $module['sys_module_key'];
|
$extra_data['modules'][] = ( $module['sys_module_admin'] ? 'admin' : 'public' ) . '-' . $module['sys_module_application'] . '-' . $module['sys_module_key'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1348,6 +1379,44 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Skin Replacements
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
if( count( $replacements ) )
|
||||||
|
{
|
||||||
|
$bits = array();
|
||||||
|
|
||||||
|
$this->DB->build( array( 'select' => 'replacement_master_key, replacement_key', 'from' => 'skin_replacements' ) );
|
||||||
|
$this->DB->execute();
|
||||||
|
|
||||||
|
while( $r = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
$bits[ $r['replacement_master_key'] ][ $r['replacement_key'] ] = $r['replacement_key'];
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach( $replacements as $entry )
|
||||||
|
{
|
||||||
|
if ( !isset( $bits[ $entry['replacement_master_key'] ] ) )
|
||||||
|
{
|
||||||
|
$entry['replacement_master_key'] = 'root';
|
||||||
|
}
|
||||||
|
|
||||||
|
if( in_array( $entry['replacement_key'], $bits[ $entry['replacement_master_key'] ] ) )
|
||||||
|
{
|
||||||
|
$this->DB->update( 'skin_replacements', $entry, "replacement_master_key='{$entry['replacement_master_key']}' AND replacement_key='{$entry['replacement_key']}'" );
|
||||||
|
$replacementsUpdated++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->DB->insert( 'skin_replacements', $entry );
|
||||||
|
$replacementsInserted++;
|
||||||
|
|
||||||
|
$extra_data['replacements'][ $entry['replacement_key'] ] = $entry['replacement_key'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// (7) Tasks
|
// (7) Tasks
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -1491,23 +1560,13 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if( $custom['filename'] AND is_file( IPS_HOOKS_PATH . 'install_' . $custom['filename'] ) )
|
/* Got an install function to run too? */
|
||||||
|
if( is_object($customClass) )
|
||||||
{
|
{
|
||||||
require_once( IPS_HOOKS_PATH . 'install_' . $custom['filename'] );/*noLibHook*/
|
if( method_exists( $customClass, 'install' ) )
|
||||||
|
|
||||||
$classname = str_replace( '.php', '', $custom['filename'] );
|
|
||||||
|
|
||||||
if( class_exists( $classname ) )
|
|
||||||
{
|
{
|
||||||
$install = new $classname( $this->registry );
|
$customClass->install();
|
||||||
|
|
||||||
if( method_exists( $install, 'install' ) )
|
|
||||||
{
|
|
||||||
$install->install();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$extra_data['display']['custom'] = $custom['filename'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( count($extra_data) )
|
if( count($extra_data) )
|
||||||
@@ -1530,9 +1589,8 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
if ( $addMessage )
|
if ( $addMessage )
|
||||||
{
|
{
|
||||||
$_tempMsg = <<<EOF
|
$_tempMsg = <<<EOF
|
||||||
{$this->lang->words['h_followacts']}
|
<strong>{$this->lang->words['h_newhookin']}</strong>
|
||||||
<ul>
|
<ul>
|
||||||
<li>{$this->lang->words['h_newhookin']}</li>
|
|
||||||
<li>{$filesInserted} {$this->lang->words['h_filesin']}</li>
|
<li>{$filesInserted} {$this->lang->words['h_filesin']}</li>
|
||||||
<li>{$settingGroupsInserted} {$this->lang->words['h_settinggin']}</li>
|
<li>{$settingGroupsInserted} {$this->lang->words['h_settinggin']}</li>
|
||||||
<li>{$settingsInserted} {$this->lang->words['h_settingin']}</li>
|
<li>{$settingsInserted} {$this->lang->words['h_settingin']}</li>
|
||||||
@@ -1547,6 +1605,8 @@ class admin_core_applications_hooks extends ipsCommand
|
|||||||
<li>{$templatesUpdated} {$this->lang->words['h_tempup']}</li>
|
<li>{$templatesUpdated} {$this->lang->words['h_tempup']}</li>
|
||||||
<li>{$cssInserted} {$this->lang->words['h_cssin']}</li>
|
<li>{$cssInserted} {$this->lang->words['h_cssin']}</li>
|
||||||
<li>{$cssUpdated} {$this->lang->words['h_cssup']}</li>
|
<li>{$cssUpdated} {$this->lang->words['h_cssup']}</li>
|
||||||
|
<li>{$replacementsInserted} {$this->lang->words['h_replacementsin']}</li>
|
||||||
|
<li>{$replacementsUpdated} {$this->lang->words['h_replacementsup']}</li>
|
||||||
<li>{$tasksInserted} {$this->lang->words['h_taskin']}</li>
|
<li>{$tasksInserted} {$this->lang->words['h_taskin']}</li>
|
||||||
<li>{$tasksUpdated} {$this->lang->words['h_taskup']}</li>
|
<li>{$tasksUpdated} {$this->lang->words['h_taskup']}</li>
|
||||||
<li>{$createQueries} {$this->lang->words['h_dbcreated']}</li>
|
<li>{$createQueries} {$this->lang->words['h_dbcreated']}</li>
|
||||||
@@ -1640,7 +1700,7 @@ EOF;
|
|||||||
$files = array();
|
$files = array();
|
||||||
$index = 1;
|
$index = 1;
|
||||||
|
|
||||||
$this->DB->build( array( 'select' => '*', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . $id ) );
|
$this->DB->build( array( 'select' => '*', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . $id, 'order' => 'hook_file_id ASC' ) );
|
||||||
$this->DB->execute();
|
$this->DB->execute();
|
||||||
|
|
||||||
while( $r = $this->DB->fetch() )
|
while( $r = $this->DB->fetch() )
|
||||||
@@ -1701,7 +1761,7 @@ EOF;
|
|||||||
|
|
||||||
$source = is_file( IPS_HOOKS_PATH . $r['hook_file_stored'] ) ? file_get_contents( IPS_HOOKS_PATH . $r['hook_file_stored'] ) : '';
|
$source = is_file( IPS_HOOKS_PATH . $r['hook_file_stored'] ) ? file_get_contents( IPS_HOOKS_PATH . $r['hook_file_stored'] ) : '';
|
||||||
|
|
||||||
if( $r['hook_type'] == 'commandHooks' || $r['hook_type'] == 'libraryHooks' )
|
if ( !empty($source) && in_array( $r['hook_type'], array( 'skinHooks', 'commandHooks', 'libraryHooks' ) ) )
|
||||||
{
|
{
|
||||||
$source = $this->_cleanSource( $source );
|
$source = $this->_cleanSource( $source );
|
||||||
}
|
}
|
||||||
@@ -1960,6 +2020,27 @@ EOF;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Replacements
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$xml->addElement( 'hookextras_replacements', 'hookexport' );
|
||||||
|
|
||||||
|
if( is_array( $extra_data['replacements'] ) AND count ( $extra_data['replacements'] ) )
|
||||||
|
{
|
||||||
|
$this->DB->build( array( 'select' => '*', 'from' => 'skin_replacements', 'where' => "replacement_key IN('" . implode( "','", $extra_data['replacements'] ) . "')", 'group' => 'replacement_key' ) );
|
||||||
|
|
||||||
|
$this->DB->execute();
|
||||||
|
|
||||||
|
while( $r = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
unset($r['replacement_id']);
|
||||||
|
unset($r['replacement_set_id']);
|
||||||
|
|
||||||
|
$xml->addElementAsRecord( 'hookextras_replacements', 'replacements', $r );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Tasks
|
// Tasks
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -2139,6 +2220,24 @@ EOF;
|
|||||||
return ( strpos( $return, '0' ) === 0 || strpos( $return, '1' ) === 0 ) ? explode( '|', $return ) : array( 0 );
|
return ( strpos( $return, '0' ) === 0 || strpos( $return, '1' ) === 0 ) ? explode( '|', $return ) : array( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sorts hooks by their position
|
||||||
|
* (this is used to avoid a mysql filesort)
|
||||||
|
*
|
||||||
|
* @param array $a First hook data
|
||||||
|
* @param array $b Second hook data
|
||||||
|
* @return @e integer
|
||||||
|
*/
|
||||||
|
protected function sortHooksByPosition( $a, $b )
|
||||||
|
{
|
||||||
|
if ( $a['hook_position'] == $b['hook_position'] )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ( $a['hook_position'] < $b['hook_position'] ) ? -1 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hooks overview
|
* Hooks overview
|
||||||
*
|
*
|
||||||
@@ -2147,14 +2246,16 @@ EOF;
|
|||||||
public function _hooksOverview()
|
public function _hooksOverview()
|
||||||
{
|
{
|
||||||
/* INI */
|
/* INI */
|
||||||
$installedHooks = array();
|
$hooksFound = array( 'installed' => array(), 'uninstalled' => array() );
|
||||||
$uninstalledHooks = array();
|
|
||||||
$hookwarnings = 0;
|
$hookwarnings = 0;
|
||||||
$hookUpdates = 0;
|
$hookUpdates = 0;
|
||||||
$checkUpdates = !empty( $this->request['checkUpdates'] ) ? true : false;
|
$checkUpdates = !empty( $this->request['checkUpdates'] ) ? true : false;
|
||||||
|
$message = '';
|
||||||
|
$confGroupIdsToLoad = array();
|
||||||
|
$confGroupKeysToLoad= array();
|
||||||
|
|
||||||
/* Get current hooks */
|
/* Get current hooks */
|
||||||
$this->DB->build( array( 'select' => '*', 'from' => 'core_hooks', 'order' => 'hook_position ASC' ) );
|
$this->DB->build( array( 'select' => '*', 'from' => 'core_hooks' ) );
|
||||||
$outer = $this->DB->execute();
|
$outer = $this->DB->execute();
|
||||||
|
|
||||||
while( $r = $this->DB->fetch($outer) )
|
while( $r = $this->DB->fetch($outer) )
|
||||||
@@ -2178,6 +2279,33 @@ EOF;
|
|||||||
$r['hook_update_available'] = array( 0 );
|
$r['hook_update_available'] = array( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Got some setting groups to take care of? */
|
||||||
|
$r['_has_setting_links'] = null;
|
||||||
|
$r['_hook_extra_data'] = IPSLib::isSerialized($r['hook_extra_data']) ? unserialize($r['hook_extra_data']) : array();
|
||||||
|
|
||||||
|
if ( is_array($r['_hook_extra_data']['settingGroups']) && count($r['_hook_extra_data']['settingGroups']) )
|
||||||
|
{
|
||||||
|
$r['_has_setting_links'] = array();
|
||||||
|
|
||||||
|
foreach( $r['_hook_extra_data']['settingGroups'] as $_group )
|
||||||
|
{
|
||||||
|
$confGroupKeysToLoad[ $_group ] = $_group;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( is_array($r['_hook_extra_data']['settings']) && count($r['_hook_extra_data']['settings']) )
|
||||||
|
{
|
||||||
|
$r['_has_setting_links'] = array();
|
||||||
|
|
||||||
|
$this->DB->build( array( 'select' => 'conf_group, conf_key', 'from' => 'core_sys_conf_settings', 'where' => "conf_key IN ('" . implode( "','", $r['_hook_extra_data']['settings'] ) . "')" ) );
|
||||||
|
$this->DB->execute();
|
||||||
|
|
||||||
|
while( $hsg = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
$confGroupIdsToLoad[ $hsg['conf_key'] ] = $hsg['conf_group'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Check requirements */
|
/* Check requirements */
|
||||||
$r['_require_errors'] = $this->checkHookRequirements( $r );
|
$r['_require_errors'] = $this->checkHookRequirements( $r );
|
||||||
|
|
||||||
@@ -2189,23 +2317,89 @@ EOF;
|
|||||||
$hookwarnings++;
|
$hookwarnings++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$installedHooks[ $r['hook_id'] ] = $r;
|
$hooksFound['installed'][ $r['hook_id'] ] = $r;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$uninstalledHooks[ $r['hook_id'] ] = $r;
|
$hooksFound['uninstalled'][ $r['hook_id'] ] = $r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Got groups to load? */
|
||||||
|
$where = array();
|
||||||
|
|
||||||
|
if ( count($confGroupKeysToLoad) )
|
||||||
|
{
|
||||||
|
$where[] = "conf_title_keyword IN ('" . implode( "','", $confGroupKeysToLoad ) . "')";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( count($confGroupIdsToLoad) )
|
||||||
|
{
|
||||||
|
$where[] = "conf_title_id IN (" . implode( ",", $confGroupIdsToLoad ) . ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( count($where) )
|
||||||
|
{
|
||||||
|
$confGroupsLoaded = array();
|
||||||
|
|
||||||
|
$this->DB->build( array( 'select' => '*', 'from' => 'core_sys_settings_titles', 'where' => implode( ' OR ', $where ) ) );
|
||||||
|
$this->DB->execute();
|
||||||
|
|
||||||
|
while( $gr = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
if ( empty($gr['conf_title_noshow']) )
|
||||||
|
{
|
||||||
|
$confGroupsLoaded['ids'][ $gr['conf_title_id'] ] = $gr;
|
||||||
|
$confGroupsLoaded['keys'][ $gr['conf_title_keyword'] ] = & $confGroupsLoaded['ids'][ $gr['conf_title_id'] ];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Merge back the data */
|
||||||
|
foreach( $hooksFound as $rk => $rt )
|
||||||
|
{
|
||||||
|
foreach( $rt as $sk => $st )
|
||||||
|
{
|
||||||
|
if ( is_array($st['_has_setting_links']) )
|
||||||
|
{
|
||||||
|
if ( is_array($st['_hook_extra_data']['settingGroups']) && count($st['_hook_extra_data']['settingGroups']) )
|
||||||
|
{
|
||||||
|
foreach( $st['_hook_extra_data']['settingGroups'] as $_group )
|
||||||
|
{
|
||||||
|
if ( isset($confGroupsLoaded['keys'][ $_group ]) )
|
||||||
|
{
|
||||||
|
$hooksFound[ $rk ][ $sk ]['_has_setting_links'][ $confGroupsLoaded['keys'][ $_group ]['conf_title_id'] ] = $confGroupsLoaded['keys'][ $_group ]['conf_title_title'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( is_array($st['_hook_extra_data']['settings']) && count($st['_hook_extra_data']['settings']) )
|
||||||
|
{
|
||||||
|
foreach( $st['_hook_extra_data']['settings'] as $_id )
|
||||||
|
{
|
||||||
|
if ( isset($confGroupsLoaded['ids'][ $confGroupIdsToLoad[ $_id ] ]) )
|
||||||
|
{
|
||||||
|
$hooksFound[ $rk ][ $sk ]['_has_setting_links'][ $confGroupIdsToLoad[ $_id ] ] = $confGroupsLoaded['ids'][ $confGroupIdsToLoad[ $_id ] ]['conf_title_title'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Got updates to show? */
|
/* Got updates to show? */
|
||||||
$message = NULL;
|
|
||||||
if ( $checkUpdates === true )
|
if ( $checkUpdates === true )
|
||||||
{
|
{
|
||||||
$message = ( $hookUpdates == 1 ) ? $this->lang->words['updates_string_single'] : sprintf( $this->lang->words['updates_string_more'], $hookUpdates );
|
$message = ( $hookUpdates == 1 ) ? $this->lang->words['updates_string_single'] : sprintf( $this->lang->words['updates_string_more'], $hookUpdates );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( count($hooksFound['installed']) )
|
||||||
|
{
|
||||||
|
uasort( $hooksFound['installed'], array( $this, 'sortHooksByPosition' ) );
|
||||||
|
}
|
||||||
|
|
||||||
/* Output */
|
/* Output */
|
||||||
$this->registry->output->html .= $this->html->hooksOverview( $installedHooks, $uninstalledHooks, $hookwarnings, $message );
|
$this->registry->output->html .= $this->html->hooksOverview( $hooksFound, $hookwarnings, $message );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2230,7 +2424,7 @@ EOF;
|
|||||||
/* Make sure there were active hooks */
|
/* Make sure there were active hooks */
|
||||||
if( ! count( $activeHookIds ) )
|
if( ! count( $activeHookIds ) )
|
||||||
{
|
{
|
||||||
$this->registry->output->global_message = $this->lang->words['hook_disable_all_none'];;
|
$this->registry->output->global_message = $this->lang->words['hook_disable_all_none'];
|
||||||
$this->_hooksOverview();
|
$this->_hooksOverview();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2262,7 +2456,7 @@ EOF;
|
|||||||
/* Make sure there were active hooks */
|
/* Make sure there were active hooks */
|
||||||
if( ! count( $activeHookIds ) )
|
if( ! count( $activeHookIds ) )
|
||||||
{
|
{
|
||||||
$this->registry->output->global_message = $this->lang->words['hook_disable_all_none'];
|
$this->registry->output->global_message = $this->lang->words['hook_enable_all_none'];
|
||||||
$this->_hooksOverview();
|
$this->_hooksOverview();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2279,7 +2473,7 @@ EOF;
|
|||||||
/* Flag skins for recache */
|
/* Flag skins for recache */
|
||||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
|
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
|
||||||
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
|
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
|
||||||
$skinCaching = new skinCaching( $this->registry );
|
$skinCaching = new skinCaching( $this->registry );
|
||||||
|
|
||||||
/* Flag all for recache */
|
/* Flag all for recache */
|
||||||
$skinCaching->flagSetForRecache();
|
$skinCaching->flagSetForRecache();
|
||||||
@@ -2312,7 +2506,7 @@ EOF;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Do update */
|
/* Do update */
|
||||||
$this->DB->update( 'core_hooks', array( 'hook_enabled' => 0 ), "hook_id={$hookData['hook_id']}" );
|
$this->DB->update( 'core_hooks', array( 'hook_enabled' => 0, 'hook_position' => 0 ), "hook_id={$hookData['hook_id']}" );
|
||||||
|
|
||||||
/* Rebuild cache */
|
/* Rebuild cache */
|
||||||
$this->rebuildHooksCache();
|
$this->rebuildHooksCache();
|
||||||
@@ -2331,7 +2525,7 @@ EOF;
|
|||||||
$skinCaching->flagSetForRecache();
|
$skinCaching->flagSetForRecache();
|
||||||
|
|
||||||
/* Redirect */
|
/* Redirect */
|
||||||
$this->registry->output->global_message = $this->lang->words['hook_disabled'];
|
$this->registry->output->setMessage( $this->lang->words['h_hasbeendisabled'] );
|
||||||
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' );
|
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2399,7 +2593,7 @@ EOF;
|
|||||||
*/
|
*/
|
||||||
protected function _uninstallHook()
|
protected function _uninstallHook()
|
||||||
{
|
{
|
||||||
/* INI */
|
/* Init vars */
|
||||||
$hook_id = intval( $this->request['id'] );
|
$hook_id = intval( $this->request['id'] );
|
||||||
|
|
||||||
$hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $hook_id ) );
|
$hook = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_hooks', 'where' => 'hook_id=' . $hook_id ) );
|
||||||
@@ -2411,6 +2605,32 @@ EOF;
|
|||||||
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' );
|
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&do=hooks_overview' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Got any custom file to initialize? */
|
||||||
|
$_customFile = '';
|
||||||
|
$customClass = null;
|
||||||
|
|
||||||
|
if ( $extra_data['display']['custom'] )
|
||||||
|
{
|
||||||
|
$_customFile = IPS_HOOKS_PATH . 'install_' . $extra_data['display']['custom'];
|
||||||
|
|
||||||
|
if( is_file( $_customFile ) )
|
||||||
|
{
|
||||||
|
require_once( $_customFile );/*noLibHook*/
|
||||||
|
|
||||||
|
$classname = str_replace( '.php', '', $extra_data['display']['custom'] );
|
||||||
|
|
||||||
|
if( class_exists( $classname ) )
|
||||||
|
{
|
||||||
|
$customClass = new $classname( $this->registry );
|
||||||
|
|
||||||
|
if( method_exists( $customClass, 'pre_uninstall' ) )
|
||||||
|
{
|
||||||
|
$customClass->pre_uninstall();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Get associated files */
|
/* Get associated files */
|
||||||
$this->DB->build( array( 'select' => 'hook_file_stored', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . $hook_id ) );
|
$this->DB->build( array( 'select' => 'hook_file_stored', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . $hook_id ) );
|
||||||
$this->DB->execute();
|
$this->DB->execute();
|
||||||
@@ -2607,26 +2827,14 @@ EOF;
|
|||||||
// Custom install/uninstall script?
|
// Custom install/uninstall script?
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
if( $extra_data['display']['custom'] )
|
if ( $_customFile )
|
||||||
{
|
{
|
||||||
if( is_file( IPS_HOOKS_PATH . 'install_' . $extra_data['display']['custom'] ) )
|
if( is_object($customClass) && method_exists( $customClass, 'uninstall' ) )
|
||||||
{
|
{
|
||||||
require_once( IPS_HOOKS_PATH . 'install_' . $extra_data['display']['custom'] );/*noLibHook*/
|
$customClass->uninstall();
|
||||||
|
|
||||||
$classname = str_replace( '.php', '', $extra_data['display']['custom'] );
|
|
||||||
|
|
||||||
if( class_exists( $classname ) )
|
|
||||||
{
|
|
||||||
$uninstall = new $classname( $this->registry );
|
|
||||||
|
|
||||||
if( method_exists( $uninstall, 'uninstall' ) )
|
|
||||||
{
|
|
||||||
$uninstall->uninstall();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@unlink( IPS_HOOKS_PATH . 'install_' . $extra_data['display']['custom'] );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@unlink( $_customFile );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Delete main hook entry */
|
/* Delete main hook entry */
|
||||||
@@ -2696,9 +2904,36 @@ EOF;
|
|||||||
|
|
||||||
if ( is_array($hookData['hook_requirements']['required_applications']) && count($hookData['hook_requirements']['required_applications']) )
|
if ( is_array($hookData['hook_requirements']['required_applications']) && count($hookData['hook_requirements']['required_applications']) )
|
||||||
{
|
{
|
||||||
|
/* Get the setup class */
|
||||||
|
require_once( IPS_ROOT_PATH . 'setup/sources/base/setup.php' );/*noLibHook*/
|
||||||
|
|
||||||
foreach( $hookData['hook_requirements']['required_applications'] as $appKey => $versionData )
|
foreach( $hookData['hook_requirements']['required_applications'] as $appKey => $versionData )
|
||||||
{
|
{
|
||||||
$requirements[ $appKey ] = $versionData;
|
/* Fetch and check versions */
|
||||||
|
if ( !isset($this->cachedVersions[ $appKey ]) )
|
||||||
|
{
|
||||||
|
$this->cachedVersions[ $appKey ] = IPSSetUp::fetchXmlAppVersions( $appKey );
|
||||||
|
}
|
||||||
|
|
||||||
|
$_versions = $this->cachedVersions[ $appKey ];
|
||||||
|
|
||||||
|
krsort($_versions);
|
||||||
|
|
||||||
|
/* Setup our default 'no version' value */
|
||||||
|
$versions = array( array( 0, $this->lang->words['h_any_version'] ) );
|
||||||
|
|
||||||
|
foreach( $_versions as $long => $human )
|
||||||
|
{
|
||||||
|
if ( $long < 30000 && in_array( $appKey, array( 'core', 'forums', 'members' ) ) )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$versions[] = array( $long, $human );
|
||||||
|
}
|
||||||
|
|
||||||
|
$versionData['_versions'] = $versions;
|
||||||
|
$requirements[ $appKey ] = $versionData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2741,30 +2976,19 @@ EOF;
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Format data for adding an hook.. */
|
|
||||||
/*foreach( array( 'hook_name', 'hook_desc', 'hook_key', 'hook_version_human', 'hook_version_long', 'hook_author', 'hook_email', 'hook_website', 'hook_update_check' ) as $_hook )
|
|
||||||
{
|
|
||||||
$hookData[ $_hook ] = $this->request[ $_hook ];
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach( array( 'hook_php_version_min', 'hook_php_version_max' ) as $_version )
|
|
||||||
{
|
|
||||||
$hookData['hook_requirements'][ $_version ] = $this->request[ $_version ];
|
|
||||||
}*/
|
|
||||||
|
|
||||||
$action = 'do_create_hook';
|
$action = 'do_create_hook';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Info */
|
/* Info */
|
||||||
foreach( array( 'hook_name', 'hook_desc', 'hook_key', 'hook_version_human', 'hook_version_long', 'hook_author', 'hook_email', 'hook_website', 'hook_update_check' ) as $_hook_key )
|
foreach( array( 'hook_name', 'hook_desc', 'hook_key', 'hook_version_human', 'hook_version_long', 'hook_author', 'hook_email', 'hook_website', 'hook_update_check' ) as $_hook_key )
|
||||||
{
|
{
|
||||||
$form[ $_hook_key ] = $this->registry->output->formSimpleInput( $_hook_key , isset($_POST[ $_hook_key ]) ? $_POST[ $_hook_key ] : $hookData[ $_hook_key ], 60 );
|
$form[ $_hook_key ] = $this->registry->output->formSimpleInput( $_hook_key , isset($this->request[ $_hook_key ]) ? $this->request[ $_hook_key ] : $hookData[ $_hook_key ], 60 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Requirements */
|
/* Requirements */
|
||||||
foreach( array( 'hook_php_version_min', 'hook_php_version_max' ) as $_version_key )
|
foreach( array( 'hook_php_version_min', 'hook_php_version_max' ) as $_version_key )
|
||||||
{
|
{
|
||||||
$form[ $_version_key ] = $this->registry->output->formSimpleInput( $_version_key , isset($_POST[ $_version_key ]) ? $_POST[ $_version_key ] : $hookData['hook_requirements'][ $_version_key ], 20 );
|
$form[ $_version_key ] = $this->registry->output->formSimpleInput( $_version_key , isset($this->request[ $_version_key ]) ? $this->request[ $_version_key ] : $hookData['hook_requirements'][ $_version_key ], 20 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Setup the global caches DD */
|
/* Setup the global caches DD */
|
||||||
@@ -2807,6 +3031,7 @@ EOF;
|
|||||||
$newFiles = array();
|
$newFiles = array();
|
||||||
$requireApp = array();
|
$requireApp = array();
|
||||||
$_hookFiles = array();
|
$_hookFiles = array();
|
||||||
|
$extraKey = '';
|
||||||
|
|
||||||
/* Get data if we are editing */
|
/* Get data if we are editing */
|
||||||
if( $type == 'edit' )
|
if( $type == 'edit' )
|
||||||
@@ -2824,6 +3049,8 @@ EOF;
|
|||||||
{
|
{
|
||||||
$this->registry->output->showError( $this->lang->words['h_noedit'], 1119 );
|
$this->registry->output->showError( $this->lang->words['h_noedit'], 1119 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$extraKey = ' AND hook_id != ' . $hookData['hook_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Error Checking */
|
/* Error Checking */
|
||||||
@@ -2832,13 +3059,30 @@ EOF;
|
|||||||
$errors[] = $this->lang->words['hook_form_no_title'];
|
$errors[] = $this->lang->words['hook_form_no_title'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! $this->request['hook_key'] )
|
if( empty( $this->request['hook_key'] ) )
|
||||||
{
|
{
|
||||||
$errors[] = $this->lang->words['hook_form_no_key'];
|
$errors[] = $this->lang->words['hook_form_no_key'];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$keyCheck = $this->DB->buildAndFetch( array( 'select' => 'count(*) as found', 'from' => 'core_hooks', 'where' => "hook_key='" . $this->DB->addSlashes( $this->request['hook_key'] ) . "'" . $extraKey ) );
|
||||||
|
|
||||||
|
if ( $keyCheck['found'] > 0 )
|
||||||
|
{
|
||||||
|
$errors[] = $this->lang->words['hook_form_dupe_key'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Got any errors? */
|
||||||
|
if ( is_array( $errors ) && count( $errors ) )
|
||||||
|
{
|
||||||
|
$this->registry->output->global_error = implode( '<br />', $errors );
|
||||||
|
$this->_hookForm();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Not IN_DEV? */
|
/* Not IN_DEV? */
|
||||||
if( !IN_DEV )
|
if ( ! IN_DEV )
|
||||||
{
|
{
|
||||||
$this->DB->build( array( 'select' => '*', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . intval($this->request['hook_id']) ) );
|
$this->DB->build( array( 'select' => '*', 'from' => 'core_hooks_files', 'where' => 'hook_hook_id=' . intval($this->request['hook_id']) ) );
|
||||||
$this->DB->execute();
|
$this->DB->execute();
|
||||||
@@ -2850,33 +3094,29 @@ EOF;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check for requirements */
|
/* Check for requirements */
|
||||||
if( is_array( $this->request['requireApp'] ) AND count( $this->request['requireApp'] ) )
|
if ( is_array( $this->request['requireApp'] ) AND count( $this->request['requireApp'] ) )
|
||||||
{
|
{
|
||||||
foreach( $this->request['requireApp'] as $_index => $require )
|
foreach( $this->request['requireApp'] as $_index => $app_key )
|
||||||
{
|
{
|
||||||
if( $require )
|
if ( $app_key )
|
||||||
{
|
{
|
||||||
$minVersion = intval($this->request['minVersion'][ $_index ]);/*noLibHook*/
|
$minVersion = intval($this->request['minVersion'][ $_index ]);
|
||||||
$maxVersion = intval($this->request['maxVersion'][ $_index ]);
|
$maxVersion = intval($this->request['maxVersion'][ $_index ]);
|
||||||
|
|
||||||
// Let's not require a version, we can simply force an app to be installed regardless this way
|
$requireApp[ $app_key ] = array( 'app_name' => ipsRegistry::$applications[ $app_key ]['app_title'],
|
||||||
//if ( $minVersion > 0 || $maxVersion > 0 )
|
'min_version' => $minVersion,
|
||||||
//{
|
'max_version' => $maxVersion
|
||||||
$requireApp[ $require ] = array( 'app_name' => ipsRegistry::$applications[ $require ]['app_title'],
|
);
|
||||||
'min_version' => $minVersion,
|
|
||||||
'max_version' => $maxVersion
|
|
||||||
);/*noLibHook*/
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for files */
|
/* Check for files */
|
||||||
if( is_array( $this->request['file'] ) AND count( $this->request['file'] ) )
|
if ( is_array( $this->request['file'] ) AND count( $this->request['file'] ) )
|
||||||
{
|
{
|
||||||
foreach( $this->request['file'] as $index => $file )
|
foreach( $this->request['file'] as $index => $file )
|
||||||
{
|
{
|
||||||
if( $file )
|
if ( $file )
|
||||||
{
|
{
|
||||||
$newFiles[ $index ] = array('hook_file_real' => $file,
|
$newFiles[ $index ] = array('hook_file_real' => $file,
|
||||||
'hook_type' => $this->request['hook_type'][ $index ],
|
'hook_type' => $this->request['hook_type'][ $index ],
|
||||||
@@ -2897,7 +3137,7 @@ EOF;
|
|||||||
* @link http://community.invisionpower.com/tracker/issue-22084-hook-edit-does-not-preserve-correct-name/
|
* @link http://community.invisionpower.com/tracker/issue-22084-hook-edit-does-not-preserve-correct-name/
|
||||||
* We don't want to reset the stored name if you are not in developer mode
|
* We don't want to reset the stored name if you are not in developer mode
|
||||||
*/
|
*/
|
||||||
if( IN_DEV )
|
if ( IN_DEV )
|
||||||
{
|
{
|
||||||
$newFiles[ $index ]['hook_file_stored'] = $file; // During import this is a random name, but for devs it's actual file
|
$newFiles[ $index ]['hook_file_stored'] = $file; // During import this is a random name, but for devs it's actual file
|
||||||
}
|
}
|
||||||
@@ -2909,15 +3149,17 @@ EOF;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( is_array( $errors ) )
|
/* Get position */
|
||||||
|
if ( $type == 'add' )
|
||||||
{
|
{
|
||||||
$this->registry->output->global_message = implode( '<br>', $errors );
|
$position = $this->DB->buildAndFetch( array( 'select' => 'MAX(hook_position) as newPos', 'from' => 'core_hooks' ) );
|
||||||
$this->_hookForm();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get new position */
|
$position['newPos'] = intval($position['newPos']) + 1;
|
||||||
$position = $this->DB->buildAndFetch( array( 'select' => 'MAX(hook_position) as newPos', 'from' => 'core_hooks' ) );
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$position['newPos'] = $hookData['hook_position'];
|
||||||
|
}
|
||||||
|
|
||||||
$mainHookRecord = array('hook_name' => trim($this->request['hook_name']),
|
$mainHookRecord = array('hook_name' => trim($this->request['hook_name']),
|
||||||
'hook_key' => substr( trim($this->request['hook_key']), 0, 32 ),
|
'hook_key' => substr( trim($this->request['hook_key']), 0, 32 ),
|
||||||
@@ -2932,7 +3174,7 @@ EOF;
|
|||||||
'hook_enabled' => $type == 'add' ? 1 : $hookData['hook_enabled'],
|
'hook_enabled' => $type == 'add' ? 1 : $hookData['hook_enabled'],
|
||||||
'hook_installed' => $type == 'add' ? IPS_UNIX_TIME_NOW : $hookData['hook_installed'],
|
'hook_installed' => $type == 'add' ? IPS_UNIX_TIME_NOW : $hookData['hook_installed'],
|
||||||
'hook_updated' => $type == 'add' ? 0 : IPS_UNIX_TIME_NOW,
|
'hook_updated' => $type == 'add' ? 0 : IPS_UNIX_TIME_NOW,
|
||||||
'hook_position' => $type == 'add' ? $position['newPos'] + 1 : $hookData['hook_position'],
|
'hook_position' => $position['newPos'],
|
||||||
'hook_requirements' => serialize( array('required_applications' => $requireApp,
|
'hook_requirements' => serialize( array('required_applications' => $requireApp,
|
||||||
'hook_php_version_min' => trim($this->request['hook_php_version_min']),
|
'hook_php_version_min' => trim($this->request['hook_php_version_min']),
|
||||||
'hook_php_version_max' => trim($this->request['hook_php_version_max'])
|
'hook_php_version_max' => trim($this->request['hook_php_version_max'])
|
||||||
@@ -3061,7 +3303,7 @@ EOF;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Requirements are still serialized? */
|
/* Requirements are still serialized? */
|
||||||
if ( !is_array($hookData['hook_requirements']) )
|
if ( IPSLib::isSerialized($hookData['hook_requirements']) )
|
||||||
{
|
{
|
||||||
$hookData['hook_requirements'] = unserialize($hookData['hook_requirements']);
|
$hookData['hook_requirements'] = unserialize($hookData['hook_requirements']);
|
||||||
}
|
}
|
||||||
@@ -3074,7 +3316,7 @@ EOF;
|
|||||||
{
|
{
|
||||||
$reqsData['hook_ipb_version_min'] = ( $reqsData['hook_ipb_version_min'] < 30000 ) ? 30000 : $reqsData['hook_ipb_version_min'];
|
$reqsData['hook_ipb_version_min'] = ( $reqsData['hook_ipb_version_min'] < 30000 ) ? 30000 : $reqsData['hook_ipb_version_min'];
|
||||||
|
|
||||||
$reqsData['required_applications']['core'] = array( 'min_version' => intval($reqsData['hook_ipb_version_min']), 'max_version' => intval($reqsData['hook_ipb_version_max']) );
|
$reqsData['required_applications']['core'] = array( 'min_version' => intval($reqsData['hook_ipb_version_min']), 'max_version' => intval($reqsData['hook_ipb_version_max']) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -3110,7 +3352,7 @@ EOF;
|
|||||||
$errors[ $appKey.'_app' ] = sprintf( $this->lang->words['hook_require_appnotfound'], $appData['app_name'] );
|
$errors[ $appKey.'_app' ] = sprintf( $this->lang->words['hook_require_appnotfound'], $appData['app_name'] );
|
||||||
}
|
}
|
||||||
/* App not installed/enabled? */
|
/* App not installed/enabled? */
|
||||||
elseif( !IPSLib::appIsInstalled( $appKey ) )
|
elseif ( !IPSLib::appIsInstalled( $appKey ) )
|
||||||
{
|
{
|
||||||
$errors[ $appKey.'_app' ] = sprintf( $this->lang->words['hook_require_appdisabled'], ipsRegistry::$applications[ $appKey ]['app_title'] );
|
$errors[ $appKey.'_app' ] = sprintf( $this->lang->words['hook_require_appdisabled'], ipsRegistry::$applications[ $appKey ]['app_title'] );
|
||||||
}
|
}
|
||||||
@@ -3126,7 +3368,7 @@ EOF;
|
|||||||
|
|
||||||
if ( is_array($versions) && count($versions) )
|
if ( is_array($versions) && count($versions) )
|
||||||
{
|
{
|
||||||
if( !isset($this->cachedUpgradeInfo[ $appKey ]) )
|
if ( !isset($this->cachedUpgradeInfo[ $appKey ]) )
|
||||||
{
|
{
|
||||||
$_key = in_array( $appKey, array( 'forums', 'members' ) ) ? 'core' : $appKey;
|
$_key = in_array( $appKey, array( 'forums', 'members' ) ) ? 'core' : $appKey;
|
||||||
$this->cachedUpgradeInfo[ $_key ] = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'upgrade_history', 'where' => "upgrade_app='{$_key}'", 'order' => 'upgrade_version_id DESC', 'limit' => array( 1 ) ) );
|
$this->cachedUpgradeInfo[ $_key ] = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'upgrade_history', 'where' => "upgrade_app='{$_key}'", 'order' => 'upgrade_version_id DESC', 'limit' => array( 1 ) ) );
|
||||||
@@ -3141,12 +3383,12 @@ EOF;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Do we meet tha requirements? */
|
/* Do we meet tha requirements? */
|
||||||
if( $appData['min_version'] AND $this->cachedUpgradeInfo[ $appKey ]['upgrade_version_id'] < $appData['min_version'] )
|
if ( $appData['min_version'] AND $this->cachedUpgradeInfo[ $appKey ]['upgrade_version_id'] < $appData['min_version'] )
|
||||||
{
|
{
|
||||||
$errors[ $appKey.'_min' ] = sprintf( $this->lang->words['hook_require_tooold'], isset($versions[ $appData['min_version'] ]) ? $versions[ $appData['min_version'] ] : $appData['min_version'] );
|
$errors[ $appKey.'_min' ] = sprintf( $this->lang->words['hook_require_tooold'], isset($versions[ $appData['min_version'] ]) ? $versions[ $appData['min_version'] ] : $appData['min_version'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $appData['max_version'] AND $this->cachedUpgradeInfo[ $appKey ]['upgrade_version_id'] > $appData['max_version'] )
|
if ( $appData['max_version'] AND $this->cachedUpgradeInfo[ $appKey ]['upgrade_version_id'] > $appData['max_version'] )
|
||||||
{
|
{
|
||||||
$errors[ $appKey.'_max' ] = sprintf( $this->lang->words['hook_require_toonew'], isset($versions[ $appData['max_version'] ]) ? $versions[ $appData['max_version'] ] : $appData['max_version'] );
|
$errors[ $appKey.'_max' ] = sprintf( $this->lang->words['hook_require_toonew'], isset($versions[ $appData['max_version'] ]) ? $versions[ $appData['max_version'] ] : $appData['max_version'] );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,18 +2,18 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Nexus Application
|
* Nexus Application
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Revision: 8644 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -34,6 +34,6 @@ class admin_core_applications_nexus extends ipsCommand
|
|||||||
{
|
{
|
||||||
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
|
||||||
|
|
||||||
$this->registry->output->showInsideIframe("http://myipb.in/products/nexus/");
|
$this->registry->output->showInsideIframe("http://www.invisionpower.com/products/nexus/");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,18 +2,18 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Application Installation
|
* Application Installation
|
||||||
* Last Updated: $Date: 2011-08-01 09:21:24 -0400 (Mon, 01 Aug 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 9340 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -598,7 +598,7 @@ class admin_core_applications_setup extends ipsCommand
|
|||||||
if( preg_match( "#(.+?)_language_pack.xml#", $f->getFileName() ) )
|
if( preg_match( "#(.+?)_language_pack.xml#", $f->getFileName() ) )
|
||||||
{
|
{
|
||||||
$this->request['file_location'] = $_PATH . $f->getFileName();
|
$this->request['file_location'] = $_PATH . $f->getFileName();
|
||||||
$lang->imprtFromXML( true, true, true, $vars['app_directory'], false, 1 );
|
$lang->imprtFromXML( true, true, true, $vars['app_directory'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch ( Exception $e ) {}
|
} catch ( Exception $e ) {}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
<menu>
|
<menu>
|
||||||
<tabitems>
|
<tabitems>
|
||||||
<item>
|
<item>
|
||||||
<title>Управление модулями</title>
|
<title>Manage Applications & Modules</title>
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Список модулей</subitemtitle>
|
<subitemtitle>Manage Applications & Modules</subitemtitle>
|
||||||
<subitemlang>manage_apps_modules</subitemlang>
|
<subitemlang>manage_apps_modules</subitemlang>
|
||||||
<subsection>applications</subsection>
|
<subsection>applications</subsection>
|
||||||
<subitemurl>do=applications_overview</subitemurl>
|
<subitemurl>do=applications_overview</subitemurl>
|
||||||
@@ -14,12 +14,11 @@
|
|||||||
</subitem>
|
</subitem>
|
||||||
</subitems>
|
</subitems>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
<item>
|
<title>Manage Hooks</title>
|
||||||
<title>Управление хуками (hooks)</title>
|
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Список хуков</subitemtitle>
|
<subitemtitle>Manage Hooks</subitemtitle>
|
||||||
<subitemlang>manage_hooks</subitemlang>
|
<subitemlang>manage_hooks</subitemlang>
|
||||||
<subsection>hooks</subsection>
|
<subsection>hooks</subsection>
|
||||||
<subitemurl>do=hooks_overview</subitemurl>
|
<subitemurl>do=hooks_overview</subitemurl>
|
||||||
|
|||||||
@@ -1,62 +1,62 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<permissions>
|
<permissions>
|
||||||
<group>
|
<group>
|
||||||
<grouptitle>Управление приложениями</grouptitle>
|
<grouptitle>Manage Applications</grouptitle>
|
||||||
<grouplang>core_manage_apps</grouplang>
|
<grouplang>core_manage_apps</grouplang>
|
||||||
<items>
|
<items>
|
||||||
<item>
|
<item>
|
||||||
<key>app_manage</key>
|
<key>app_manage</key>
|
||||||
<string>Может изменять/добавлять приложения?</string>
|
<string>Can manage applications?</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>app_delete</key>
|
<key>app_delete</key>
|
||||||
<string>Может удалять приложения?</string>
|
<string>Can delete applications?</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>app_install</key>
|
<key>app_install</key>
|
||||||
<string>Может устанавливать новые приложения?</string>
|
<string>Can install new applications?</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>build_sphinx</key>
|
<key>build_sphinx</key>
|
||||||
<string>Может создавать sphinx.conf? ВНИМАНИЕ: будут доступны данные для соединения с базой данных</string>
|
<string>Can build sphinx.conf? WARNING: Exposes database login details</string>
|
||||||
</item>
|
</item>
|
||||||
</items>
|
</items>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<grouptitle>Управление модулями</grouptitle>
|
<grouptitle>Manage Modules</grouptitle>
|
||||||
<grouplang>core_manage_modules</grouplang>
|
<grouplang>core_manage_modules</grouplang>
|
||||||
<items>
|
<items>
|
||||||
<item>
|
<item>
|
||||||
<key>module_manage</key>
|
<key>module_manage</key>
|
||||||
<string>Может изменять/добавлять модули?</string>
|
<string>Can edit/add application modules?</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>module_delete</key>
|
<key>module_delete</key>
|
||||||
<string>Может удалять модули приложений?</string>
|
<string>Can delete application modules?</string>
|
||||||
</item>
|
</item>
|
||||||
</items>
|
</items>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<grouptitle>Покупка приложений</grouptitle>
|
<grouptitle>Purchase Applications</grouptitle>
|
||||||
<grouplang>core_purchase_app</grouplang>
|
<grouplang>core_purchase_app</grouplang>
|
||||||
<items>
|
<items>
|
||||||
<item>
|
<item>
|
||||||
<key>purchase_app</key>
|
<key>purchase_app</key>
|
||||||
<string>Может просматривать страницу с платными приложениями?</string>
|
<string>Can view pages to purchase additional applications?</string>
|
||||||
</item>
|
</item>
|
||||||
</items>
|
</items>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<grouptitle>Управление модификациями</grouptitle>
|
<grouptitle>Manage Hooks</grouptitle>
|
||||||
<grouplang>core_manage_hooks</grouplang>
|
<grouplang>core_manage_hooks</grouplang>
|
||||||
<items>
|
<items>
|
||||||
<item>
|
<item>
|
||||||
<key>hooks_manage</key>
|
<key>hooks_manage</key>
|
||||||
<string>Может добавлять/изменять модификации?</string>
|
<string>Can manage hooks?</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>hooks_delete</key>
|
<key>hooks_delete</key>
|
||||||
<string>Может удалять модификации?</string>
|
<string>Can remove hooks?</string>
|
||||||
</item>
|
</item>
|
||||||
</items>
|
</items>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
* @file defaultSection.php Define the default section for the 'diagnostics' module
|
* @file defaultSection.php Define the default section for the 'diagnostics' module
|
||||||
*~TERABYTE_DOC_READY~
|
*~TERABYTE_DOC_READY~
|
||||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* $License: This is NULLED!
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* $Author: ips_terabyte $
|
* $Author: ips_terabyte $
|
||||||
* @since 20th February 2002
|
* @since 20th February 2002
|
||||||
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
||||||
* @version v3.2.3
|
* @version v3.3.4
|
||||||
* $Revision: 8655 $
|
* $Revision: 8655 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Diagnostic tools
|
* Diagnostic tools
|
||||||
* Last Updated: $Date: 2011-09-13 21:55:41 -0400 (Tue, 13 Sep 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 1st march 2002
|
* @since 1st march 2002
|
||||||
* @version $Revision: 9487 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -110,20 +110,11 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
|
|||||||
$this->_permissionsCheck();
|
$this->_permissionsCheck();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'fileversions':
|
case 'email':
|
||||||
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'version_checker' );
|
$this->_emailCheckerForm();
|
||||||
$this->_versionCheck();
|
|
||||||
break;
|
break;
|
||||||
|
case 'doemail':
|
||||||
/* Topic Marking */
|
$this->_emailCheckerGo();
|
||||||
case 'tm_index':
|
|
||||||
$this->_tmIndex();
|
|
||||||
break;
|
|
||||||
case 'tm_memberindex':
|
|
||||||
$this->_tmMemberIndex();
|
|
||||||
break;
|
|
||||||
case 'tm_viewLog':
|
|
||||||
$this->_tmViewLog();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -156,140 +147,15 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
|
|||||||
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' );
|
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' );
|
||||||
$_files = new $classToLoad();
|
$_files = new $classToLoad();
|
||||||
|
|
||||||
$_test = $_files->getFileContents( "http://www.google.com/" );
|
$_test = $_files->getFileContents( "http://www.invisionpower.com/connection-checker.html" );
|
||||||
$_headers = $_files->raw_headers;
|
$_headers = $_files->raw_headers;
|
||||||
|
|
||||||
$_test1 = $_files->getFileContents( "https://www.google.com/" );
|
$_test1 = $_files->getFileContents( "https://www.invisionpower.com/connection-checker.html" );
|
||||||
$_headers1 = $_files->raw_headers;
|
$_headers1 = $_files->raw_headers;
|
||||||
|
|
||||||
$this->registry->output->html .= $this->html->connectionCheckerResult( $_headers, $_test, $_headers1, $_test1 );
|
$this->registry->output->html .= $this->html->connectionCheckerResult( $_headers, $_test, $_headers1, $_test1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Check file versions
|
|
||||||
*
|
|
||||||
* @return @e void [Outputs to screen]
|
|
||||||
*/
|
|
||||||
public function _versionCheck()
|
|
||||||
{
|
|
||||||
$file_versions = array();
|
|
||||||
$upgrade_history = array();
|
|
||||||
$latest_version = array( 'upgrade_version_id' => '' );
|
|
||||||
$file_versions = $this->_versionDirRecurse( rtrim( DOC_IPS_ROOT_PATH, '/\\' ) );
|
|
||||||
|
|
||||||
$this->DB->build( array( 'select' => '*', 'from' => 'upgrade_history', 'where' => "upgrade_app='core'", 'order' => 'upgrade_version_id DESC', 'limit' => array(0, 5) ) );
|
|
||||||
$this->DB->execute();
|
|
||||||
|
|
||||||
while( $r = $this->DB->fetch() )
|
|
||||||
{
|
|
||||||
if ( $r['upgrade_version_id'] > $latest_version['upgrade_version_id'] )
|
|
||||||
{
|
|
||||||
$latest_version = $r;
|
|
||||||
}
|
|
||||||
|
|
||||||
$upgrade_history[] = $r;
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Got real version number?
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$version['version'] = ( IPB_VERSION == '3.2.3' ) ? $latest_version['upgrade_version_human'] : IPB_VERSION;
|
|
||||||
$version['version_full'] = ( IPB_LONG_VERSION == '32006' ) ? $latest_version['upgrade_version_id'] : IPB_LONG_VERSION;
|
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Version History
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
if( count($upgrade_history) )
|
|
||||||
{
|
|
||||||
foreach( $upgrade_history as $r )
|
|
||||||
{
|
|
||||||
$r['_date'] = ipsRegistry::getClass( 'class_localization')->getDate( $r['upgrade_date'], 'SHORT' );
|
|
||||||
|
|
||||||
$thiscontent .= $this->html->acp_version_history_row( $r );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->registry->output->html .= $this->html->versionCheckerResults( $version, $thiscontent, $file_versions );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check file versions
|
|
||||||
*
|
|
||||||
* @param string Directory to check
|
|
||||||
* @return array Files => Versions
|
|
||||||
*/
|
|
||||||
public function _versionDirRecurse($dir)
|
|
||||||
{
|
|
||||||
/* Init some vars */
|
|
||||||
$files = array();
|
|
||||||
$skip_dirs = array( PUBLIC_DIRECTORY,
|
|
||||||
'cache',
|
|
||||||
'uploads',
|
|
||||||
'images',
|
|
||||||
'i18n',
|
|
||||||
'PEAR',
|
|
||||||
rtrim( str_replace( DOC_IPS_ROOT_PATH, '', IPS_HOOKS_PATH ), '/\\' ),
|
|
||||||
'facebook-client',
|
|
||||||
'FirePHPCore',
|
|
||||||
'facebook',
|
|
||||||
'resources',
|
|
||||||
'applications_addon',
|
|
||||||
'js',
|
|
||||||
'skin_cp',
|
|
||||||
'install',
|
|
||||||
'upgrade',
|
|
||||||
'Auth'
|
|
||||||
);
|
|
||||||
|
|
||||||
$skip_files = array('conf_global.php',
|
|
||||||
'conf.php',
|
|
||||||
$this->settings['sql_driver'] . '_updates.php',
|
|
||||||
$this->settings['sql_driver'] . '_install.php',
|
|
||||||
$this->settings['sql_driver'] . '_fulltext.php',
|
|
||||||
'classGraph.php', // This is Wizzy's
|
|
||||||
);
|
|
||||||
|
|
||||||
/* Check files */
|
|
||||||
try
|
|
||||||
{
|
|
||||||
foreach( new DirectoryIterator( $dir ) as $directory )
|
|
||||||
{
|
|
||||||
if( $directory->isDot() )
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( strpos( $directory->getFilename(), '_' ) === 0 OR strpos( $directory->getFilename(), '.' ) === 0 )
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$newpath = $dir . '/' . $directory->getFilename();
|
|
||||||
$level = explode( '/', $newpath );
|
|
||||||
|
|
||||||
if ( is_dir($newpath) && !in_array( $directory->getFilename(), $skip_dirs ) )
|
|
||||||
{
|
|
||||||
$files = array_merge( $files, $this->_versionDirRecurse($newpath) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( strpos( $directory->getFilename(), ".php" ) !== false && !is_dir( $newpath ) && !in_array( $directory->getFilename(), $skip_files ) )
|
|
||||||
{
|
|
||||||
$file = file_get_contents($newpath);
|
|
||||||
|
|
||||||
preg_match( "#@version\s+?v(.+?)\\n#i", $file, $matches );
|
|
||||||
|
|
||||||
$files[ $newpath ] = isset($matches[1]) ? $matches[1] : '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch ( Exception $e ) {}
|
|
||||||
|
|
||||||
return $files;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check file permissions
|
* Check file permissions
|
||||||
*
|
*
|
||||||
@@ -304,7 +170,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
|
|||||||
'cache/skin_cache',
|
'cache/skin_cache',
|
||||||
'cache/lang_cache',
|
'cache/lang_cache',
|
||||||
'cache/tmp',
|
'cache/tmp',
|
||||||
'cache/openid',
|
|
||||||
'uploads',
|
'uploads',
|
||||||
'uploads/profile',
|
'uploads/profile',
|
||||||
rtrim( str_replace( DOC_IPS_ROOT_PATH, '', IPS_HOOKS_PATH ), '/\\' ),
|
rtrim( str_replace( DOC_IPS_ROOT_PATH, '', IPS_HOOKS_PATH ), '/\\' ),
|
||||||
@@ -445,7 +310,7 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$output[] = ( is_writable( DOC_IPS_ROOT_PATH . '/' . $dir_to_check ) ) ? "<span style='color:green;'>" . rtrim( DOC_IPS_ROOT_PATH, '/\\' ) . "/{$dir_to_check} {$this->lang->words['d_pyes']}</span>" : "<span style='color:red;font-weight:bold;'>{$this->lang->words['d_pno']} ". rtrim( DOC_IPS_ROOT_PATH, '/\\' ) . "/{$dir_to_check}</span>";;
|
$output[] = ( is_writable( DOC_IPS_ROOT_PATH . '/' . $dir_to_check ) ) ? "<span style='color:green;'>" . rtrim( DOC_IPS_ROOT_PATH, '/\\' ) . "/{$dir_to_check} {$this->lang->words['d_pyes']}</span>" : "<span style='color:red;font-weight:bold;'>{$this->lang->words['d_pno']} ". rtrim( DOC_IPS_ROOT_PATH, '/\\' ) . "/{$dir_to_check}</span>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -589,6 +454,7 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
|
|||||||
|
|
||||||
$errors_array = array();
|
$errors_array = array();
|
||||||
$tables_array = array();
|
$tables_array = array();
|
||||||
|
$queriesRan = array();
|
||||||
|
|
||||||
foreach( $sql_table_files as $app_title => $sql_file )
|
foreach( $sql_table_files as $app_title => $sql_file )
|
||||||
{
|
{
|
||||||
@@ -604,6 +470,12 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( isset( $output['results']['ran'] ) )
|
||||||
|
{
|
||||||
|
$queriesRan = array_merge( $queriesRan, $output['results']['ran'] );
|
||||||
|
unset( $output['results']['ran'] );
|
||||||
|
}
|
||||||
|
|
||||||
if( $output['error_count'] > 0 )
|
if( $output['error_count'] > 0 )
|
||||||
{
|
{
|
||||||
$errors_array[] = $app_title;
|
$errors_array[] = $app_title;
|
||||||
@@ -614,7 +486,7 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Output */
|
/* Output */
|
||||||
$this->registry->output->html .= $this->html->indexChecker( $errors_array, $tables_array );
|
$this->registry->output->html .= $this->html->indexChecker( $errors_array, $tables_array, $queriesRan );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -637,6 +509,7 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
|
|||||||
|
|
||||||
$errors_array = array();
|
$errors_array = array();
|
||||||
$tables_array = array();
|
$tables_array = array();
|
||||||
|
$queriesRan = array();
|
||||||
|
|
||||||
foreach( $sql_table_files as $app_title => $sql_file )
|
foreach( $sql_table_files as $app_title => $sql_file )
|
||||||
{
|
{
|
||||||
@@ -650,6 +523,12 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( isset( $output['results']['ran'] ) )
|
||||||
|
{
|
||||||
|
$queriesRan = array_merge( $queriesRan, $output['results']['ran'] );
|
||||||
|
unset( $output['results']['ran'] );
|
||||||
|
}
|
||||||
|
|
||||||
if( $output['error_count'] > 0 )
|
if( $output['error_count'] > 0 )
|
||||||
{
|
{
|
||||||
$errors_array[] = $app_title;
|
$errors_array[] = $app_title;
|
||||||
@@ -662,7 +541,7 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
|
|||||||
// And output
|
// And output
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$this->registry->output->html .= $this->html->dbChecker( $errors_array, $tables_array );
|
$this->registry->output->html .= $this->html->dbChecker( $errors_array, $tables_array, $queriesRan );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -672,6 +551,40 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
|
|||||||
*/
|
*/
|
||||||
public function _listFunctions()
|
public function _listFunctions()
|
||||||
{
|
{
|
||||||
|
//-----------------------------------------
|
||||||
|
// PHP INFO?
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
if ( $this->request['phpinfo'] AND $this->request['phpinfo'] )
|
||||||
|
{
|
||||||
|
@ob_start();
|
||||||
|
phpinfo();
|
||||||
|
$parsed = @ob_get_contents();
|
||||||
|
@ob_end_clean();
|
||||||
|
|
||||||
|
preg_match( "#<body>(.*)</body>#is" , $parsed, $match1 );
|
||||||
|
|
||||||
|
$php_body = $match1[1];
|
||||||
|
|
||||||
|
# PREVENT WRAP: Most cookies
|
||||||
|
$php_body = str_replace( "; " , ";<br />" , $php_body );
|
||||||
|
# PREVENT WRAP: Very long string cookies
|
||||||
|
$php_body = str_replace( "%3B", "<br />" , $php_body );
|
||||||
|
# PREVENT WRAP: Serialized array string cookies
|
||||||
|
$php_body = str_replace( ";i:", ";<br />i:" , $php_body );
|
||||||
|
# PREVENT WRAP: LS_COLORS env
|
||||||
|
$php_body = str_replace( ":*.", "<br />:*." , $php_body );
|
||||||
|
# PREVENT WRAP: PATH env
|
||||||
|
$php_body = str_replace( "bin:/", "bin<br />:/" , $php_body );
|
||||||
|
# PREVENT WRAP: Cookie %2C split
|
||||||
|
$php_body = str_replace( "%2C", "%2C<br />" , $php_body );
|
||||||
|
#PREVENT WRAP: Cookie , split
|
||||||
|
$php_body = preg_replace( "#,(\d+),#", ",<br />\\1," , $php_body );
|
||||||
|
|
||||||
|
$this->registry->output->html .= $this->html->phpInfo( $php_body );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Stats
|
// Stats
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -717,40 +630,6 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
|
|||||||
'ipb_version' => ipsRegistry::$version,
|
'ipb_version' => ipsRegistry::$version,
|
||||||
'ipb_id' => ipsRegistry::$vn_full ) );
|
'ipb_id' => ipsRegistry::$vn_full ) );
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// PHP INFO?
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
if ( $this->request['phpinfo'] AND $this->request['phpinfo'] )
|
|
||||||
{
|
|
||||||
@ob_start();
|
|
||||||
phpinfo();
|
|
||||||
$parsed = @ob_get_contents();
|
|
||||||
@ob_end_clean();
|
|
||||||
|
|
||||||
preg_match( "#<body>(.*)</body>#is" , $parsed, $match1 );
|
|
||||||
|
|
||||||
$php_body = $match1[1];
|
|
||||||
|
|
||||||
# PREVENT WRAP: Most cookies
|
|
||||||
$php_body = str_replace( "; " , ";<br />" , $php_body );
|
|
||||||
# PREVENT WRAP: Very long string cookies
|
|
||||||
$php_body = str_replace( "%3B", "<br />" , $php_body );
|
|
||||||
# PREVENT WRAP: Serialized array string cookies
|
|
||||||
$php_body = str_replace( ";i:", ";<br />i:" , $php_body );
|
|
||||||
# PREVENT WRAP: LS_COLORS env
|
|
||||||
$php_body = str_replace( ":*.", "<br />:*." , $php_body );
|
|
||||||
# PREVENT WRAP: PATH env
|
|
||||||
$php_body = str_replace( "bin:/", "bin<br />:/" , $php_body );
|
|
||||||
# PREVENT WRAP: Cookie %2C split
|
|
||||||
$php_body = str_replace( "%2C", "%2C<br />" , $php_body );
|
|
||||||
#PREVENT WRAP: Cookie , split
|
|
||||||
$php_body = preg_replace( "#,(\d+),#", ",<br />\\1," , $php_body );
|
|
||||||
|
|
||||||
$this->registry->output->html .= $this->html->phpInfo( $php_body );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Server stuff
|
// Server stuff
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -823,51 +702,13 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
|
|||||||
$extensions = array_combine( $extensions, $extensions );
|
$extensions = array_combine( $extensions, $extensions );
|
||||||
sort( $extensions, SORT_STRING );
|
sort( $extensions, SORT_STRING );
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Upgrade history?
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$upgrade_history = array();
|
|
||||||
$latest_version = array( 'upgrade_version_id' => NULL );
|
|
||||||
|
|
||||||
$this->DB->build( array( 'select' => '*', 'from' => 'upgrade_history', 'where' => "upgrade_app='core'", 'order' => 'upgrade_version_id DESC', 'limit' => array( 0, 5 ) ) );
|
|
||||||
$this->DB->execute();
|
|
||||||
|
|
||||||
while( $r = $this->DB->fetch() )
|
|
||||||
{
|
|
||||||
if ( $r['upgrade_version_id'] > $latest_version['upgrade_version_id'] )
|
|
||||||
{
|
|
||||||
$latest_version = $r;
|
|
||||||
}
|
|
||||||
|
|
||||||
$upgrade_history[] = $r;
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Got real version number?
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$version['version'] = (IPB_VERSION == '3.0.0 RC 1') ? $latest_version['upgrade_version_human'] : IPB_VERSION;
|
|
||||||
$version['version_full'] = (IPB_LONG_VERSION == '30005') ? $latest_version['upgrade_version_id'] : IPB_LONG_VERSION;
|
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Version History
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
foreach( $upgrade_history as $r )
|
|
||||||
{
|
|
||||||
$r['_date'] = ipsRegistry::getClass( 'class_localization')->getDate( $r['upgrade_date'], 'SHORT' );
|
|
||||||
|
|
||||||
$thiscontent .= $this->html->acp_version_history_row( $r );
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Set variables and pass to skin
|
// Set variables and pass to skin
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'version' => 'v' . $version['version'],
|
'version' => 'v' . IPB_VERSION,
|
||||||
'version_full' => $version['version_full'],
|
'version_full' => IPB_LONG_VERSION,
|
||||||
'version_sql' => $sql_version,
|
'version_sql' => $sql_version,
|
||||||
'driver_type' => strtoupper($this->settings['sql_driver']),
|
'driver_type' => strtoupper($this->settings['sql_driver']),
|
||||||
'version_php' => $php_version,
|
'version_php' => $php_version,
|
||||||
@@ -915,7 +756,56 @@ class admin_core_diagnostics_diagnostics extends ipsCommand
|
|||||||
$data['tasks'] = $tasks;
|
$data['tasks'] = $tasks;
|
||||||
|
|
||||||
$this->registry->output->html .= $this->html->diagnosticsOverview( $data, $statsbox );
|
$this->registry->output->html .= $this->html->diagnosticsOverview( $data, $statsbox );
|
||||||
|
}
|
||||||
|
|
||||||
$this->registry->output->html .= $this->html->acp_version_history_wrapper( $thiscontent );
|
/**
|
||||||
|
* Show the email tester page
|
||||||
|
*
|
||||||
|
* @param sring Error message
|
||||||
|
* @return @e void [Outputs to screen]
|
||||||
|
*/
|
||||||
|
public function _emailCheckerForm( $error='' )
|
||||||
|
{
|
||||||
|
$this->registry->output->html .= $this->html->emailChecker( $error );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a test email
|
||||||
|
*
|
||||||
|
* @return @e void [Outputs to screen]
|
||||||
|
*/
|
||||||
|
public function _emailCheckerGo()
|
||||||
|
{
|
||||||
|
//-----------------------------------------
|
||||||
|
// Send it
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
IPSText::getTextClass('email')->to = $this->request['to'];
|
||||||
|
IPSText::getTextClass('email')->from = $this->request['from'];
|
||||||
|
IPSText::getTextClass('email')->subject = $this->request['subject'];
|
||||||
|
IPSText::getTextClass('email')->message = $this->request['message'];
|
||||||
|
IPSText::getTextClass('email')->sendMail();
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Check the error log
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$error = '';
|
||||||
|
|
||||||
|
$lastLog = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'mail_error_logs', 'order' => 'mlog_date DESC', 'limit' => 1 ) );
|
||||||
|
if ( $lastLog['mlog_date'] >= ( time() - 2 ) and $lastLog['mlog_subject'] == $this->request['subject'] )
|
||||||
|
{
|
||||||
|
$error = $lastLog['mlog_msg'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->registry->output->global_message = $this->lang->words['email_tester_ok'];
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Show
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$this->_emailCheckerForm( $error );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
<menu>
|
<menu>
|
||||||
<tabitems>
|
<tabitems>
|
||||||
<item>
|
<item>
|
||||||
<title>Состояние системы</title>
|
<title>Overview</title>
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Обзор системы</subitemtitle>
|
<subitemtitle>Overview</subitemtitle>
|
||||||
<subitemlang>diag_overview</subitemlang>
|
<subitemlang>diag_overview</subitemlang>
|
||||||
<subsection>diagnostics</subsection>
|
<subsection>diagnostics</subsection>
|
||||||
<subitemurl></subitemurl>
|
<subitemurl></subitemurl>
|
||||||
@@ -15,23 +15,10 @@
|
|||||||
</subitems>
|
</subitems>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<title>Проверка версий файлов</title>
|
<title>Whitespace Checker</title>
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Проверка версий файлов</subitemtitle>
|
<subitemtitle>Whitespace Checker</subitemtitle>
|
||||||
<subitemlang>version_checker</subitemlang>
|
|
||||||
<subsection>diagnostics</subsection>
|
|
||||||
<subitemurl>do=fileversions</subitemurl>
|
|
||||||
<subitemrolekey>version_checker</subitemrolekey>
|
|
||||||
<subisredirect>0</subisredirect>
|
|
||||||
</subitem>
|
|
||||||
</subitems>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<title>Проверка лишних пробелов</title>
|
|
||||||
<subitems>
|
|
||||||
<subitem>
|
|
||||||
<subitemtitle>Поиск файлов содержащих лишние пробелы</subitemtitle>
|
|
||||||
<subitemlang>whitespace_checker</subitemlang>
|
<subitemlang>whitespace_checker</subitemlang>
|
||||||
<subsection>diagnostics</subsection>
|
<subsection>diagnostics</subsection>
|
||||||
<subitemurl>do=whitespace</subitemurl>
|
<subitemurl>do=whitespace</subitemurl>
|
||||||
@@ -41,10 +28,10 @@
|
|||||||
</subitems>
|
</subitems>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<title>Проверка прав файлов</title>
|
<title>Permissions Checker</title>
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Проверка прав доступа к файлам</subitemtitle>
|
<subitemtitle>Permissions Checker</subitemtitle>
|
||||||
<subitemlang>permissions_checker</subitemlang>
|
<subitemlang>permissions_checker</subitemlang>
|
||||||
<subsection>diagnostics</subsection>
|
<subsection>diagnostics</subsection>
|
||||||
<subitemurl>do=filepermissions</subitemurl>
|
<subitemurl>do=filepermissions</subitemurl>
|
||||||
@@ -54,10 +41,10 @@
|
|||||||
</subitems>
|
</subitems>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<title>Проверка сетевых соединений</title>
|
<title>Connection Checker</title>
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Проверка сетевых соединений</subitemtitle>
|
<subitemtitle>Connection Checker</subitemtitle>
|
||||||
<subitemlang>connection_checker</subitemlang>
|
<subitemlang>connection_checker</subitemlang>
|
||||||
<subsection>diagnostics</subsection>
|
<subsection>diagnostics</subsection>
|
||||||
<subitemurl>do=connections</subitemurl>
|
<subitemurl>do=connections</subitemurl>
|
||||||
@@ -67,10 +54,10 @@
|
|||||||
</subitems>
|
</subitems>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<title>Проверка структуры базы</title>
|
<title>Database Checker</title>
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Проверка структуры базы данных</subitemtitle>
|
<subitemtitle>Database Checker</subitemtitle>
|
||||||
<subitemlang>db_checker</subitemlang>
|
<subitemlang>db_checker</subitemlang>
|
||||||
<subsection>diagnostics</subsection>
|
<subsection>diagnostics</subsection>
|
||||||
<subitemurl>do=dbchecker</subitemurl>
|
<subitemurl>do=dbchecker</subitemurl>
|
||||||
@@ -80,10 +67,10 @@
|
|||||||
</subitems>
|
</subitems>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<title>Проверка индексов базы</title>
|
<title>Database Index Checker</title>
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Проверка индексов базы данных</subitemtitle>
|
<subitemtitle>Database Index Checker</subitemtitle>
|
||||||
<subitemlang>dbi_checker</subitemlang>
|
<subitemlang>dbi_checker</subitemlang>
|
||||||
<subsection>diagnostics</subsection>
|
<subsection>diagnostics</subsection>
|
||||||
<subitemurl>do=dbindex</subitemurl>
|
<subitemurl>do=dbindex</subitemurl>
|
||||||
@@ -92,5 +79,18 @@
|
|||||||
</subitem>
|
</subitem>
|
||||||
</subitems>
|
</subitems>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Email Tester</title>
|
||||||
|
<subitems>
|
||||||
|
<subitem>
|
||||||
|
<subitemtitle>Email Tester</subitemtitle>
|
||||||
|
<subitemlang>email_checker</subitemlang>
|
||||||
|
<subsection>diagnostics</subsection>
|
||||||
|
<subitemurl>do=email</subitemurl>
|
||||||
|
<subitemrolekey>email_checker</subitemrolekey>
|
||||||
|
<subisredirect>0</subisredirect>
|
||||||
|
</subitem>
|
||||||
|
</subitems>
|
||||||
|
</item>
|
||||||
</tabitems>
|
</tabitems>
|
||||||
</menu>
|
</menu>
|
||||||
@@ -1,32 +1,32 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<permissions>
|
<permissions>
|
||||||
<group>
|
<group>
|
||||||
<grouptitle>Инструменты диагностики</grouptitle>
|
<grouptitle>Diagnostic Tools</grouptitle>
|
||||||
<grouplang>core_diag_tools</grouplang>
|
<grouplang>core_diag_tools</grouplang>
|
||||||
<items>
|
<items>
|
||||||
<item>
|
<item>
|
||||||
<key>index_checker</key>
|
<key>index_checker</key>
|
||||||
<string>Может проверять индексы таблиц базы? Внимание: позволяет выполнять запросы к базе.</string>
|
<string>Can use the database index checker? Warning: Allows ability to run database queries indirectly.</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>database_checker</key>
|
<key>database_checker</key>
|
||||||
<string>Может использовать проверку базы данных? Внимание: позволяет выполнять запросы к базе.</string>
|
<string>Can use the database checker? Warning: Allows ability to run database queries indirectly.</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>whitespace_checker</key>
|
<key>whitespace_checker</key>
|
||||||
<string>Может проверять файлы на лишние пробелы?</string>
|
<string>Can use the whitespace checker?</string>
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<key>version_checker</key>
|
|
||||||
<string>Может проверять файлы на правильность версии?</string>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>connection_checker</key>
|
<key>connection_checker</key>
|
||||||
<string>Может использовать проверку сетевых соединений?</string>
|
<string>Can use the connection checker?</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>permission_checker</key>
|
<key>permission_checker</key>
|
||||||
<string>Может проверять файлы и директории на правильность расстановки прав доступа?</string>
|
<string>Can use the permissions checker?</string>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<key>email_checker</key>
|
||||||
|
<string>Can use the email tester?</string>
|
||||||
</item>
|
</item>
|
||||||
</items>
|
</items>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
* @file defaultSection.php Define the default section for the 'help' module
|
* @file defaultSection.php Define the default section for the 'help' module
|
||||||
*~TERABYTE_DOC_READY~
|
*~TERABYTE_DOC_READY~
|
||||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* $License: This is NULLED!
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* $Author: ips_terabyte $
|
* $Author: ips_terabyte $
|
||||||
* @since 20th February 2002
|
* @since 20th February 2002
|
||||||
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
||||||
* @version v3.2.3
|
* @version v3.3.4
|
||||||
* $Revision: 8655 $
|
* $Revision: 8655 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Quick help - shows popups with help information
|
* Quick help - shows popups with help information
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 1st march 2002
|
* @since 1st march 2002
|
||||||
* @version $Revision: 8644 $
|
* @version $Revision: 10914 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -115,28 +115,28 @@ class admin_core_help_quickhelp extends ipsCommand
|
|||||||
switch( $id )
|
switch( $id )
|
||||||
{
|
{
|
||||||
case 'docs':
|
case 'docs':
|
||||||
$url = "http://myipb.in/docs-ipb";
|
$url = "http://external.ipslink.com/ipboard30/landing/?p=docs-ipb";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'resources':
|
case 'resources':
|
||||||
$url = "http://myipb.in/forums";
|
$url = "http://external.ipslink.com/ipboard30/landing/?p=resources";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'contact':
|
case 'contact':
|
||||||
$url = "http://myipb.in/contact";
|
$url = "http://external.ipslink.com/ipboard30/landing/?p=contact";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'features':
|
case 'features':
|
||||||
$url = "http://myipb.in/suggestfeatures";
|
$url = "http://external.ipslink.com/ipboard30/landing/?p=suggestfeatures";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'bugs':
|
case 'bugs':
|
||||||
$url = "http://myipb.in/bugtrack";
|
$url = "http://external.ipslink.com/ipboard30/landing/?p=bugs";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
case 'support':
|
case 'support':
|
||||||
$url = "http://myipb.in/clientarea";
|
$url = "http://external.ipslink.com/ipboard30/landing/?p=support";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
<menu>
|
<menu>
|
||||||
<tabitems>
|
<tabitems>
|
||||||
<item>
|
<item>
|
||||||
<title>Документация</title>
|
<title>Documentation</title>
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Документация</subitemtitle>
|
<subitemtitle>Documentation</subitemtitle>
|
||||||
<subitemlang>help_documentation</subitemlang>
|
<subitemlang>help_documentation</subitemlang>
|
||||||
<subsection>quickhelp</subsection>
|
<subsection>quickhelp</subsection>
|
||||||
<subitemurl>do=redirect&id=docs</subitemurl>
|
<subitemurl>do=redirect&id=docs</subitemurl>
|
||||||
@@ -13,12 +13,11 @@
|
|||||||
</subitem>
|
</subitem>
|
||||||
</subitems>
|
</subitems>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
<item>
|
<title>Technical Support</title>
|
||||||
<title>Тех. поддержка</title>
|
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Техническая поддержка</subitemtitle>
|
<subitemtitle>Technical Support</subitemtitle>
|
||||||
<subitemlang>help_support</subitemlang>
|
<subitemlang>help_support</subitemlang>
|
||||||
<subsection>quickhelp</subsection>
|
<subsection>quickhelp</subsection>
|
||||||
<subitemurl>do=redirect&id=support</subitemurl>
|
<subitemurl>do=redirect&id=support</subitemurl>
|
||||||
@@ -27,10 +26,10 @@
|
|||||||
</subitems>
|
</subitems>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<title>Форумы</title>
|
<title>Additional Resources</title>
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Форумы IBResource</subitemtitle>
|
<subitemtitle>Additional Resources</subitemtitle>
|
||||||
<subitemlang>help_resources</subitemlang>
|
<subitemlang>help_resources</subitemlang>
|
||||||
<subsection>quickhelp</subsection>
|
<subsection>quickhelp</subsection>
|
||||||
<subitemurl>do=redirect&id=resources</subitemurl>
|
<subitemurl>do=redirect&id=resources</subitemurl>
|
||||||
@@ -39,10 +38,10 @@
|
|||||||
</subitems>
|
</subitems>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<title>Контакты</title>
|
<title>IPS Contact Information</title>
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Контактная информация</subitemtitle>
|
<subitemtitle>IPS Contact Information</subitemtitle>
|
||||||
<subitemlang>help_contact</subitemlang>
|
<subitemlang>help_contact</subitemlang>
|
||||||
<subsection>quickhelp</subsection>
|
<subsection>quickhelp</subsection>
|
||||||
<subitemurl>do=redirect&id=contact</subitemurl>
|
<subitemurl>do=redirect&id=contact</subitemurl>
|
||||||
@@ -51,10 +50,22 @@
|
|||||||
</subitems>
|
</subitems>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<title>Сообщить об ошибке</title>
|
<title>Feature Requests</title>
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Сообщить об ошибке</subitemtitle>
|
<subitemtitle>Feature Requests</subitemtitle>
|
||||||
|
<subitemlang>help_features</subitemlang>
|
||||||
|
<subsection>quickhelp</subsection>
|
||||||
|
<subitemurl>do=redirect&id=features</subitemurl>
|
||||||
|
<subisredirect>1</subisredirect>
|
||||||
|
</subitem>
|
||||||
|
</subitems>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>Report a Bug</title>
|
||||||
|
<subitems>
|
||||||
|
<subitem>
|
||||||
|
<subitemtitle>Report a Bug</subitemtitle>
|
||||||
<subitemlang>help_bugs</subitemlang>
|
<subitemlang>help_bugs</subitemlang>
|
||||||
<subsection>quickhelp</subsection>
|
<subsection>quickhelp</subsection>
|
||||||
<subitemurl>do=redirect&id=bugs</subitemurl>
|
<subitemurl>do=redirect&id=bugs</subitemurl>
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
* @file defaultSection.php Define the default section for the 'languages' module
|
* @file defaultSection.php Define the default section for the 'languages' module
|
||||||
*~TERABYTE_DOC_READY~
|
*~TERABYTE_DOC_READY~
|
||||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* $License: This is NULLED!
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* $Author: ips_terabyte $
|
* $Author: ips_terabyte $
|
||||||
* @since 20th February 2002
|
* @since 20th February 2002
|
||||||
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
||||||
* @version v3.2.3
|
* @version v3.3.4
|
||||||
* $Revision: 8655 $
|
* $Revision: 8655 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,18 +3,18 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Language Pack Management
|
* Language Pack Management
|
||||||
* Last Updated: $LastChangedDate: 2011-09-19 20:56:02 -0400 (Mon, 19 Sep 2011) $
|
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 9511 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -178,7 +178,7 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
$this->languageExportToXML( 1, 1 );
|
$this->languageExportToXML( 1, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->registry->output->global_message = $this->lang->words['indev_lang_export_done'];
|
$this->registry->output->setMessage( $this->lang->words['indev_lang_export_done'], 1 );
|
||||||
$this->languagesList();
|
$this->languagesList();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -357,8 +357,7 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
$lang = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_lang', 'where' => 'lang_id=' . $langId ) );
|
$lang = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_lang', 'where' => 'lang_id=' . $langId ) );
|
||||||
|
|
||||||
/* Get current session if one */
|
/* Get current session if one */
|
||||||
$session = $this->DB->buildandFetch( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='translate_session'" ) );
|
$sessionData = $this->cache->getCache('translate_session');
|
||||||
$sessionData = ( strstr( $session['cs_value'], 'a:' ) ) ? unserialize( $session['cs_value'] ) : array();
|
|
||||||
|
|
||||||
/* Check */
|
/* Check */
|
||||||
if ( empty( $sessionData['lang_id'] ) OR ! count( $sessionData['files'] ) OR !$fileCount )
|
if ( empty( $sessionData['lang_id'] ) OR ! count( $sessionData['files'] ) OR !$fileCount )
|
||||||
@@ -391,13 +390,13 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
/* Update session data */
|
/* Update session data */
|
||||||
$sessionData['files'][ $file ]['dbtime'] = time();
|
$sessionData['files'][ $file ]['dbtime'] = time();
|
||||||
|
|
||||||
$this->registry->output->global_message = sprintf( $this->lang->words['ext_file_written'], $file, intval( $data['inserts'] ), intval( $data['updates'] ) );;
|
$this->registry->output->global_message = sprintf( $this->lang->words['ext_file_written'], $file, intval( $data['inserts'] ), intval( $data['updates'] ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->registry->output->global_message .= '<br />' . sprintf( $this->lang->words['ext_recache'], "{$this->settings['base_url']}&{$this->form_code}&do=recache_lang_pack&id={$sessionData['lang_id']}" );
|
$this->registry->output->global_message .= '<br />' . sprintf( $this->lang->words['ext_recache'], "{$this->settings['base_url']}&{$this->form_code}&do=recache_lang_pack&id={$sessionData['lang_id']}" );
|
||||||
|
|
||||||
/* Update session */
|
/* Update session */
|
||||||
$this->DB->update( 'cache_store', array( 'cs_value' => serialize( $sessionData ) ), "cs_key='translate_session'" );
|
$this->cache->setCache( 'translate_session', $sessionData, array( 'array' => 1, 'donow' => 1 ) );
|
||||||
|
|
||||||
$this->translateExtSplash();
|
$this->translateExtSplash();
|
||||||
return;
|
return;
|
||||||
@@ -622,7 +621,7 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( preg_match( "#^\S+?_\S+?\.php$#", $f ) )
|
if ( preg_match( '#^\S+?_\S+?\.php$#', $f ) )
|
||||||
{
|
{
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// INIT
|
// INIT
|
||||||
@@ -630,8 +629,8 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
|
|
||||||
$updated = 0;
|
$updated = 0;
|
||||||
$inserted = 0;
|
$inserted = 0;
|
||||||
$app = preg_replace( "#^([^_]+?)_(\S+?)\.php$#", "\\1", $f );
|
$app = preg_replace( '#^([^_]+?)_(\S+?)\.php$#', "\\1", $f );
|
||||||
$word_pack = preg_replace( "#^([^_]+?)_(\S+?)\.php$#", "\\2", $f );
|
$word_pack = preg_replace( '#^([^_]+?)_(\S+?)\.php$#', "\\2", $f );
|
||||||
$lang = array();
|
$lang = array();
|
||||||
$db_lang = array();
|
$db_lang = array();
|
||||||
|
|
||||||
@@ -794,7 +793,7 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
// preg_match what we want
|
// preg_match what we want
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
preg_match( "#ipb\.lang\['(.+?)'\](.+?)= [\"'](.+?)[\"'];#", $r, $matches );
|
preg_match( '#ipb\.lang\[\'(.+?)\'\](.+?)= ["\'](.+?)["\'];#', $r, $matches );
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Valid?
|
// Valid?
|
||||||
@@ -1004,7 +1003,7 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
if ( preg_match( "#" . $_word . "_(.+?)_language_pack.xml#", $f->getFileName() ) )
|
if ( preg_match( "#" . $_word . "_(.+?)_language_pack.xml#", $f->getFileName() ) )
|
||||||
{
|
{
|
||||||
$this->request['file_location'] = $_PATH . $f->getFileName();
|
$this->request['file_location'] = $_PATH . $f->getFileName();
|
||||||
$this->imprtFromXML( 1, true, true, $next['key'], false, 1 );
|
$this->imprtFromXML( 1, true, true, $next['key'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch ( Exception $e ) {}
|
} catch ( Exception $e ) {}
|
||||||
@@ -1274,8 +1273,8 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->request['word_app'] = mb_strtolower($this->request['word_app']);
|
$this->request['word_app'] = strtolower($this->request['word_app']);
|
||||||
$this->request['word_pack_db'] = str_replace( '/', '_', mb_strtolower($this->request['word_pack_db']) );
|
$this->request['word_pack_db'] = str_replace( '/', '_', strtolower($this->request['word_pack_db']) );
|
||||||
|
|
||||||
if( $this->request['word_pack_db'] == 'admin_js' OR $this->request['word_pack_db'] == 'public_js' )
|
if( $this->request['word_pack_db'] == 'admin_js' OR $this->request['word_pack_db'] == 'public_js' )
|
||||||
{
|
{
|
||||||
@@ -1464,8 +1463,7 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
{
|
{
|
||||||
/* Tab Button */
|
/* Tab Button */
|
||||||
$js = ( $this->tab_js_action[$i] ) ? 'onmousedown="'.$this->tab_js_action[$i].'"' : '';
|
$js = ( $this->tab_js_action[$i] ) ? 'onmousedown="'.$this->tab_js_action[$i].'"' : '';
|
||||||
$class = ( $i == 0 ) ? 'mini_tab_on' : 'mini_tab_off';
|
$tabs[] = array( 'id' => $i, 'text' => $button, 'js' => $js );
|
||||||
$tabs[] = array( 'id' => $i, 'class' => $class, 'text' => $button, 'js' => $js );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tab Contents */
|
/* Tab Contents */
|
||||||
@@ -1499,7 +1497,7 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
|
|
||||||
/* Fix up for search */
|
/* Fix up for search */
|
||||||
$keywordForPageLinks = $this->request['search'];
|
$keywordForPageLinks = $this->request['search'];
|
||||||
$this->request['search'] = str_replace( "'", "\'", $this->request['search'] );
|
$this->request['search'] = str_replace( "'", "\\'", $this->request['search'] );
|
||||||
|
|
||||||
$id = intval( $this->request['id'] );
|
$id = intval( $this->request['id'] );
|
||||||
$pack = explode( '/', $this->request['word_pack'] );
|
$pack = explode( '/', $this->request['word_pack'] );
|
||||||
@@ -1879,8 +1877,7 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
public function languagesList()
|
public function languagesList()
|
||||||
{
|
{
|
||||||
/* Do we have a valid translation session? */
|
/* Do we have a valid translation session? */
|
||||||
$session = $this->DB->buildandFetch( array( 'select' => '*', 'from' => 'cache_store', 'where' => "cs_key='translate_session'" ) );
|
$sessionData = $this->cache->getCache('translate_session');
|
||||||
$sessionData = IPSLib::isSerialized($session['cs_value']) ? unserialize( $session['cs_value'] ) : array();
|
|
||||||
$hasTranslate = false;
|
$hasTranslate = false;
|
||||||
|
|
||||||
/* Check */
|
/* Check */
|
||||||
@@ -1978,9 +1975,10 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
* Updates the cached language files from the database
|
* Updates the cached language files from the database
|
||||||
*
|
*
|
||||||
* @param integer ID of the language pack to export
|
* @param integer ID of the language pack to export
|
||||||
|
* @param string Just cache one app?
|
||||||
* @return @e void
|
* @return @e void
|
||||||
*/
|
*/
|
||||||
public function cacheToDisk( $lang_id )
|
public function cacheToDisk( $lang_id, $app_override='' )
|
||||||
{
|
{
|
||||||
/* Generate cached warning */
|
/* Generate cached warning */
|
||||||
$warnString = "/*******************************************************\nNOTE: This is a cache file generated by IP.Board on " . date( "r" ) . " by " . $this->memberData['members_display_name'] . "\nDo not translate this file as you will lose your translations next time you edit via the ACP\nPlease translate via the ACP\n*******************************************************/\n\n";
|
$warnString = "/*******************************************************\nNOTE: This is a cache file generated by IP.Board on " . date( "r" ) . " by " . $this->memberData['members_display_name'] . "\nDo not translate this file as you will lose your translations next time you edit via the ACP\nPlease translate via the ACP\n*******************************************************/\n\n";
|
||||||
@@ -2013,100 +2011,123 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
mkdir( IPS_CACHE_PATH . 'cache/lang_cache/' . $lang_id . '/', IPS_FOLDER_PERMISSION );
|
mkdir( IPS_CACHE_PATH . 'cache/lang_cache/' . $lang_id . '/', IPS_FOLDER_PERMISSION );
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
/* Loop over apps */
|
||||||
// Get the words
|
$this->DB->build( array( 'select' => 'DISTINCT(word_app) as word_app',
|
||||||
//-----------------------------------------
|
'from' => 'core_sys_lang_words',
|
||||||
|
'limit' => array(0, 100 ) ) ); # Because you never know.
|
||||||
|
|
||||||
$this->DB->build( array( 'select' => '*', 'from' => 'core_sys_lang_words', 'where' => $where, 'order' => 'word_key ASC' ) );
|
$o = $this->DB->execute();
|
||||||
$this->DB->execute();
|
|
||||||
|
|
||||||
$words_by_file = array();
|
while( $langApps = $this->DB->fetch( $o ) )
|
||||||
|
|
||||||
while( $r = $this->DB->fetch() )
|
|
||||||
{
|
{
|
||||||
$_text = ( $r['word_custom'] ) ? $r['word_custom'] : $r['word_default'];
|
|
||||||
$words_by_file[$r['word_app']][$r['word_pack']][] = array( $r['word_key'], $_text );
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------
|
if ( $app_override )
|
||||||
// Now loop and write to file
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
foreach( $words_by_file as $app => $word_packs )
|
|
||||||
{
|
|
||||||
foreach( $word_packs as $pack => $words )
|
|
||||||
{
|
{
|
||||||
if( $pack == 'public_js' )
|
if ( $app_override != $langApps['word_app'] )
|
||||||
{
|
{
|
||||||
$to_write = '';
|
continue;
|
||||||
$_file = 'ipb.lang.js';
|
|
||||||
|
|
||||||
foreach( $words as $word )
|
|
||||||
{
|
|
||||||
$word[1] = str_replace( "\\", "\\\\", $word[1] );
|
|
||||||
$word[1] = str_replace( '"', '\\"', $word[1] );
|
|
||||||
$to_write .= "ipb.lang['{$word[0]}'] = \"{$word[1]}\";\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if( $pack == 'admin_js' )
|
}
|
||||||
{
|
|
||||||
$to_write = '';
|
|
||||||
$_file = 'acp.lang.js';
|
|
||||||
|
|
||||||
foreach( $words as $word )
|
//-----------------------------------------
|
||||||
|
// Get the words
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$this->DB->build( array( 'select' => 'word_custom, word_default, word_app, word_pack, word_key',
|
||||||
|
'from' => 'core_sys_lang_words',
|
||||||
|
'where' => $where . " AND word_app='" . $langApps['word_app'] . "'",
|
||||||
|
'order' => 'word_key ASC' ) );
|
||||||
|
|
||||||
|
$i = $this->DB->execute();
|
||||||
|
|
||||||
|
$words_by_file = array();
|
||||||
|
|
||||||
|
while( $r = $this->DB->fetch( $i ) )
|
||||||
|
{
|
||||||
|
$_text = ( $r['word_custom'] ) ? $r['word_custom'] : $r['word_default'];
|
||||||
|
$words_by_file[$r['word_app']][$r['word_pack']][] = array( $r['word_key'], $_text );
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Now loop and write to file
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
foreach( $words_by_file as $app => $word_packs )
|
||||||
|
{
|
||||||
|
foreach( $word_packs as $pack => $words )
|
||||||
|
{
|
||||||
|
if( $pack == 'public_js' )
|
||||||
{
|
{
|
||||||
$word[1] = str_replace( "\\", "\\\\", $word[1] );
|
$to_write = '';
|
||||||
$word[1] = str_replace( '"', '\\"', $word[1] );
|
$_file = 'ipb.lang.js';
|
||||||
$to_write .= "ipb.lang['{$word[0]}'] = \"{$word[1]}\";\n";
|
|
||||||
|
foreach( $words as $word )
|
||||||
|
{
|
||||||
|
$word[1] = str_replace( "\\", "\\\\", $word[1] );
|
||||||
|
$word[1] = str_replace( '"', '\\"', $word[1] );
|
||||||
|
$to_write .= "ipb.lang['{$word[0]}'] = \"{$word[1]}\";\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if( $pack == 'admin_js' )
|
||||||
else
|
|
||||||
{
|
|
||||||
//-----------------------------------------
|
|
||||||
// Build cache file contents
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$to_write = "<?php\n\n$warnString\n\n\$lang = array( \n";
|
|
||||||
$_file = $app . '_' . $pack . '.php';
|
|
||||||
|
|
||||||
foreach( $words as $word )
|
|
||||||
{
|
{
|
||||||
$word[1] = str_replace( "\\", "\\\\", $word[1] );
|
$to_write = '';
|
||||||
$word[1] = str_replace( '"', '\\"', $word[1] );
|
$_file = 'acp.lang.js';
|
||||||
|
|
||||||
|
foreach( $words as $word )
|
||||||
|
{
|
||||||
|
$word[1] = str_replace( "\\", "\\\\", $word[1] );
|
||||||
|
$word[1] = str_replace( '"', '\\"', $word[1] );
|
||||||
|
$to_write .= "ipb.lang['{$word[0]}'] = \"{$word[1]}\";\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Protect swapped sprintf arguments
|
// Build cache file contents
|
||||||
// @link http://community.invisionpower.com/tracker/issue-22240-lang-strings-using-sprintf-argument-swapping/
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$word[1] = str_replace( '$s', '\\$s', $word[1] );
|
$to_write = "<?php\n\n$warnString\n\n\$lang = array( \n";
|
||||||
|
$_file = $app . '_' . $pack . '.php';
|
||||||
|
|
||||||
$to_write .= "'{$word[0]}' => \"{$word[1]}\",\n";
|
foreach( $words as $word )
|
||||||
|
{
|
||||||
|
$word[1] = str_replace( "\\", "\\\\", $word[1] );
|
||||||
|
$word[1] = str_replace( '"', '\\"', $word[1] );
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Protect swapped sprintf arguments
|
||||||
|
// @link http://community.invisionpower.com/tracker/issue-22240-lang-strings-using-sprintf-argument-swapping/
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$word[1] = str_replace( '$s', '\\$s', $word[1] );
|
||||||
|
|
||||||
|
$to_write .= "'{$word[0]}' => \"{$word[1]}\",\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$to_write .= " ); \n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$to_write .= " ); \n";
|
//-----------------------------------------
|
||||||
}
|
// Write the file
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------
|
$_dir = IPS_CACHE_PATH . 'cache/lang_cache/' . $lang_id . '/';
|
||||||
// Write the file
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$_dir = IPS_CACHE_PATH . 'cache/lang_cache/' . $lang_id . '/';
|
if( is_file($_dir . $_file) )
|
||||||
|
{
|
||||||
|
@unlink( $_dir . $_file );
|
||||||
|
}
|
||||||
|
|
||||||
if( is_file($_dir . $_file) )
|
if ( $fh = @fopen( $_dir . $_file, 'wb' ) )
|
||||||
{
|
{
|
||||||
@unlink( $_dir . $_file );
|
fwrite( $fh, $to_write, strlen( $to_write ) );
|
||||||
}
|
fclose( $fh );
|
||||||
|
@chmod( $_dir . $_file, IPS_FILE_PERMISSION );
|
||||||
if ( $fh = @fopen( $_dir . $_file, 'wb' ) )
|
}
|
||||||
{
|
else
|
||||||
fwrite( $fh, $to_write, strlen( $to_write ) );
|
{
|
||||||
fclose( $fh );
|
$this->cache_errors[] = $this->lang->words['l_nowrite'] . $_dir . $_file;
|
||||||
@chmod( $_dir . $_file, IPS_FILE_PERMISSION );
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->cache_errors[] = $this->lang->words['l_nowrite'] . $_dir . $_file;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2115,14 +2136,14 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
/**
|
/**
|
||||||
* Imports language packs from an xml file and updates the database and recaches the languages
|
* Imports language packs from an xml file and updates the database and recaches the languages
|
||||||
*
|
*
|
||||||
* @param integer $lang_id ID of the language pack to import
|
* @param integer $lang_id ID of the language pack to import
|
||||||
* @param bool $in_dev Set to 1 for developer language import
|
* @param bool $in_dev Set to 1 for developer language import
|
||||||
* @param bool $no_return If set to 1, this function will return a value, rather than outputting data
|
* @param bool $no_return If set to 1, this function will return a value, rather than outputting data
|
||||||
* @param string $app_override Overrides the application for which languages are being imported
|
* @param string $app_override Overrides the application for which languages are being imported
|
||||||
* @param bool $skip_charset Skips charset conversion in the XML file (useful during upgrade routine as strings don't need to be converted)
|
* @param bool $skip_charset Skips charset conversion in the XML file (useful during upgrade routine as strings don't need to be converted)
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function imprtFromXML( $lang_id=0, $in_dev=0, $no_return=0, $app_override='', $skip_charset=false, $ru = '' )
|
public function imprtFromXML( $lang_id=0, $in_dev=0, $no_return=0, $app_override='', $skip_charset=false )
|
||||||
{
|
{
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Set version..
|
// Set version..
|
||||||
@@ -2167,7 +2188,7 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( preg_match( "#\.gz$#", $this->request['file_location'] ) )
|
if ( preg_match( '#\.gz$#', $this->request['file_location'] ) )
|
||||||
{
|
{
|
||||||
if ( $FH = @gzopen( $this->request['file_location'], 'rb' ) )
|
if ( $FH = @gzopen( $this->request['file_location'], 'rb' ) )
|
||||||
{
|
{
|
||||||
@@ -2236,7 +2257,7 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$tmp_name = $_FILES['FILE_UPLOAD']['name'];
|
$tmp_name = $_FILES['FILE_UPLOAD']['name'];
|
||||||
$tmp_name = preg_replace( "#\.gz$#", "", $tmp_name );
|
$tmp_name = preg_replace( '#\.gz$#', "", $tmp_name );
|
||||||
|
|
||||||
if( $_FILES['FILE_UPLOAD']['error'] )
|
if( $_FILES['FILE_UPLOAD']['error'] )
|
||||||
{
|
{
|
||||||
@@ -2260,7 +2281,14 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
// Get content
|
// Get content
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$uploadedContent = $this->registry->adminFunctions->importXml( $tmp_name );
|
try
|
||||||
|
{
|
||||||
|
$uploadedContent = $this->registry->adminFunctions->importXml( $tmp_name );
|
||||||
|
}
|
||||||
|
catch ( Exception $e )
|
||||||
|
{
|
||||||
|
$this->registry->output->showError( $e->getMessage() );
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Extract archive
|
// Extract archive
|
||||||
@@ -2430,16 +2458,14 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
|
|
||||||
if( $app_override )
|
if( $app_override )
|
||||||
{
|
{
|
||||||
$this->DB->build( array(
|
$this->DB->build( array( 'select' => "MD5( CONCAT( lang_id, '-', word_app, '-', word_pack, '-', word_key ) ) as word_lookup, word_id, md5(word_default) as word_default, word_default_version",
|
||||||
'select' => '*',
|
'from' => 'core_sys_lang_words',
|
||||||
'from' => 'core_sys_lang_words',
|
'where' => "word_app='{$app_override}' AND lang_id IN(" . implode( ",", $lang_ids ) . ")" ) );
|
||||||
'where' => "word_app='{$app_override}'"
|
|
||||||
) );
|
|
||||||
$this->DB->execute();
|
$this->DB->execute();
|
||||||
|
|
||||||
while( $r = $this->DB->fetch() )
|
while( $r = $this->DB->fetch() )
|
||||||
{
|
{
|
||||||
$lang_entries[ $r['lang_id'] ][ $r['word_app'] ][ $r['word_pack'] ][ $r['word_key'] ] = $r;
|
$lang_entries[ $r['word_lookup'] ] = $r;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2465,19 +2491,28 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
'word_pack' => $lang['word_pack'],
|
'word_pack' => $lang['word_pack'],
|
||||||
'word_key' => $lang['word_key'],
|
'word_key' => $lang['word_key'],
|
||||||
'word_default' => $lang['word_default'],
|
'word_default' => $lang['word_default'],
|
||||||
'word_custom' => $in_dev && !$ru ? '' : $lang['word_custom'],
|
'word_custom' => $in_dev ? '' : $lang['word_custom'],
|
||||||
'word_js' => intval($lang['word_js']),
|
'word_js' => intval($lang['word_js']),
|
||||||
'word_default_version' => $lang['word_default_version'] ? $lang['word_default_version'] : $LATESTVERSION['long'],
|
'word_default_version' => $lang['word_default_version'] ? $lang['word_default_version'] : $LATESTVERSION['long'],
|
||||||
'word_custom_version' => $lang['word_custom_version'],
|
'word_custom_version' => $lang['word_custom_version'],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$dbKey = md5( $db_array['lang_id'] . '-' . $db_array['word_app'] . '-' . $db_array['word_pack'] . '-' . $db_array['word_key'] );
|
||||||
|
$langIdKey = md5( $_lang_id . '-' . $db_array['word_app'] . '-' . $db_array['word_pack'] . '-' . $db_array['word_key'] );
|
||||||
|
|
||||||
|
// If the default value hasn't changed, we don't need to update the word_default_version (see bug report 19172)
|
||||||
|
if ( md5( $lang['word_default'] ) == $lang_entries[ $dbKey ]['word_default'] )
|
||||||
|
{
|
||||||
|
$db_array['word_default_version'] = $lang_entries[ $dbKey ]['word_default_version'];
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// If cached, get from cache
|
// If cached, get from cache
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
if( $lang_entries[ $_lang_id ][ $db_array['word_app'] ][ $db_array['word_pack'] ] )
|
if ( $lang_entries[ $langIdKey ] )
|
||||||
{
|
{
|
||||||
$lang_entry = $lang_entries[ $_lang_id ][ $db_array['word_app'] ][ $db_array['word_pack'] ][ $db_array['word_key'] ];
|
$lang_entry = $lang_entries[ $langIdKey ];
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -2496,12 +2531,12 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
|
|
||||||
while( $r = $this->DB->fetch() )
|
while( $r = $this->DB->fetch() )
|
||||||
{
|
{
|
||||||
$lang_entries[ $r['lang_id'] ][ $r['word_app'] ][ $r['word_pack'] ][ $r['word_key'] ] = $r;
|
$lang_entries[ md5( $r['lang_id'] . '-' . $r['word_app'] . '-' . $r['word_pack'] . '-' . $r['word_key'] ) ] = $r;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $lang_entries[ $_lang_id ][ $db_array['word_app'] ][ $db_array['word_pack'] ][ $db_array['word_key'] ] )
|
if ( $lang_entries[ $langIdKey ] )
|
||||||
{
|
{
|
||||||
$lang_entry = $lang_entries[ $_lang_id ][ $db_array['word_app'] ][ $db_array['word_pack'] ][ $db_array['word_key'] ];
|
$lang_entry = $lang_entries[ $langIdKey ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2566,16 +2601,21 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
$counts['inserts']++;
|
$counts['inserts']++;
|
||||||
$this->DB->insert( 'core_sys_lang_words', $db_array );
|
$this->DB->insert( 'core_sys_lang_words', $db_array );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unset( $lang_entry, $db_array );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Save some memory */
|
||||||
|
unset( $lang_entries );
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Recache all our lang packs
|
// Recache all our lang packs
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
foreach( $lang_ids as $_lang_id )
|
foreach( $lang_ids as $_lang_id )
|
||||||
{
|
{
|
||||||
$this->cacheToDisk( $_lang_id );
|
$this->cacheToDisk( $_lang_id, $app_override );
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -2845,7 +2885,7 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( preg_match( "#^" . $app . "_\S+?\.php$#", $f ) )
|
if ( preg_match( "#^" . $app . '_\S+?\.php$#', $f ) )
|
||||||
{
|
{
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// INIT
|
// INIT
|
||||||
@@ -2853,7 +2893,7 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
|
|
||||||
$updated = 0;
|
$updated = 0;
|
||||||
$inserted = 0;
|
$inserted = 0;
|
||||||
$word_pack = preg_replace( "#^" . $app . "_(\S+?)\.php$#", "\\1", $f );
|
$word_pack = preg_replace( "#^" . $app . '_(\S+?)\.php$#', "\\1", $f );
|
||||||
$lang = array();
|
$lang = array();
|
||||||
$db_lang = array();
|
$db_lang = array();
|
||||||
|
|
||||||
@@ -2937,7 +2977,7 @@ class admin_core_languages_manage_languages extends ipsCommand
|
|||||||
// preg_match what we want
|
// preg_match what we want
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
preg_match( "#ipb\.lang\['(.+?)'\](.+?)= [\"'](.+?)[\"'];#", $r, $matches );
|
preg_match( '#ipb\.lang\[\'(.+?)\'\](.+?)= ["\'](.+?)["\'];#', $r, $matches );
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Valid?
|
// Valid?
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||||
<body>
|
<body>
|
||||||
<h1>403: IP.Board -> Forbidden</h1>
|
<h1>403: IP.Board -> Forbidden</h1>
|
||||||
<hr>
|
<hr>
|
||||||
You have reached this page in error, please use your back button to return to the forum.
|
You have reached this page in error, please use your back button to return to the forum.
|
||||||
<hr>
|
<hr>
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
<menu>
|
<menu>
|
||||||
<tabitems>
|
<tabitems>
|
||||||
<item>
|
<item>
|
||||||
<title>Языки</title>
|
<title>Manage Languages</title>
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Языки системы</subitemtitle>
|
<subitemtitle>Manage Languages</subitemtitle>
|
||||||
<subitemlang>languages</subitemlang>
|
<subitemlang>languages</subitemlang>
|
||||||
<subsection>manage_languages</subsection>
|
<subsection>manage_languages</subsection>
|
||||||
<subitemurl></subitemurl>
|
<subitemurl></subitemurl>
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<permissions>
|
<permissions>
|
||||||
<group>
|
<group>
|
||||||
<grouptitle>Управление языками</grouptitle>
|
<grouptitle>Manage Languages</grouptitle>
|
||||||
<grouplang>core_languages</grouplang>
|
<grouplang>core_languages</grouplang>
|
||||||
<items>
|
<items>
|
||||||
<item>
|
<item>
|
||||||
<key>lang_words</key>
|
<key>lang_words</key>
|
||||||
<string>Может добавлять/изменять слова?</string>
|
<string>Can add/edit the language bit texts?</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>lang_packs</key>
|
<key>lang_packs</key>
|
||||||
<string>Может добавлять/изменять языковые наборы?</string>
|
<string>Can add/edit language packs?</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>lang_pack_info</key>
|
<key>lang_pack_info</key>
|
||||||
<string>Может изменять настройки и информацию языковых наборов?</string>
|
<string>Can alter the language pack properties and information?</string>
|
||||||
</item>
|
</item>
|
||||||
</items>
|
</items>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* ACP Login/Logout Routines
|
* ACP Login/Logout Routines
|
||||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since Tuesday 17th August 2004
|
* @since Tuesday 17th August 2004
|
||||||
* @version $Revision: 8644 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -118,6 +118,10 @@ class admin_core_login_manualResolver extends ipsCommand
|
|||||||
*/
|
*/
|
||||||
public function loginComplete()
|
public function loginComplete()
|
||||||
{
|
{
|
||||||
|
/* Fetch sessions API */
|
||||||
|
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/session/api.php', 'session_api' );
|
||||||
|
$publicApi = new $classToLoad( $this->registry );
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Check form details.
|
// Check form details.
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -207,10 +211,10 @@ class admin_core_login_manualResolver extends ipsCommand
|
|||||||
$extra_query = str_replace( $this->settings['_original_base_url'] , "" , $extra_query );
|
$extra_query = str_replace( $this->settings['_original_base_url'] , "" , $extra_query );
|
||||||
$extra_query = str_ireplace( "?index." . $this->settings['php_ext'] , "" , $extra_query );
|
$extra_query = str_ireplace( "?index." . $this->settings['php_ext'] , "" , $extra_query );
|
||||||
$extra_query = ltrim( $extra_query, '?' );
|
$extra_query = ltrim( $extra_query, '?' );
|
||||||
$extra_query = preg_replace( "!adsess=(\w){32}!" , "" , $extra_query );
|
$extra_query = preg_replace( '!adsess=(\w){32}!' , "" , $extra_query );
|
||||||
$extra_query = str_replace( "adsess=x" , "" , $extra_query );
|
$extra_query = str_replace( "adsess=x" , "" , $extra_query );
|
||||||
$extra_query = str_replace( array( 'old_&', 'old_&' ) , "" , $extra_query );
|
$extra_query = str_replace( array( 'old_&', 'old_&' ) , "" , $extra_query );
|
||||||
$extra_query = preg_replace( "!s=(\w){32}!" , "" , $extra_query );
|
$extra_query = preg_replace( '!s=(\w){32}!' , "" , $extra_query );
|
||||||
$extra_query = str_replace( "module=login" , "" , $extra_query );
|
$extra_query = str_replace( "module=login" , "" , $extra_query );
|
||||||
$extra_query = str_replace( "do=login-complete" , "" , $extra_query );
|
$extra_query = str_replace( "do=login-complete" , "" , $extra_query );
|
||||||
$extra_query = str_replace( "/admin" , "" , $extra_query );
|
$extra_query = str_replace( "/admin" , "" , $extra_query );
|
||||||
@@ -230,21 +234,22 @@ class admin_core_login_manualResolver extends ipsCommand
|
|||||||
/* Grab user agent */
|
/* Grab user agent */
|
||||||
$uAgent = array();
|
$uAgent = array();
|
||||||
|
|
||||||
$this->DB->insert( 'core_sys_cp_sessions', array (
|
$this->DB->insert( 'core_sys_cp_sessions', array( 'session_id' => $sess_id,
|
||||||
'session_id' => $sess_id,
|
'session_ip_address' => $this->member->ip_address,
|
||||||
'session_ip_address' => $this->member->ip_address,
|
'session_member_name' => $mem['members_display_name'],
|
||||||
'session_member_name' => $mem['members_display_name'],
|
'session_member_id' => $mem['member_id'],
|
||||||
'session_member_id' => $mem['member_id'],
|
'session_member_login_key' => $mem['member_login_key'],
|
||||||
'session_member_login_key' => $mem['member_login_key'],
|
'session_location' => 'index',
|
||||||
'session_location' => 'index',
|
'session_log_in_time' => time(),
|
||||||
'session_log_in_time' => time(),
|
'session_running_time' => time(),
|
||||||
'session_running_time' => time(),
|
'session_app_data' => serialize( $uAgent ),
|
||||||
'session_app_data' => serialize( $uAgent ),
|
'session_url' => '' ) );
|
||||||
'session_url' => '',
|
|
||||||
) );
|
|
||||||
|
|
||||||
$this->request['adsess'] = $sess_id;
|
$this->request['adsess'] = $sess_id;
|
||||||
|
|
||||||
|
/* Log them in public side if not already */
|
||||||
|
$publicApi->logGuestInAsMember( $mem['member_id'] );
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Redirect...
|
// Redirect...
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -275,7 +280,7 @@ class admin_core_login_manualResolver extends ipsCommand
|
|||||||
// Redirect...
|
// Redirect...
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
ipsRegistry::getClass('output')->redirect( $this->settings['base_url'] . '/' . CP_DIRECTORY . '/index.php', $this->lang->words['logout_complete'] );
|
ipsRegistry::getClass('output')->silentRedirect( $this->settings['_admin_link'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Admin logs
|
* Admin logs
|
||||||
* Last Updated: $LastChangedDate: 2011-06-01 22:13:27 -0400 (Wed, 01 Jun 2011) $
|
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 27th January 2004
|
* @since 27th January 2004
|
||||||
* @version $Rev: 8938 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -60,16 +60,6 @@ class admin_core_logs_adminlogs extends ipsCommand
|
|||||||
|
|
||||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Fix up navigation bar
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$this->registry->output->core_nav = array();
|
|
||||||
$this->registry->output->ignoreCoreNav = true;
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=adminlogs', $this->lang->words['alog_adminlogs'] );
|
|
||||||
|
|
||||||
///----------------------------------------
|
///----------------------------------------
|
||||||
// What to do...
|
// What to do...
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -77,19 +67,26 @@ class admin_core_logs_adminlogs extends ipsCommand
|
|||||||
switch( $this->request['do'] )
|
switch( $this->request['do'] )
|
||||||
{
|
{
|
||||||
case 'view':
|
case 'view':
|
||||||
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=adminlogs', $this->lang->words['alog_adminlogs'] );
|
||||||
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'adminlogs_view' );
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'adminlogs_view' );
|
||||||
$this->_view();
|
$this->_view();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'remove':
|
case 'remove':
|
||||||
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=adminlogs', $this->lang->words['alog_adminlogs'] );
|
||||||
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'adminlogs_delete' );
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'adminlogs_delete' );
|
||||||
$this->_remove();
|
$this->_remove();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=adminlogs', $this->lang->words['alog_adminlogs'] );
|
||||||
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'adminlogs_view' );
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'adminlogs_view' );
|
||||||
$this->_listCurrent();
|
$this->_listCurrent();
|
||||||
break;
|
break;
|
||||||
|
case 'showArchived':
|
||||||
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=adminlogs&do=showArchived', $this->lang->words['archiver_title'] );
|
||||||
|
$this->_listArchiver();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Output */
|
/* Output */
|
||||||
@@ -97,6 +94,41 @@ class admin_core_logs_adminlogs extends ipsCommand
|
|||||||
$this->registry->output->sendOutput();
|
$this->registry->output->sendOutput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View archive logs
|
||||||
|
*
|
||||||
|
* @return @e void [Outputs to screen]
|
||||||
|
*/
|
||||||
|
protected function _listArchiver()
|
||||||
|
{
|
||||||
|
$data = array();
|
||||||
|
$start = intval( $this->request['st'] );
|
||||||
|
|
||||||
|
/* Get count */
|
||||||
|
$count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'core_archive_log' ) );
|
||||||
|
|
||||||
|
$this->DB->build( array( 'select' => '*',
|
||||||
|
'from' => 'core_archive_log',
|
||||||
|
'order' => 'archlog_date DESC',
|
||||||
|
'limit' => array( $start, 50 ) ) );
|
||||||
|
$this->DB->execute();
|
||||||
|
|
||||||
|
while( $row = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
$data[] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Pagination */
|
||||||
|
$links = $this->registry->output->generatePagination( array( 'totalItems' => $count['count'],
|
||||||
|
'itemsPerPage' => 50,
|
||||||
|
'currentStartValue' => $start,
|
||||||
|
'baseUrl' => $this->settings['base_url'] . $this->form_code . '&do=showArchived' ) );
|
||||||
|
|
||||||
|
/* Show output */
|
||||||
|
|
||||||
|
$this->registry->output->html .= $this->html->archiverlogsView( $data, $links );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* View all logs for a given admin
|
* View all logs for a given admin
|
||||||
*
|
*
|
||||||
@@ -289,7 +321,7 @@ class admin_core_logs_adminlogs extends ipsCommand
|
|||||||
$this->DB->build( array(
|
$this->DB->build( array(
|
||||||
'select' => 'count(l.member_id) as act_count, l.member_id',
|
'select' => 'count(l.member_id) as act_count, l.member_id',
|
||||||
'from' => array( 'admin_logs' => 'l' ),
|
'from' => array( 'admin_logs' => 'l' ),
|
||||||
'group' => 'l.member_id',
|
'group' => 'l.member_id, m.members_display_name',
|
||||||
'order' => 'act_count DESC',
|
'order' => 'act_count DESC',
|
||||||
'add_join' => array(
|
'add_join' => array(
|
||||||
array(
|
array(
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
* @file defaultSection.php Define the default section for the 'logs' module
|
* @file defaultSection.php Define the default section for the 'logs' module
|
||||||
*~TERABYTE_DOC_READY~
|
*~TERABYTE_DOC_READY~
|
||||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* $License: This is NULLED!
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* $Author: ips_terabyte $
|
* $Author: bfarber $
|
||||||
* @since 20th February 2002
|
* @since 20th February 2002
|
||||||
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* @version v3.2.3
|
* @version v3.3.4
|
||||||
* $Revision: 8655 $
|
* $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$DEFAULT_SECTION = 'adminlogs';
|
$DEFAULT_SECTION = 'logsSplash';
|
||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Email error logs
|
* Email error logs
|
||||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 27th January 2004
|
* @since 27th January 2004
|
||||||
* @version $Rev: 8644 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -60,14 +60,6 @@ class admin_core_logs_emailerrorlogs extends ipsCommand
|
|||||||
|
|
||||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Fix up navigation bar
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$this->registry->output->core_nav = array();
|
|
||||||
$this->registry->output->ignoreCoreNav = true;
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=emailerrorlogs', $this->lang->words['elog_email_err_logs'] );
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=emailerrorlogs', $this->lang->words['elog_email_err_logs'] );
|
||||||
|
|
||||||
///----------------------------------------
|
///----------------------------------------
|
||||||
|
|||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Error logs
|
* Error logs
|
||||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 27th January 2004
|
* @since 27th January 2004
|
||||||
* @version $Rev: 8644 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -60,14 +60,6 @@ class admin_core_logs_errorlogs extends ipsCommand
|
|||||||
|
|
||||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Fix up navigation bar
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$this->registry->output->core_nav = array();
|
|
||||||
$this->registry->output->ignoreCoreNav = true;
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=errorlogs', $this->lang->words['error_log_thelogs'] );
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=errorlogs', $this->lang->words['error_log_thelogs'] );
|
||||||
|
|
||||||
///----------------------------------------
|
///----------------------------------------
|
||||||
|
|||||||
+21
-16
@@ -2,18 +2,18 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Admin Login Logs
|
* Admin Login Logs
|
||||||
* Last Updated: $LastChangedDate: 2011-09-01 08:16:37 -0400 (Thu, 01 Sep 2011) $
|
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 9439 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -22,7 +22,7 @@ if ( ! defined( 'IN_ACP' ) )
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
class admin_core_system_loginlog extends ipsCommand
|
class admin_core_logs_loginlog extends ipsCommand
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Main class entry point
|
* Main class entry point
|
||||||
@@ -39,15 +39,9 @@ class admin_core_system_loginlog extends ipsCommand
|
|||||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs', 'admin_system' ) );
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs', 'admin_system' ) );
|
||||||
|
|
||||||
/* URLs */
|
/* URLs */
|
||||||
$this->form_code = 'module=system&section=loginlog';
|
$this->form_code = 'module=logs&section=loginlog';
|
||||||
$this->form_code_js = 'module=system§ion=loginlog';
|
$this->form_code_js = 'module=logs§ion=loginlog';
|
||||||
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=loginlog', $this->lang->words['al_error_logs'] );
|
||||||
/* Navigation */
|
|
||||||
$this->registry->output->core_nav = array();
|
|
||||||
$this->registry->output->ignoreCoreNav = true;
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=system§ion=loginlog', $this->lang->words['al_error_logs'] );
|
|
||||||
|
|
||||||
/* Load skin */
|
/* Load skin */
|
||||||
$this->html = $this->registry->output->loadTemplate('cp_skin_system');
|
$this->html = $this->registry->output->loadTemplate('cp_skin_system');
|
||||||
@@ -101,6 +95,17 @@ class admin_core_system_loginlog extends ipsCommand
|
|||||||
$log['_admin_time'] = $this->registry->class_localization->getDate( $log['admin_time'], 'LONG' );
|
$log['_admin_time'] = $this->registry->class_localization->getDate( $log['admin_time'], 'LONG' );
|
||||||
$log['_admin_post_details'] = unserialize( $log['admin_post_details'] );
|
$log['_admin_post_details'] = unserialize( $log['admin_post_details'] );
|
||||||
|
|
||||||
|
foreach( array( 'get', 'post' ) as $r )
|
||||||
|
{
|
||||||
|
if ( is_array( $log['_admin_post_details'][ $r ] ) )
|
||||||
|
{
|
||||||
|
foreach( $log['_admin_post_details'][ $r ] as $k => $v )
|
||||||
|
{
|
||||||
|
$log['_admin_post_details'][ $r ][ $k ] = htmlspecialchars( $v );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Show...
|
// Show...
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -3,11 +3,11 @@
|
|||||||
* @file logsSplash.php Logs splash screen
|
* @file logsSplash.php Logs splash screen
|
||||||
*~TERABYTE_DOC_READY~
|
*~TERABYTE_DOC_READY~
|
||||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* $License: This is NULLED!
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* $Author: bfarber $
|
* $Author: bfarber $
|
||||||
* @since 8th Feb 2011
|
* @since 8th Feb 2011
|
||||||
* $LastChangedDate: 2011-09-12 20:59:05 -0400 (Mon, 12 Sep 2011) $
|
* $LastChangedDate: 2011-09-12 20:59:05 -0400 (Mon, 12 Sep 2011) $
|
||||||
* @version v3.2.3
|
* @version v3.3.4
|
||||||
* $Revision: 9483 $
|
* $Revision: 9483 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,18 +3,18 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Mobile Notification logs
|
* Mobile Notification logs
|
||||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 8644 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -59,14 +59,6 @@ class admin_core_logs_mobilelogs extends ipsCommand
|
|||||||
|
|
||||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Fix up navigation bar
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$this->registry->output->core_nav = array();
|
|
||||||
$this->registry->output->ignoreCoreNav = true;
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=mobilelogs', $this->lang->words['mlog_mobilelogs'] );
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=mobilelogs', $this->lang->words['mlog_mobilelogs'] );
|
||||||
|
|
||||||
///----------------------------------------
|
///----------------------------------------
|
||||||
|
|||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Moderator logs
|
* Moderator logs
|
||||||
* Last Updated: $LastChangedDate: 2011-09-15 17:04:35 -0400 (Thu, 15 Sep 2011) $
|
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 27th January 2004
|
* @since 27th January 2004
|
||||||
* @version $Rev: 9495 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -60,14 +60,6 @@ class admin_core_logs_modlogs extends ipsCommand
|
|||||||
|
|
||||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Fix up navigation bar
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$this->registry->output->core_nav = array();
|
|
||||||
$this->registry->output->ignoreCoreNav = true;
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=modlogs', $this->lang->words['mlog_modlogs'] );
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=modlogs', $this->lang->words['mlog_modlogs'] );
|
||||||
|
|
||||||
///----------------------------------------
|
///----------------------------------------
|
||||||
@@ -312,7 +304,7 @@ class admin_core_logs_modlogs extends ipsCommand
|
|||||||
$this->DB->build( array(
|
$this->DB->build( array(
|
||||||
'select' => 'count(l.member_id) as act_count, l.member_id',
|
'select' => 'count(l.member_id) as act_count, l.member_id',
|
||||||
'from' => array( 'moderator_logs' => 'l' ),
|
'from' => array( 'moderator_logs' => 'l' ),
|
||||||
'group' => 'l.member_id',
|
'group' => 'l.member_id, m.members_display_name',
|
||||||
'order' => 'act_count DESC',
|
'order' => 'act_count DESC',
|
||||||
'add_join' => array(
|
'add_join' => array(
|
||||||
array(
|
array(
|
||||||
|
|||||||
@@ -3,18 +3,18 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Admin logs
|
* Admin logs
|
||||||
* Last Updated: $LastChangedDate: 2011-05-12 22:28:10 -0400 (Thu, 12 May 2011) $
|
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @version $Rev: 8754 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -59,14 +59,6 @@ class admin_core_logs_spamlogs extends ipsCommand
|
|||||||
|
|
||||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Fix up navigation bar
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$this->registry->output->core_nav = array();
|
|
||||||
$this->registry->output->ignoreCoreNav = true;
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=spamlogs', $this->lang->words['slog_spamlogs'] );
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=spamlogs', $this->lang->words['slog_spamlogs'] );
|
||||||
|
|
||||||
///----------------------------------------
|
///----------------------------------------
|
||||||
|
|||||||
@@ -3,19 +3,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Search Engine Spider logs
|
* Search Engine Spider logs
|
||||||
* Last Updated: $LastChangedDate: 2011-05-11 22:11:30 -0400 (Wed, 11 May 2011) $
|
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 27th January 2004
|
* @since 27th January 2004
|
||||||
* @version $Rev: 8734 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -76,14 +76,6 @@ class admin_core_logs_spiderlogs extends ipsCommand
|
|||||||
|
|
||||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Fix up navigation bar
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$this->registry->output->core_nav = array();
|
|
||||||
$this->registry->output->ignoreCoreNav = true;
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=spiderlogs', $this->lang->words['slog_spider_logs'] );
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=spiderlogs', $this->lang->words['slog_spider_logs'] );
|
||||||
|
|
||||||
///----------------------------------------
|
///----------------------------------------
|
||||||
@@ -161,7 +153,7 @@ class admin_core_logs_spiderlogs extends ipsCommand
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->request[ 'search_string'] = IPSText::parseCleanValue( urldecode($this->request['search_string'] ) );
|
$this->request['search_string'] = IPSText::parseCleanValue( urldecode($this->request['search_string'] ) );
|
||||||
|
|
||||||
$row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "query_string LIKE '%" . $this->request['search_string'] . "%'" ) );
|
$row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "query_string LIKE '%" . $this->request['search_string'] . "%'" ) );
|
||||||
|
|
||||||
@@ -214,7 +206,7 @@ class admin_core_logs_spiderlogs extends ipsCommand
|
|||||||
$query_string_html = "<a href='http://" . $_SERVER['HTTP_HOST'] . "{$row['request_addr']}' target='_blank'>" . IPSText::truncate($row['request_addr']) . "</a>";
|
$query_string_html = "<a href='http://" . $_SERVER['HTTP_HOST'] . "{$row['request_addr']}' target='_blank'>" . IPSText::truncate($row['request_addr']) . "</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$row['_bot_name'] = $this->bot_map[ mb_strtolower($row['bot']) ];
|
$row['_bot_name'] = $this->bot_map[ strtolower($row['bot']) ];
|
||||||
$row['_query_string'] = $query_string_html;
|
$row['_query_string'] = $query_string_html;
|
||||||
$row['_time'] = $this->registry->getClass('class_localization')->getDate( $row['entry_date'], 'LONG' );
|
$row['_time'] = $this->registry->getClass('class_localization')->getDate( $row['entry_date'], 'LONG' );
|
||||||
|
|
||||||
@@ -273,7 +265,7 @@ class admin_core_logs_spiderlogs extends ipsCommand
|
|||||||
|
|
||||||
while ( $r = $this->DB->fetch() )
|
while ( $r = $this->DB->fetch() )
|
||||||
{
|
{
|
||||||
$r['_bot_name'] = $this->bot_map[ mb_strtolower($r['bot']) ];
|
$r['_bot_name'] = $this->bot_map[ strtolower($r['bot']) ];
|
||||||
$r['_time'] = $this->registry->getClass('class_localization')->getDate( $r['entry_date'], 'SHORT' );
|
$r['_time'] = $this->registry->getClass('class_localization')->getDate( $r['entry_date'], 'SHORT' );
|
||||||
$r['_bot_url'] = urlencode($r['bot']);
|
$r['_bot_url'] = urlencode($r['bot']);
|
||||||
|
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* SQL error logs
|
* SQL error logs
|
||||||
* Last Updated: $LastChangedDate: 2011-07-26 04:00:17 -0400 (Tue, 26 Jul 2011) $
|
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: mmecham $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 27th January 2004
|
* @since 27th January 2004
|
||||||
* @version $Rev: 9317 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -59,15 +59,7 @@ class admin_core_logs_sqlerror extends ipsCommand
|
|||||||
|
|
||||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
||||||
|
|
||||||
//-----------------------------------------
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=sqlerror', $this->lang->words['sqllog_title'] );
|
||||||
// Fix up navigation bar
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$this->registry->output->core_nav = array();
|
|
||||||
$this->registry->output->ignoreCoreNav = true;
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=sqlerror', $this->lang->words['mlog_sqlerrors'] );
|
|
||||||
|
|
||||||
///----------------------------------------
|
///----------------------------------------
|
||||||
// What to do...
|
// What to do...
|
||||||
@@ -236,13 +228,15 @@ class admin_core_logs_sqlerror extends ipsCommand
|
|||||||
|
|
||||||
if ( preg_match( "#^sql_error_log_(\d+)_(\d+)_(\d+).cgi$#", $file->getFilename(), $matches ) )
|
if ( preg_match( "#^sql_error_log_(\d+)_(\d+)_(\d+).cgi$#", $file->getFilename(), $matches ) )
|
||||||
{
|
{
|
||||||
$rows[] = array( 'name' => $file->getFilename(),
|
$rows[ $file->getFilename() ] = array( 'name' => $file->getFilename(),
|
||||||
'mtime' => $file->getMTime(),
|
'mtime' => $file->getMTime(),
|
||||||
'size' => $file->getSize() );
|
'size' => $file->getSize() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch ( Exception $e ) {}
|
} catch ( Exception $e ) {}
|
||||||
|
|
||||||
|
ksort( $rows );
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// And output
|
// And output
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|||||||
@@ -0,0 +1,213 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @file taskmanager.php Task manager
|
||||||
|
*~TERABYTE_DOC_READY~
|
||||||
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
|
* $Author: bfarber $
|
||||||
|
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
|
* @version v3.3.4
|
||||||
|
* $Revision: 10914 $
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
|
{
|
||||||
|
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @class admin_core_system_taskmanager
|
||||||
|
* @brief Task manager
|
||||||
|
*/
|
||||||
|
class admin_core_logs_tasklogs extends ipsCommand
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Skin object shortcut
|
||||||
|
*
|
||||||
|
* @var $html
|
||||||
|
*/
|
||||||
|
public $html;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* String for the screen url bit
|
||||||
|
*
|
||||||
|
* @var $form_code
|
||||||
|
*/
|
||||||
|
public $form_code = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* String for the JS url bit
|
||||||
|
*
|
||||||
|
* @var $form_code_js
|
||||||
|
*/
|
||||||
|
public $form_code_js = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Main function executed automatically by the controller
|
||||||
|
*
|
||||||
|
* @param object $registry Registry object
|
||||||
|
* @return @e void
|
||||||
|
*/
|
||||||
|
public function doExecute( ipsRegistry $registry )
|
||||||
|
{
|
||||||
|
/* Load Class */
|
||||||
|
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/class_taskmanager.php', 'class_taskmanager' );
|
||||||
|
$this->func_taskmanager = new $classToLoad( $registry );
|
||||||
|
|
||||||
|
/* Load Skin and Language */
|
||||||
|
$this->html = $this->registry->output->loadTemplate('cp_skin_system');
|
||||||
|
|
||||||
|
$this->registry->class_localization->loadLanguageFile( array( 'admin_system' ) );
|
||||||
|
|
||||||
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=tasklogs', $this->lang->words['sched_error_logs'] );
|
||||||
|
|
||||||
|
/* URLs */
|
||||||
|
$this->form_code = $this->html->form_code = 'module=logs&section=tasklogs';
|
||||||
|
$this->form_code_js = $this->html->form_code_js = 'module=logs§ion=tasklogs';
|
||||||
|
|
||||||
|
switch( $this->request['do'] )
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
case 'task_logs':
|
||||||
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tasklogs_view' );
|
||||||
|
$this->taskLogsOverview();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'task_log_show':
|
||||||
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tasklogs_view' );
|
||||||
|
$this->taskLogsShow();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'task_log_delete':
|
||||||
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tasklogs_delete' );
|
||||||
|
$this->taskLogsDelete();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Output */
|
||||||
|
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
|
||||||
|
$this->registry->output->sendOutput();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove logs for a specific task or all
|
||||||
|
*
|
||||||
|
* @return @e void
|
||||||
|
*/
|
||||||
|
public function taskLogsDelete()
|
||||||
|
{
|
||||||
|
/* INIT */
|
||||||
|
$prune = intval( $this->request['task_prune'] ) ? intval( $this->request['task_prune'] ) : 30;
|
||||||
|
$prune = time() - ( $prune * 86400 );
|
||||||
|
|
||||||
|
if( $this->request['task_title'] != -1 )
|
||||||
|
{
|
||||||
|
$where = "log_title='{$this->request['task_title']}' AND log_date > {$prune}";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$where = "log_date > {$prune}";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Delete */
|
||||||
|
$this->DB->delete( 'task_logs', $where );
|
||||||
|
|
||||||
|
/* Bounce */
|
||||||
|
$this->registry->output->global_message = $this->lang->words['t_removed'];
|
||||||
|
$this->taskLogsOverview();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show task logs
|
||||||
|
*
|
||||||
|
* @return @e void
|
||||||
|
*/
|
||||||
|
public function taskLogsShow()
|
||||||
|
{
|
||||||
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
||||||
|
|
||||||
|
/* INIT */
|
||||||
|
$limit = intval( $this->request['task_count'] ) ? intval( $this->request['task_count'] ) : 30;
|
||||||
|
$limit = $limit > 150 ? 150 : $limit;
|
||||||
|
|
||||||
|
/* Query the tasks */
|
||||||
|
if ( $this->request['task_title'] != -1 )
|
||||||
|
{
|
||||||
|
$this->DB->build( array( 'select' => '*', 'from' => 'task_logs', 'where' => "log_title='".$this->request['task_title']."'", 'order' => 'log_date DESC', 'limit' => array(0,$limit) ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->DB->build( array( 'select' => '*', 'from' => 'task_logs', 'order' => 'log_date DESC', 'limit' => array(0,$limit) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->DB->execute();
|
||||||
|
|
||||||
|
/* Loop through the tasks */
|
||||||
|
$rows = array();
|
||||||
|
|
||||||
|
while( $row = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
$row['log_date'] = ipsRegistry::getClass( 'class_localization')->getDate( $row['log_date'], 'TINY' );
|
||||||
|
$rows[] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->registry->output->html .= $this->html->taskManagerLogsShowWrapper( $rows );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds the task log overview screen
|
||||||
|
*
|
||||||
|
* @return @e void
|
||||||
|
*/
|
||||||
|
public function taskLogsOverview()
|
||||||
|
{
|
||||||
|
//-----------------------------------------
|
||||||
|
// Fix up navigation bar
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
||||||
|
|
||||||
|
$this->registry->output->core_nav = array();
|
||||||
|
$this->registry->output->ignoreCoreNav = true;
|
||||||
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] );
|
||||||
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] );
|
||||||
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=system§ion=taskmanager&do=task_logs', $this->lang->words['sched_error_logs'] );
|
||||||
|
|
||||||
|
/* INIT */
|
||||||
|
$tasks = array( 0 => array( -1, 'All tasks' ) );
|
||||||
|
$last5 = "";
|
||||||
|
$form = array();
|
||||||
|
|
||||||
|
/* Get thet ask titles */
|
||||||
|
$this->DB->build( array( 'select' => '*', 'from' => 'task_manager', 'order' => 'task_title' ) );
|
||||||
|
$this->DB->execute();
|
||||||
|
|
||||||
|
while ( $r = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
$tasks[] = array( $r['task_title'], $r['task_title'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get the last 5 logs */
|
||||||
|
$this->DB->build( array( 'select' => '*', 'from' => 'task_logs', 'order' => 'log_date DESC', 'limit' => array(0,5) ) );
|
||||||
|
$this->DB->execute();
|
||||||
|
|
||||||
|
$last5 = array();
|
||||||
|
while ( $row = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
//$row['log_desc'] = IPSText::truncate( $row['log_desc'] );
|
||||||
|
$row['log_date'] = $this->registry->class_localization->getDate( $row['log_date'], 'TINY' );
|
||||||
|
$last5[] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Build the form elements */
|
||||||
|
$form['task_title'] = $this->registry->output->formDropdown( 'task_title', $tasks, $this->request['task_title'] );
|
||||||
|
$form['task_title_delete'] = $this->registry->output->formDropdown( 'task_title', $tasks, $this->request['task_title_delete'] );
|
||||||
|
$form['task_count'] = $this->registry->output->formInput( 'task_count', $this->request['task_count'] ? $this->request['task_count'] : 30 );
|
||||||
|
$form['task_prune'] = $this->registry->output->formInput( 'task_prune', $this->request['task_prune'] ? $this->request['task_prune'] : 30 );
|
||||||
|
|
||||||
|
/* Output */
|
||||||
|
$this->registry->output->html .= $this->html->taskManagerLogsOverview( $last5, $form );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,21 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* @file warnlogs.php Warn logs
|
||||||
* Invision Power Services
|
*~TERABYTE_DOC_READY~
|
||||||
* IP.Board v3.2.3
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* Warn logs
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* Last Updated: $LastChangedDate: 2011-05-12 17:45:20 -0400 (Thu, 12 May 2011) $
|
* $Author: bfarber $
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @author $Author: bfarber $
|
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
|
||||||
* @license This is NULLED!
|
|
||||||
* @package IP.Board
|
|
||||||
* @subpackage Core
|
|
||||||
* @link http://hatynka.in
|
|
||||||
* @since 27th January 2004
|
* @since 27th January 2004
|
||||||
* @version $Rev: 8752 $
|
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
|
* @version v3.3.4
|
||||||
|
* $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -24,20 +17,38 @@ if ( ! defined( 'IN_ACP' ) )
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class admin_core_logs_warnlogs
|
||||||
|
* @brief Warn logs
|
||||||
|
*/
|
||||||
class admin_core_logs_warnlogs extends ipsCommand
|
class admin_core_logs_warnlogs extends ipsCommand
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Skin object
|
* Skin object shortcut
|
||||||
*
|
*
|
||||||
* @var object Skin templates
|
* @var $html
|
||||||
*/
|
*/
|
||||||
protected $html;
|
public $html;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main class entry point
|
* String for the screen url bit
|
||||||
*
|
*
|
||||||
* @param object ipsRegistry reference
|
* @var $form_code
|
||||||
* @return @e void [Outputs to screen]
|
*/
|
||||||
|
public $form_code = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* String for the JS url bit
|
||||||
|
*
|
||||||
|
* @var $form_code_js
|
||||||
|
*/
|
||||||
|
public $form_code_js = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Main function executed automatically by the controller
|
||||||
|
*
|
||||||
|
* @param object $registry Registry object
|
||||||
|
* @return @e void
|
||||||
*/
|
*/
|
||||||
public function doExecute( ipsRegistry $registry )
|
public function doExecute( ipsRegistry $registry )
|
||||||
{
|
{
|
||||||
@@ -60,14 +71,6 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
|
|
||||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Fix up navigation bar
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$this->registry->output->core_nav = array();
|
|
||||||
$this->registry->output->ignoreCoreNav = true;
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools§ion=logsSplash', $this->lang->words['nav_logssplash'] );
|
|
||||||
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=warnlogs', $this->lang->words['wlog_warn_logs'] );
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=warnlogs', $this->lang->words['wlog_warn_logs'] );
|
||||||
|
|
||||||
///----------------------------------------
|
///----------------------------------------
|
||||||
@@ -81,11 +84,6 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
$this->_view();
|
$this->_view();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'viewcontact':
|
|
||||||
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'warnlogs_view' );
|
|
||||||
$this->_viewContact();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'viewnote':
|
case 'viewnote':
|
||||||
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'warnlogs_view' );
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'warnlogs_view' );
|
||||||
$this->_viewNote();
|
$this->_viewNote();
|
||||||
@@ -110,7 +108,7 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
/**
|
/**
|
||||||
* View all logs for a given moderator
|
* View all logs for a given moderator
|
||||||
*
|
*
|
||||||
* @return @e void [Outputs to screen]
|
* @return @e void
|
||||||
*/
|
*/
|
||||||
protected function _view()
|
protected function _view()
|
||||||
{
|
{
|
||||||
@@ -120,6 +118,16 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
|
|
||||||
$start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0;
|
$start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0;
|
||||||
|
|
||||||
|
/* Load reasons */
|
||||||
|
$reasons = array();
|
||||||
|
$this->DB->build( array( 'select' => '*', 'from' => 'members_warn_reasons', 'order' => 'wr_order' ) );
|
||||||
|
$this->DB->execute();
|
||||||
|
while ( $row = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
$reasons[ $row['wr_id'] ] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
///----------------------------------------
|
///----------------------------------------
|
||||||
// No mid or search string?
|
// No mid or search string?
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -137,24 +145,24 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
|
|
||||||
if ( !$this->request['search_string'] )
|
if ( !$this->request['search_string'] )
|
||||||
{
|
{
|
||||||
$row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(wlog_id) as count', 'from' => 'warn_logs', 'where' => "wlog_mid=".intval($this->request['mid']) ) );
|
$row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(wl_id) as count', 'from' => 'members_warn_logs', 'where' => "wl_member=".intval($this->request['mid']) ) );
|
||||||
|
|
||||||
$query = "{$this->form_code}&mid=" . $this->request['mid'] . "&do=view";
|
$query = "{$this->form_code}&mid=" . $this->request['mid'] . "&do=view";
|
||||||
|
|
||||||
$this->DB->build( array( 'select' => 'l.*',
|
$this->DB->build( array( 'select' => 'l.*',
|
||||||
'from' => array( 'warn_logs' => 'l' ),
|
'from' => array( 'members_warn_logs' => 'l' ),
|
||||||
'where' => 'l.wlog_mid=' . intval($this->request['mid']),
|
'where' => 'l.wl_member=' . intval($this->request['mid']),
|
||||||
'order' => 'l.wlog_date DESC',
|
'order' => 'l.wl_date DESC',
|
||||||
'limit' => array( $start, 30 ),
|
'limit' => array( $start, 30 ),
|
||||||
'add_join' => array(
|
'add_join' => array(
|
||||||
array( 'select' => 'm.member_id as a_id, m.members_display_name as a_name',
|
array( 'select' => 'm.member_id as a_id, m.members_display_name as a_name',
|
||||||
'from' => array( 'members' => 'm' ),
|
'from' => array( 'members' => 'm' ),
|
||||||
'where' => 'm.member_id=l.wlog_mid',
|
'where' => 'm.member_id=l.wl_member',
|
||||||
'type' => 'left'
|
'type' => 'left'
|
||||||
),
|
),
|
||||||
array( 'select' => 'p.member_id as p_id, p.members_display_name as p_name',
|
array( 'select' => 'p.member_id as p_id, p.members_display_name as p_name',
|
||||||
'from' => array( 'members' => 'p' ),
|
'from' => array( 'members' => 'p' ),
|
||||||
'where' => 'p.member_id=l.wlog_addedby',
|
'where' => 'p.member_id=l.wl_moderator',
|
||||||
'type' => 'left'
|
'type' => 'left'
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -165,33 +173,26 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
{
|
{
|
||||||
$this->request[ 'search_string'] = IPSText::parseCleanValue( urldecode($this->request['search_string'] ) );
|
$this->request[ 'search_string'] = IPSText::parseCleanValue( urldecode($this->request['search_string'] ) );
|
||||||
|
|
||||||
if ( ($this->request['search_type'] == 'notes') )
|
$dbq = "l.wl_note_member LIKE '%" . $this->request['search_string'] . "%' OR l.wl_note_mods LIKE '%" . $this->request['search_string'] . "%'";
|
||||||
{
|
|
||||||
$dbq = "l.wlog_notes LIKE '%" . $this->request['search_string'] . "%'";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$dbq = "l.wlog_contact_content LIKE '%" . $this->request['search_string'] . "%'";
|
|
||||||
}
|
|
||||||
|
|
||||||
$row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(l.wlog_id) as count', 'from' => 'warn_logs l', 'where' => $dbq ) );
|
$row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(l.wl_id) as count', 'from' => 'members_warn_logs l', 'where' => $dbq ) );
|
||||||
|
|
||||||
$query = "{$this->form_code}&do=view&search_type=" . $this->request['search_type'] . "&search_string=" . urlencode($this->request['search_string']);
|
$query = "{$this->form_code}&do=view&search_type=" . $this->request['search_type'] . "&search_string=" . urlencode($this->request['search_string']);
|
||||||
|
|
||||||
$this->DB->build( array( 'select' => 'l.*',
|
$this->DB->build( array( 'select' => 'l.*',
|
||||||
'from' => array( 'warn_logs' => 'l' ),
|
'from' => array( 'members_warn_logs' => 'l' ),
|
||||||
'where' => $dbq,
|
'where' => $dbq,
|
||||||
'order' => 'l.wlog_date DESC',
|
'order' => 'l.wl_date DESC',
|
||||||
'limit' => array( $start, 30 ),
|
'limit' => array( $start, 30 ),
|
||||||
'add_join' => array(
|
'add_join' => array(
|
||||||
array( 'select' => 'm.member_id as a_id, m.members_display_name as a_name',
|
array( 'select' => 'm.member_id as a_id, m.members_display_name as a_name',
|
||||||
'from' => array( 'members' => 'm' ),
|
'from' => array( 'members' => 'm' ),
|
||||||
'where' => 'm.member_id=l.wlog_mid',
|
'where' => 'm.member_id=l.wl_member',
|
||||||
'type' => 'left'
|
'type' => 'left'
|
||||||
),
|
),
|
||||||
array( 'select' => 'p.member_id as p_id, p.members_display_name as p_name',
|
array( 'select' => 'p.member_id as p_id, p.members_display_name as p_name',
|
||||||
'from' => array( 'members' => 'p' ),
|
'from' => array( 'members' => 'p' ),
|
||||||
'where' => 'p.member_id=l.wlog_addedby',
|
'where' => 'p.member_id=l.wl_moderator',
|
||||||
'type' => 'left'
|
'type' => 'left'
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -204,7 +205,7 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$links = $this->registry->output->generatePagination( array( 'totalItems' => $row['count'],
|
$links = $this->registry->output->generatePagination( array( 'totalItems' => $row['count'],
|
||||||
'itemsPerPage' => 20,
|
'itemsPerPage' => 30,
|
||||||
'currentStartValue' => $start,
|
'currentStartValue' => $start,
|
||||||
'baseUrl' => $this->settings['base_url'] . $query,
|
'baseUrl' => $this->settings['base_url'] . $query,
|
||||||
)
|
)
|
||||||
@@ -218,58 +219,12 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
|
|
||||||
while ( $row = $this->DB->fetch() )
|
while ( $row = $this->DB->fetch() )
|
||||||
{
|
{
|
||||||
///----------------------------------------
|
$row['_a_name'] = $row['a_name'] ? $row['a_name'] : sprintf( $this->lang->words['wlog_deleted'], $row['wl_member'] );
|
||||||
// Basics
|
$row['_date'] = $this->registry->class_localization->getDate( $row['wl_date'], 'LONG' );
|
||||||
//-----------------------------------------
|
$row['wl_reason'] = $row['wl_reason'] ? $reasons[ $row['wl_reason'] ]['wr_name'] : '--';
|
||||||
|
$row['_mod'] = $row['wl_mq'] == -1 ? $this->lang->words['wlog_indef'] : ( $row['wl_mq'] == 0 ? $this->lang->words['wlog_none'] : $row['wl_mq'] . ' ' . $days[ $row['wl_mq_unit'] ? $row['wl_mq_unit'] : 'd' ] );
|
||||||
$row['_a_name'] = $row['a_name'] ? $row['a_name'] : sprintf( $this->lang->words['wlog_deleted'], $row['wlog_mid'] );
|
$row['_susp'] = $row['wl_suspend'] == -1 ? $this->lang->words['wlog_indef'] : ( $row['wl_suspend'] == 0 ? $this->lang->words['wlog_none'] : $row['wl_suspend'] . ' ' . $row[ $row['wl_suspend_unit'] ? $row['wl_suspend_unit'] : 'd' ] );
|
||||||
$row['_date'] = $this->registry->class_localization->getDate( $row['wlog_date'], 'LONG' );
|
$row['_post'] = $row['wl_rpa'] == -1 ? $this->lang->words['wlog_indef'] : ( $row['wl_rpa'] == 0 ? $this->lang->words['wlog_none'] : $row['wl_rpa'] . ' ' . $days[ $row['wl_rpa_unit'] ? $row['wl_rpa_unit'] : 'd' ] );
|
||||||
|
|
||||||
$row['_type'] = ( $row['wlog_type'] == 'pos' ) ? '<span style="color:green;font-weight:bold">-</span>' : '<span style="color:red;font-weight:bold">+</span>';
|
|
||||||
$row['_type'] = ( $row['wlog_type'] == 'custom' ) ? '<span style="color:grey;font-weight:bold">C</span>' : $row['_type'];
|
|
||||||
$row['_cont'] = ( $row['wlog_contact'] != 'none' ) ? "<a href='#' onclick='return acp.openWindow(\"{$this->settings['base_url']}&{$this->form_code}&do=viewcontact&id={$row['wlog_id']}\", 400,400, \"{$this->lang->words['wlog_log']}\"); return false;'>{$this->lang->words['wlog_view']}</a>" : ' ';
|
|
||||||
|
|
||||||
///----------------------------------------
|
|
||||||
// Mod Q
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
if ( strstr( $row['wlog_notes'], '<content>' ) )
|
|
||||||
{
|
|
||||||
$mod = preg_match( "#<mod>(.+?)</mod>#is" , $row['wlog_notes'], $mm );
|
|
||||||
$mod = trim($mm[1]);
|
|
||||||
list($v, $u, $i) = explode( ',', $mod);
|
|
||||||
|
|
||||||
$row['_mod'] = ( $i == 1 ) ? $this->lang->words['wlog_indef'] : ( $v == "" ? $this->lang->words['wlog_none'] : $v . ' ' . $days[$u] );
|
|
||||||
|
|
||||||
///----------------------------------------
|
|
||||||
// Susp
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$susp = preg_match( "#<susp>(.+?)</susp>#is" , $row['wlog_notes'], $sm );
|
|
||||||
$susp = trim($sm[1]);
|
|
||||||
list($v, $u) = explode( ',', $susp );
|
|
||||||
$row['_susp'] = $v == '' ? $this->lang->words['wlog_none'] : $v . ' ' . $days[$u];
|
|
||||||
|
|
||||||
///----------------------------------------
|
|
||||||
// Posting Susp
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$post = preg_match( "#<post>(.+?)</post>#is" , $row['wlog_notes'], $pm );
|
|
||||||
$post = trim($pm[1]);
|
|
||||||
list($v, $u, $i) = explode( ',', $post );
|
|
||||||
|
|
||||||
$row['_post'] = ( $i == 1 ) ? $this->lang->words['wlog_indef'] : ( $v == "" ? $this->lang->words['wlog_none'] : $v . ' ' . $days[$u] );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$_wlog = unserialize( $row['wlog_notes'] );
|
|
||||||
|
|
||||||
$row['_mod'] = $_wlog['mod_indef'] ? $this->lang->words['wlog_indef'] : ( $_wlog['mod'] == 0 ? $this->lang->words['wlog_none'] : $_wlog['mod'] . ' ' . $days[ $_wlog['mod_unit'] ? $_wlog['mod_unit'] : 'd' ] );
|
|
||||||
$row['_susp'] = $_wlog['ban'] ? $this->lang->words['wlog_indef'] : ( $_wlog['susp'] == 0 ? $this->lang->words['wlog_none'] : $_wlog['susp'] . ' ' . $days[ $_wlog['susp_unit'] ? $_wlog['susp_unit'] : 'd' ] );
|
|
||||||
$row['_post'] = $_wlog['post_indef'] ? $this->lang->words['wlog_indef'] : ( $_wlog['post'] == 0 ? $this->lang->words['wlog_none'] : $_wlog['post'] . ' ' . $days[ $_wlog['post_unit'] ? $_wlog['post_unit'] : 'd' ] );
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$rows[] = $row;
|
$rows[] = $row;
|
||||||
}
|
}
|
||||||
@@ -284,7 +239,7 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
/**
|
/**
|
||||||
* Remove logs by a moderator
|
* Remove logs by a moderator
|
||||||
*
|
*
|
||||||
* @return @e void [Outputs to screen]
|
* @return @e void
|
||||||
*/
|
*/
|
||||||
protected function _remove()
|
protected function _remove()
|
||||||
{
|
{
|
||||||
@@ -293,7 +248,7 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
$this->registry->output->showError( $this->lang->words['wlog_nofind'], 11133 );
|
$this->registry->output->showError( $this->lang->words['wlog_nofind'], 11133 );
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->DB->delete( 'warn_logs', "wlog_mid=" . intval($this->request['mid']) );
|
$this->DB->delete( 'members_warn_logs', "wl_member=" . intval($this->request['mid']) );
|
||||||
|
|
||||||
$this->registry->getClass('adminFunctions')->saveAdminLog( sprintf( $this->lang->words['wlog_removelogs'], $this->request['mid'] ) );
|
$this->registry->getClass('adminFunctions')->saveAdminLog( sprintf( $this->lang->words['wlog_removelogs'], $this->request['mid'] ) );
|
||||||
|
|
||||||
@@ -303,30 +258,31 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
/**
|
/**
|
||||||
* List the current logs with links to view per-admin
|
* List the current logs with links to view per-admin
|
||||||
*
|
*
|
||||||
* @return @e void [Outputs to screen]
|
* @return @e void
|
||||||
*/
|
*/
|
||||||
protected function _listCurrent()
|
protected function _listCurrent()
|
||||||
{
|
{
|
||||||
$rows = array();
|
/* Init vars */
|
||||||
$members = array();
|
$rows = array();
|
||||||
|
$members = array();
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// VIEW LAST 5
|
// VIEW LAST 5
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$this->DB->build( array( 'select' => 'l.*',
|
$this->DB->build( array( 'select' => 'l.*',
|
||||||
'from' => array( 'warn_logs' => 'l' ),
|
'from' => array( 'members_warn_logs' => 'l' ),
|
||||||
'order' => 'l.wlog_date DESC',
|
'order' => 'l.wl_date DESC',
|
||||||
'limit' => array( 0, 10 ),
|
'limit' => array( 0, 10 ),
|
||||||
'add_join' => array(
|
'add_join' => array(
|
||||||
array( 'select' => 'm.member_id as a_id, m.members_display_name as a_name',
|
array( 'select' => 'm.member_id as a_id, m.members_display_name as a_name',
|
||||||
'from' => array( 'members' => 'm' ),
|
'from' => array( 'members' => 'm' ),
|
||||||
'where' => 'm.member_id=l.wlog_mid',
|
'where' => 'm.member_id=l.wl_member',
|
||||||
'type' => 'left'
|
'type' => 'left'
|
||||||
),
|
),
|
||||||
array( 'select' => 'p.member_id as p_id, p.members_display_name as p_name',
|
array( 'select' => 'p.member_id as p_id, p.members_display_name as p_name',
|
||||||
'from' => array( 'members' => 'p' ),
|
'from' => array( 'members' => 'p' ),
|
||||||
'where' => 'p.member_id=l.wlog_addedby',
|
'where' => 'p.member_id=l.wl_moderator',
|
||||||
'type' => 'left'
|
'type' => 'left'
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -335,11 +291,8 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
|
|
||||||
while ( $row = $this->DB->fetch() )
|
while ( $row = $this->DB->fetch() )
|
||||||
{
|
{
|
||||||
$row['_a_name'] = $row['a_name'] ? $row['a_name'] : sprintf( $this->lang->words['wlog_deleted'], $row['wlog_mid'] );
|
$row['_a_name'] = $row['a_name'] ? $row['a_name'] : sprintf( $this->lang->words['wlog_deleted'], $row['wl_member'] );
|
||||||
$row['_date'] = $this->registry->class_localization->getDate( $row['wlog_date'], 'LONG' );
|
$row['_date'] = $this->registry->class_localization->getDate( $row['wl_date'], 'LONG' );
|
||||||
$row['_type'] = ( $row['wlog_type'] == 'pos' ) ? '<span style="color:green;font-weight:bold">-</span>' : '<span style="color:red;font-weight:bold">+</span>';
|
|
||||||
$row['_type'] = ( $row['wlog_type'] == 'custom' ) ? '<span style="color:grey;font-weight:bold">C</span>' : $row['_type'];
|
|
||||||
$row['_cont'] = ( $row['wlog_contact'] != 'none' ) ? "<a title='{$this->lang->words['wlog_showmessage']}' href='#' onclick='return acp.openWindow(\"{$this->settings['base_url']}&{$this->form_code}&do=viewcontact&id={$row['wlog_id']}\",400,400,\"{$this->lang->words['wlog_log']}\"); return false;'><img src='{$this->settings['skin_acp_url']}/images/icons/tick.png' alt='{$this->lang->words['wlog_contacted']}'></a>" : ' ';
|
|
||||||
|
|
||||||
$rows[] = $row;
|
$rows[] = $row;
|
||||||
}
|
}
|
||||||
@@ -348,38 +301,53 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
// All members
|
// All members
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$this->DB->build( array(
|
$st = intval( $this->request['st'] );
|
||||||
'select' => 'count(l.wlog_mid) as act_count',
|
$perpage = 15;
|
||||||
'from' => array( 'warn_logs' => 'l' ),
|
$count = $this->DB->buildAndFetch( array( 'select' => 'count( ' .$this->DB->buildDistinct( 'wl_member' ) . ') as count', 'from' => 'members_warn_logs' ) );
|
||||||
'group' => 'l.wlog_mid',
|
|
||||||
'order' => 'act_count DESC',
|
|
||||||
'add_join' => array(
|
|
||||||
array(
|
|
||||||
'select' => 'm.member_id, m.members_display_name',
|
|
||||||
'from' => array( 'members' => 'm' ),
|
|
||||||
'where' => 'm.member_id=l.wlog_mid',
|
|
||||||
'type' => 'left',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
) );
|
|
||||||
$this->DB->execute();
|
|
||||||
|
|
||||||
while ( $r = $this->DB->fetch() )
|
if ( $count['count'] )
|
||||||
{
|
{
|
||||||
$members[ $r['member_id'] ] = $r;
|
$this->DB->build( array(
|
||||||
|
'select' => 'count(l.wl_member) as act_count',
|
||||||
|
'from' => array( 'members_warn_logs' => 'l' ),
|
||||||
|
'group' => 'l.wl_member, m.member_id, m.members_display_name',
|
||||||
|
'order' => 'act_count DESC',
|
||||||
|
'add_join' => array(
|
||||||
|
array(
|
||||||
|
'select' => 'm.member_id, m.members_display_name',
|
||||||
|
'from' => array( 'members' => 'm' ),
|
||||||
|
'where' => 'm.member_id=l.wl_member',
|
||||||
|
'type' => 'left',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'limit' => array( $st, $perpage ),
|
||||||
|
) );
|
||||||
|
$this->DB->execute();
|
||||||
|
|
||||||
|
while ( $r = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
$members[ $r['member_id'] ] = $r;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$pagination = $this->registry->output->generatePagination( array( 'totalItems' => $count['count'],
|
||||||
|
'itemsPerPage' => $perpage,
|
||||||
|
'currentStartValue' => $st,
|
||||||
|
'baseUrl' => $this->settings['base_url'] . $this->form_code,
|
||||||
|
) );
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Output
|
// Output
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$this->registry->output->html .= $this->html->warnlogsWrapper( $rows, $members );
|
$this->registry->output->html .= $this->html->warnlogsWrapper( $rows, $members, $pagination );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Popup window to view a note
|
* Popup window to view a note
|
||||||
*
|
*
|
||||||
* @return @e void [Outputs to screen]
|
* @return @e void
|
||||||
*/
|
*/
|
||||||
protected function _viewNote()
|
protected function _viewNote()
|
||||||
{
|
{
|
||||||
@@ -391,45 +359,29 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
$id = intval($this->request['id']);
|
$id = intval($this->request['id']);
|
||||||
|
|
||||||
$row = $this->DB->buildAndFetch( array( 'select' => 'l.*',
|
$row = $this->DB->buildAndFetch( array( 'select' => 'l.*',
|
||||||
'from' => array( 'warn_logs' => 'l' ),
|
'from' => array( 'members_warn_logs' => 'l' ),
|
||||||
'where' => 'l.wlog_id=' . $id,
|
'where' => 'l.wl_id=' . $id,
|
||||||
'add_join' => array(
|
'add_join' => array(
|
||||||
array( 'select' => 'm.member_id as a_id, m.members_display_name as a_name',
|
array( 'select' => 'm.member_id as a_id, m.members_display_name as a_name',
|
||||||
'from' => array( 'members' => 'm' ),
|
'from' => array( 'members' => 'm' ),
|
||||||
'where' => 'm.member_id=l.wlog_mid',
|
'where' => 'm.member_id=l.wl_member',
|
||||||
'type' => 'left'
|
'type' => 'left'
|
||||||
),
|
),
|
||||||
array( 'select' => 'p.member_id as p_id, p.members_display_name as p_name, p.member_group_id, p.mgroup_others',
|
array( 'select' => 'p.member_id as p_id, p.members_display_name as p_name, p.member_group_id, p.mgroup_others',
|
||||||
'from' => array( 'members' => 'p' ),
|
'from' => array( 'members' => 'p' ),
|
||||||
'where' => 'p.member_id=l.wlog_addedby',
|
'where' => 'p.member_id=l.wl_moderator',
|
||||||
'type' => 'left'
|
'type' => 'left'
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
) );
|
) );
|
||||||
|
|
||||||
if ( ! $row['wlog_id'] )
|
if ( ! $row['wl_id'] )
|
||||||
{
|
{
|
||||||
$this->registry->output->showError( $this->lang->words['wlog_cantresolve'], 11135 );
|
$this->registry->output->showError( $this->lang->words['wlog_cantresolve'], 11135 );
|
||||||
}
|
}
|
||||||
|
|
||||||
$cont = array();
|
$row['_date'] = $this->registry->class_localization->getDate( $row['wl_date'], 'LONG' );
|
||||||
|
$row['a_name'] = $row['a_name'] ? $row['a_name'] : sprintf( $this->lang->words['deleted_member_warnlog'], $row['wl_member'] );
|
||||||
if ( strstr( $row['wlog_notes'], '<content>' ) )
|
|
||||||
{
|
|
||||||
preg_match( "#<content>(.+?)</content>#is", $row['wlog_notes'], $cont );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$_array = unserialize( $row['wlog_notes'] );
|
|
||||||
|
|
||||||
if ( is_array( $_array ) AND $_array['content'] )
|
|
||||||
{
|
|
||||||
$cont[1] = $_array['content'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$row['_date'] = $this->registry->class_localization->getDate( $row['wlog_date'], 'LONG' );
|
|
||||||
$row['a_name'] = $row['a_name'] ? $row['a_name'] : sprintf( $this->lang->words['deleted_member_warnlog'], $row['wlog_mid'] );
|
|
||||||
|
|
||||||
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
|
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
|
||||||
IPSText::getTextClass('bbcode')->parse_smilies = 1;
|
IPSText::getTextClass('bbcode')->parse_smilies = 1;
|
||||||
@@ -439,79 +391,11 @@ class admin_core_logs_warnlogs extends ipsCommand
|
|||||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id'];
|
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id'];
|
||||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others'];
|
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others'];
|
||||||
|
|
||||||
$row['_text'] = IPSText::getTextClass('bbcode')->preDisplayParse( $cont[1] );
|
$row['wl_note_member'] = IPSText::getTextClass('bbcode')->preDisplayParse( $row['wl_note_member'] );
|
||||||
|
$row['wl_note_mods'] = IPSText::getTextClass('bbcode')->preDisplayParse( $row['wl_note_mods'] );
|
||||||
|
|
||||||
$this->registry->output->html .= $this->html->warnlogsNote( $row );
|
$this->registry->output->html .= $this->html->warnlogsNote( $row );
|
||||||
|
|
||||||
$this->registry->output->printPopupWindow();
|
$this->registry->output->printPopupWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Popup window to view a contact
|
|
||||||
*
|
|
||||||
* @return @e void [Outputs to screen]
|
|
||||||
*/
|
|
||||||
protected function _viewContact()
|
|
||||||
{
|
|
||||||
if ( !$this->request['id'] )
|
|
||||||
{
|
|
||||||
$this->registry->output->showError( $this->lang->words['wlog_nologs'], 11136 );
|
|
||||||
}
|
|
||||||
|
|
||||||
$id = intval($this->request['id']);
|
|
||||||
|
|
||||||
$row = $this->DB->buildAndFetch( array( 'select' => 'l.*',
|
|
||||||
'from' => array( 'warn_logs' => 'l' ),
|
|
||||||
'where' => 'l.wlog_id=' . $id,
|
|
||||||
'add_join' => array(
|
|
||||||
array( 'select' => 'm.member_id as a_id, m.members_display_name as a_name',
|
|
||||||
'from' => array( 'members' => 'm' ),
|
|
||||||
'where' => 'm.member_id=l.wlog_mid',
|
|
||||||
'type' => 'left'
|
|
||||||
),
|
|
||||||
array( 'select' => 'p.member_id as p_id, p.members_display_name as p_name, p.member_group_id, p.mgroup_others',
|
|
||||||
'from' => array( 'members' => 'p' ),
|
|
||||||
'where' => 'p.member_id=l.wlog_addedby',
|
|
||||||
'type' => 'left'
|
|
||||||
),
|
|
||||||
)
|
|
||||||
) );
|
|
||||||
|
|
||||||
if ( ! $row['wlog_id'] )
|
|
||||||
{
|
|
||||||
$this->registry->output->showError( $this->lang->words['wlog_nologs'], 11137 );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( strpos( $row['wlog_contact_content'], '<content>' ) )
|
|
||||||
{
|
|
||||||
$subject = preg_match( "#<subject>(.+?)</subject>#is", $row['wlog_contact_content'], $subj );
|
|
||||||
$content = preg_match( "#<content>(.+?)</content>#is", $row['wlog_contact_content'], $cont );
|
|
||||||
|
|
||||||
$row['_subject'] = $subj[1];
|
|
||||||
$row['_text'] = $cont[1];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$row['_subject'] = $this->lang->words['subj_not_avail'];
|
|
||||||
$row['_text'] = $row['wlog_contact_content'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$row['_type'] = $row['wlog_contact'] == 'pm' ? $this->lang->words['wlog_pm'] : $this->lang->words['wlog_email'];
|
|
||||||
$row['_date'] = $this->registry->class_localization->getDate( $row['wlog_date'], 'LONG' );
|
|
||||||
$row['a_name'] = $row['a_name'] ? $row['a_name'] : sprintf( $this->lang->words['wlog_deleted'], $row['wlog_mid'] );
|
|
||||||
|
|
||||||
IPSText::getTextClass( 'bbcode' )->parse_smilies = 1;
|
|
||||||
IPSText::getTextClass( 'bbcode' )->parse_html = 1;
|
|
||||||
IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1;
|
|
||||||
IPSText::getTextClass( 'bbcode' )->parsing_section = 'warn';
|
|
||||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id'];
|
|
||||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others'];
|
|
||||||
|
|
||||||
$row['_text'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $row['_text'] );
|
|
||||||
$row['_text'] = $this->registry->output->replaceMacros( $row['_text'] );
|
|
||||||
|
|
||||||
$this->registry->output->html .= $this->html->warnlogsContact( $row );
|
|
||||||
|
|
||||||
$this->registry->output->printPopupWindow();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,86 +1,96 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<permissions>
|
<permissions>
|
||||||
<group>
|
<group>
|
||||||
<grouptitle>Журнал администраторских действий</grouptitle>
|
<grouptitle>Admin Logs</grouptitle>
|
||||||
<grouplang>core_adminlogs</grouplang>
|
<grouplang>core_adminlogs</grouplang>
|
||||||
<items>
|
<items>
|
||||||
<item>
|
<item>
|
||||||
<key>adminlogs_view</key>
|
<key>adminlogs_view</key>
|
||||||
<string>Может просматривать журнал?</string>
|
<string>Can view admin logs?</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>adminlogs_delete</key>
|
<key>adminlogs_delete</key>
|
||||||
<string>Может удлаять записи?</string>
|
<string>Can delete admin logs?</string>
|
||||||
</item>
|
</item>
|
||||||
</items>
|
</items>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<grouptitle>Журнал модераторских действий</grouptitle>
|
<grouptitle>Admin Login Logs</grouptitle>
|
||||||
|
<grouplang>core_acp_loginlogs</grouplang>
|
||||||
|
<items>
|
||||||
|
<item>
|
||||||
|
<key>acplogin_log</key>
|
||||||
|
<string>Can view admin login logs?</string>
|
||||||
|
</item>
|
||||||
|
</items>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<grouptitle>Moderator Logs</grouptitle>
|
||||||
<grouplang>core_modlogs</grouplang>
|
<grouplang>core_modlogs</grouplang>
|
||||||
<items>
|
<items>
|
||||||
<item>
|
<item>
|
||||||
<key>modlogs_view</key>
|
<key>modlogs_view</key>
|
||||||
<string>Может просматривать журнал?</string>
|
<string>Can view moderator logs?</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>modlogs_delete</key>
|
<key>modlogs_delete</key>
|
||||||
<string>Может удлаять записи?</string>
|
<string>Can delete moderator logs?</string>
|
||||||
</item>
|
</item>
|
||||||
</items>
|
</items>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<grouptitle>Журнал ошибок Email</grouptitle>
|
<grouptitle>Email Error Logs</grouptitle>
|
||||||
<grouplang>core_eelogs</grouplang>
|
<grouplang>core_eelogs</grouplang>
|
||||||
<items>
|
<items>
|
||||||
<item>
|
<item>
|
||||||
<key>emailerrorlogs_view</key>
|
<key>emailerrorlogs_view</key>
|
||||||
<string>Может просматривать журнал?</string>
|
<string>Can view email error logs?</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>emailerrorlogs_delete</key>
|
<key>emailerrorlogs_delete</key>
|
||||||
<string>Может удлаять записи?</string>
|
<string>Can delete email error logs?</string>
|
||||||
</item>
|
</item>
|
||||||
</items>
|
</items>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<grouptitle>Журнал действий поисковых роботов</grouptitle>
|
<grouptitle>Spider Logs</grouptitle>
|
||||||
<grouplang>core_spiderlogs</grouplang>
|
<grouplang>core_spiderlogs</grouplang>
|
||||||
<items>
|
<items>
|
||||||
<item>
|
<item>
|
||||||
<key>spiderlogs_view</key>
|
<key>spiderlogs_view</key>
|
||||||
<string>Может просматривать журнал?</string>
|
<string>Can view spider logs?</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>spiderlogs_delete</key>
|
<key>spiderlogs_delete</key>
|
||||||
<string>Может удлаять записи?</string>
|
<string>Can delete spider logs?</string>
|
||||||
</item>
|
</item>
|
||||||
</items>
|
</items>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<grouptitle>Журнал пользовательских предупреждений</grouptitle>
|
<grouptitle>Warn Logs</grouptitle>
|
||||||
<grouplang>core_warnlogs</grouplang>
|
<grouplang>core_warnlogs</grouplang>
|
||||||
<items>
|
<items>
|
||||||
<item>
|
<item>
|
||||||
<key>warnlogs_view</key>
|
<key>warnlogs_view</key>
|
||||||
<string>Может просматривать журнал?</string>
|
<string>Can view warn logs?</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>warnlogs_delete</key>
|
<key>warnlogs_delete</key>
|
||||||
<string>Может удлаять записи?</string>
|
<string>Can delete warn logs?</string>
|
||||||
</item>
|
</item>
|
||||||
</items>
|
</items>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<grouptitle>Журнал ошибок системы</grouptitle>
|
<grouptitle>Error Logs</grouptitle>
|
||||||
<grouplang>core_errorlogs</grouplang>
|
<grouplang>core_errorlogs</grouplang>
|
||||||
<items>
|
<items>
|
||||||
<item>
|
<item>
|
||||||
<key>errorlogs_view</key>
|
<key>errorlogs_view</key>
|
||||||
<string>Может просматривать журнал?</string>
|
<string>Can view error logs?</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<key>errorlogs_delete</key>
|
<key>errorlogs_delete</key>
|
||||||
<string>Может удлаять записи?</string>
|
<string>Can delete error logs?</string>
|
||||||
</item>
|
</item>
|
||||||
</items>
|
</items>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -0,0 +1,210 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Invision Power Services
|
||||||
|
* IP.Board v3.3.4
|
||||||
|
* API Users
|
||||||
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author $Author: bfarber $
|
||||||
|
* @copyright © 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 1st march 2002
|
||||||
|
* @version $Revision: 10914 $
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
|
{
|
||||||
|
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
class admin_core_logs_xmlrpclogs extends ipsCommand
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Skin object
|
||||||
|
*
|
||||||
|
* @var object Skin templates
|
||||||
|
*/
|
||||||
|
protected $html;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shortcut for url
|
||||||
|
*
|
||||||
|
* @var string URL shortcut
|
||||||
|
*/
|
||||||
|
protected $form_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shortcut for url (javascript)
|
||||||
|
*
|
||||||
|
* @var string JS URL shortcut
|
||||||
|
*/
|
||||||
|
protected $form_code_js;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Main class entry point
|
||||||
|
*
|
||||||
|
* @param object ipsRegistry reference
|
||||||
|
* @return @e void [Outputs to screen]
|
||||||
|
*/
|
||||||
|
public function doExecute( ipsRegistry $registry )
|
||||||
|
{
|
||||||
|
//-----------------------------------------
|
||||||
|
// Load skin...
|
||||||
|
//-----------------------------------------
|
||||||
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_tools' ) );
|
||||||
|
$this->html = $this->registry->output->loadTemplate('cp_skin_api');
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Set up stuff
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$this->form_code = $this->html->form_code = 'module=logs&section=xmlrpclogs';
|
||||||
|
$this->form_code_js = $this->html->form_code_js = 'module=logs§ion=xmlrpclogs';
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// What are we to do, today?
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
switch( $this->request['do'] )
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
case 'log_list':
|
||||||
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_logs' );
|
||||||
|
$this->logList();
|
||||||
|
break;
|
||||||
|
case 'log_view_detail':
|
||||||
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_logs' );
|
||||||
|
$this->logViewDetail();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Pass to CP output hander
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper();
|
||||||
|
$this->registry->getClass('output')->sendOutput();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API Logs View
|
||||||
|
* View API Log
|
||||||
|
*
|
||||||
|
* @return @e void [Outputs]
|
||||||
|
* @author Matt Mecham
|
||||||
|
* @since 2.3.2
|
||||||
|
*/
|
||||||
|
public function logViewDetail()
|
||||||
|
{
|
||||||
|
//-----------------------------------------
|
||||||
|
// Fix up navigation bar
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
||||||
|
|
||||||
|
$this->registry->output->core_nav = array();
|
||||||
|
$this->registry->output->ignoreCoreNav = true;
|
||||||
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=logsSplash', $this->lang->words['nav_logssplash'] );
|
||||||
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=xmlrpclogs', $this->lang->words['api_error_logs'] );
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Get data from the deebee
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$log = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'api_log', 'where' => 'api_log_id=' . intval( $this->request['api_log_id'] ) ) );
|
||||||
|
|
||||||
|
if ( ! $log['api_log_id'] )
|
||||||
|
{
|
||||||
|
$this->registry->output->global_message = $this->lang->words['a_lognoid'];
|
||||||
|
$this->logList();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Display...
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$log['_api_log_date'] = ipsRegistry::getClass( 'class_localization')->getDate( $log['api_log_date'], 'LONG' );
|
||||||
|
$log['_api_log_allowed'] = $log['api_log_allowed'] ? 'tick.png' : 'cross.png';
|
||||||
|
$log['_api_log_query'] = htmlspecialchars( $log['api_log_query'] );
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Show...
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$this->registry->output->html .= $this->html->api_log_detail( $log );
|
||||||
|
|
||||||
|
$this->registry->output->printPopupWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API Logs List
|
||||||
|
* List API Logs
|
||||||
|
*
|
||||||
|
* @return @e void [Outputs]
|
||||||
|
* @author Matt Mecham
|
||||||
|
* @since 2.3.2
|
||||||
|
*/
|
||||||
|
public function logList()
|
||||||
|
{
|
||||||
|
//-----------------------------------------
|
||||||
|
// Fix up navigation bar
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
|
||||||
|
|
||||||
|
$this->registry->output->core_nav = array();
|
||||||
|
$this->registry->output->ignoreCoreNav = true;
|
||||||
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=logsSplash', $this->lang->words['nav_logssplash'] );
|
||||||
|
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs§ion=xmlrpclogs', $this->lang->words['api_error_logs'] );
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// INIT
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$start = intval( $this->request['st'] );
|
||||||
|
$perpage = 50;
|
||||||
|
$logs = array();
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Get log count
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'api_log' ) );
|
||||||
|
|
||||||
|
$links = $this->registry->output->generatePagination( array( 'totalItems' => intval( $count['count'] ),
|
||||||
|
'itemsPerPage' => $perpage,
|
||||||
|
'currentStartValue' => $start,
|
||||||
|
'baseUrl' => $this->settings['base_url'] . $this->form_code . '&do=log_list' ) );
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Get from DB
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$this->DB->build( array( 'select' => '*', 'from' => 'api_log', 'order' => 'api_log_date DESC', 'limit' => array( $start, $perpage ) ) );
|
||||||
|
$this->DB->execute();
|
||||||
|
|
||||||
|
while( $row = $this->DB->fetch() )
|
||||||
|
{
|
||||||
|
$row['_api_log_date'] = ipsRegistry::getClass('class_localization')->getDate( $row['api_log_date'], 'LONG' );
|
||||||
|
$row['_api_log_allowed'] = $row['api_log_allowed'] ? 'tick.png' : 'cross.png';
|
||||||
|
|
||||||
|
$logs[] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Print...
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$this->registry->output->html .= $this->html->api_login_view( $logs, $links );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @file defaultSection.php Define the default section for the 'mobileapp' module
|
||||||
|
*~TERABYTE_DOC_READY~
|
||||||
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
|
* $Author: ips_terabyte $
|
||||||
|
* @since 20th February 2002
|
||||||
|
* $LastChangedDate: 2010-10-14 13:11:17 -0400 (Thu, 14 Oct 2010) $
|
||||||
|
* @version v3.3.4
|
||||||
|
* $Revision: 477 $
|
||||||
|
*/
|
||||||
|
|
||||||
|
$DEFAULT_SECTION = 'images';
|
||||||
@@ -0,0 +1,224 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Invision Power Services
|
||||||
|
* IP.Board v3.3.4
|
||||||
|
* Manage mobile app images
|
||||||
|
* Last Updated: $Date: 2012-03-30 16:23:27 +0100 (Fri, 30 Mar 2012) $
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author $Author: mark $
|
||||||
|
* @copyright (c) 2001 - 2011 Invision Power Services, Inc.
|
||||||
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
|
* @package IP.Board
|
||||||
|
* @subpackage Core
|
||||||
|
* @link http://www.invisionpower.com
|
||||||
|
* @since 2012-04-20
|
||||||
|
* @version $Revision: 10526 $
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
|
{
|
||||||
|
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
class admin_core_mobileapp_images extends ipsCommand
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Skin Functions Class
|
||||||
|
*
|
||||||
|
* @var object
|
||||||
|
*/
|
||||||
|
protected $skinFunctions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recursive depth guide
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $_depthGuide = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Skin object
|
||||||
|
*
|
||||||
|
* @var object Skin templates
|
||||||
|
*/
|
||||||
|
protected $html;
|
||||||
|
|
||||||
|
/**#@+
|
||||||
|
* URL bits
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $form_code = '';
|
||||||
|
public $form_code_js = '';
|
||||||
|
/**#@-*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Main class entry point
|
||||||
|
*
|
||||||
|
* @param object ipsRegistry reference
|
||||||
|
* @return @e void [Outputs to screen]
|
||||||
|
*/
|
||||||
|
public function doExecute( ipsRegistry $registry )
|
||||||
|
{
|
||||||
|
//-----------------------------------------
|
||||||
|
// Load skin
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$this->html = $this->registry->output->loadTemplate('cp_skin_mobileapp');
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Set up stuff
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$this->form_code = $this->html->form_code = 'module=mobileapp&section=images&';
|
||||||
|
$this->form_code_js = $this->html->form_code_js = 'module=mobileapp§ion=images&';
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Load lang
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_mobileapp' ) );
|
||||||
|
|
||||||
|
/* Load up iOS class */
|
||||||
|
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/mobile/iosImages.php', 'classes_mobile_iosImages' );
|
||||||
|
$this->images = new $classToLoad();
|
||||||
|
|
||||||
|
///----------------------------------------
|
||||||
|
// What to do...
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
|
switch( $this->request['do'] )
|
||||||
|
{
|
||||||
|
case 'overview':
|
||||||
|
default:
|
||||||
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'app_images' );
|
||||||
|
$this->_overview();
|
||||||
|
break;
|
||||||
|
case 'exportXml':
|
||||||
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'app_images' );
|
||||||
|
$this->_export();
|
||||||
|
break;
|
||||||
|
case 'importXml':
|
||||||
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'app_images' );
|
||||||
|
$this->_import();
|
||||||
|
break;
|
||||||
|
case 'refresh':
|
||||||
|
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'app_images' );
|
||||||
|
$this->_refresh();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Output */
|
||||||
|
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
|
||||||
|
$this->registry->output->sendOutput();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refresh stuffs
|
||||||
|
*/
|
||||||
|
protected function _refresh()
|
||||||
|
{
|
||||||
|
$dirErrors = $this->images->checkDirectories();
|
||||||
|
$imgErrors = $this->images->checkImages();
|
||||||
|
|
||||||
|
if ( count( $dirErrors ) || $imgErrors['missing'] !== false OR $imgErrors['dimensions'] !== false OR $imgErrors['writeable'] !== false )
|
||||||
|
{
|
||||||
|
$this->images->setStyleLastUpdated( time() );
|
||||||
|
|
||||||
|
$this->registry->output->global_message = $this->lang->words['mi_recache_done'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->registry->output->global_error = $this->lang->words['mi_error_refresh_failed'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->_overview();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Export as XML archive
|
||||||
|
*/
|
||||||
|
protected function _export()
|
||||||
|
{
|
||||||
|
$xml = $this->images->getXmlArchive();
|
||||||
|
|
||||||
|
if ( ! $xml )
|
||||||
|
{
|
||||||
|
$this->registry->output->global_error = $this->lang->words['mi_error_no_export'];
|
||||||
|
$this->_overview();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->registry->output->showDownload( $xml, 'mobileiOsImages.xml' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Import an XML archive
|
||||||
|
*/
|
||||||
|
protected function _import()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$xml = $this->registry->adminFunctions->importXml();
|
||||||
|
}
|
||||||
|
catch ( Exception $e )
|
||||||
|
{
|
||||||
|
$this->registry->output->showError( $e->getMessage() );
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $this->images->importXmlArchive( $xml );
|
||||||
|
|
||||||
|
if ( ! $result )
|
||||||
|
{
|
||||||
|
$this->registry->output->global_error = $this->lang->words['mi_import_failed'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->_overview();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List the import form
|
||||||
|
*
|
||||||
|
* @return @e void
|
||||||
|
*/
|
||||||
|
protected function _overview()
|
||||||
|
{
|
||||||
|
$dirErrors = $this->images->checkDirectories();
|
||||||
|
$imgErrors = $this->images->checkImages();
|
||||||
|
$currentImages = $this->images->getImageDirContents();
|
||||||
|
$defaultImages = $this->images->getDefaultImageDirContents();
|
||||||
|
$canImport = true;
|
||||||
|
|
||||||
|
if ( $dirErrors !== false )
|
||||||
|
{
|
||||||
|
$canImport = false;
|
||||||
|
|
||||||
|
foreach( $dirErrors as $error )
|
||||||
|
{
|
||||||
|
$this->registry->output->global_error .= sprintf( $this->lang->words['mi_error_' . $error['key'] ], $error['extra'] ) . '<br />';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $imgErrors['writeable'] !== false )
|
||||||
|
{
|
||||||
|
$canImport = false;
|
||||||
|
|
||||||
|
$this->registry->output->global_error .= $this->lang->words['mi_error_images_writeable'] . '<br />';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $imgErrors['missing'] !== false )
|
||||||
|
{
|
||||||
|
foreach( $imgErrors['missing'] as $img )
|
||||||
|
{
|
||||||
|
$this->registry->output->global_error .= sprintf( $this->lang->words['mi_error_missing_img'], '<a href="' . $this->images->getDefaultImageUrl() . $img . '" target="_blank">' . $img . '</a>' ) . '<br />';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->registry->output->html .= $this->html->overview( $currentImages, $defaultImages, $this->images->getImageDir(), $imgErrors, $canImport );
|
||||||
|
}
|
||||||
|
}
|
||||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<menu>
|
||||||
|
<tabitems>
|
||||||
|
<item>
|
||||||
|
<title>Mobile App</title>
|
||||||
|
<subitems>
|
||||||
|
<subitem>
|
||||||
|
<subitemtitle>Mobile App</subitemtitle>
|
||||||
|
<subitemlang>skins_manage_app_images</subitemlang>
|
||||||
|
<subsection>images</subsection>
|
||||||
|
<subitemurl>do=overview</subitemurl>
|
||||||
|
<subitemrolekey>app_images</subitemrolekey>
|
||||||
|
<subisredirect>0</subisredirect>
|
||||||
|
</subitem>
|
||||||
|
</subitems>
|
||||||
|
</item>
|
||||||
|
</tabitems>
|
||||||
|
</menu>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<permissions>
|
||||||
|
<group>
|
||||||
|
<grouptitle>Manage App Images</grouptitle>
|
||||||
|
<grouplang>core_templates</grouplang>
|
||||||
|
<items>
|
||||||
|
<item>
|
||||||
|
<key>app_images</key>
|
||||||
|
<string>Can view and manage app images?</string>
|
||||||
|
</item>
|
||||||
|
</items>
|
||||||
|
</group>
|
||||||
|
</permissions>
|
||||||
@@ -2,19 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Dashboard
|
* Dashboard
|
||||||
* Last Updated: $Date: 2011-10-14 13:58:18 -0400 (Fri, 14 Oct 2011) $
|
* Last Updated: $Date: 2012-07-03 12:20:08 -0400 (Tue, 03 Jul 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: AndyMillne $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 5th January 2005
|
* @since 5th January 2005
|
||||||
* @version $Revision: 9623 $
|
* @version $Revision: 11029 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -115,20 +115,56 @@ class admin_core_mycp_dashboard extends ipsCommand
|
|||||||
$this->form_code_js = $this->html->form_code_js = 'module=mycp§ion=dashboard';
|
$this->form_code_js = $this->html->form_code_js = 'module=mycp§ion=dashboard';
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// INIT
|
// Hang on, do we need the upgrader?
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
define( 'IPS_VERSION_CHECK_URL' , 'http://myipb.in/latestversioncheck/ipb30x.php' );
|
if ( !IN_DEV AND ( !defined('SKIP_UPGRADE_CHECK') OR !SKIP_UPGRADE_CHECK ) )
|
||||||
|
{
|
||||||
|
require_once( IPS_ROOT_PATH . 'setup/sources/base/setup.php' );/*noLibHook*/
|
||||||
|
foreach( ipsRegistry::$applications as $app_dir => $app )
|
||||||
|
{
|
||||||
|
$_a = ( $app_dir == 'forums' or $app_dir == 'members' ) ? 'core' : $app_dir;
|
||||||
|
$numbers = IPSSetUp::fetchAppVersionNumbers( $_a );
|
||||||
|
|
||||||
|
if ( $numbers['latest'][0] and $numbers['latest'][0] > $numbers['current'][0] )
|
||||||
|
{
|
||||||
|
$this->registry->output->silentRedirect( $this->settings['base_acp_url'] . '/upgrade/index.php?_acpRedirect=1' );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Get external data
|
||||||
|
//-----------------------------------------
|
||||||
|
|
||||||
$content = array();
|
$content = array();
|
||||||
$thiscontent = "";
|
$thiscontent = "";
|
||||||
$latest_version = array();
|
$latest_version = array();
|
||||||
$reg_end = "";
|
$reg_end = "";
|
||||||
$unfinished_upgrade = 0;
|
$unfinished_upgrade = 0;
|
||||||
$urls = array( 'news' => '',
|
|
||||||
'keiths_bits' => '',
|
$ipsNewsData = $this->cache->getCache( 'ipsNewsData' );
|
||||||
'version_check' => IPS_VERSION_CHECK_URL,
|
if ( !isset( $ipsNewsData['time'] ) or $ipsNewsData['time'] < ( time() - 43200 ) ) // 12 hour cache
|
||||||
'blogs' => '' );
|
{
|
||||||
|
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' );
|
||||||
|
$classFileManagement = new $classToLoad();
|
||||||
|
|
||||||
|
if( strpos( $this->settings['base_url'], 'https://' ) !== false )
|
||||||
|
{
|
||||||
|
$ipsNewsData['news'] = $classFileManagement->getFileContents( 'https://external.ipslink.com/ipboard33/dashboard/index.php?v=' . ipsRegistry::$vn_full );
|
||||||
|
$ipsNewsData['vcheck'] = $classFileManagement->getFileContents( 'https://www.invisionpower.com/latestversioncheck/ipb30x.php?' . base64_encode( ipsRegistry::$vn_full.'|^|'.$this->settings['board_url'] ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$ipsNewsData['news'] = $classFileManagement->getFileContents( 'http://external.ipslink.com/ipboard33/dashboard/index.php?v=' . ipsRegistry::$vn_full );
|
||||||
|
$ipsNewsData['vcheck'] = $classFileManagement->getFileContents( 'http://www.invisionpower.com/latestversioncheck/ipb30x.php?' . base64_encode( ipsRegistry::$vn_full.'|^|'.$this->settings['board_url'] ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
$ipsNewsData['time'] = time();
|
||||||
|
|
||||||
|
$this->cache->setCache( 'ipsNewsData', $ipsNewsData, array( 'array' => 1 ) );
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Get MySQL & PHP Version
|
// Get MySQL & PHP Version
|
||||||
@@ -173,12 +209,6 @@ class admin_core_mycp_dashboard extends ipsCommand
|
|||||||
ipsRegistry::$version = 'v'.$latest_version['upgrade_version_human'];
|
ipsRegistry::$version = 'v'.$latest_version['upgrade_version_human'];
|
||||||
ipsRegistry::$vn_full = !empty($latest_version['upgrade_notes']) ? $latest_version['upgrade_notes'] : ipsRegistry::$vn_full;
|
ipsRegistry::$vn_full = !empty($latest_version['upgrade_notes']) ? $latest_version['upgrade_notes'] : ipsRegistry::$vn_full;
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Licensed?
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$urls['keiths_bits'] = IPS_BULLETINS_URL . '?v=' . ipsRegistry::$vn_full;
|
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Notepad
|
// Notepad
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -242,20 +272,20 @@ class admin_core_mycp_dashboard extends ipsCommand
|
|||||||
|
|
||||||
if ( ($r['_log_in'] / 60) < 1 )
|
if ( ($r['_log_in'] / 60) < 1 )
|
||||||
{
|
{
|
||||||
$r['_log_in'] = sprintf("%0d", $r['_log_in']) . $this->lang->words['cp_secondsago'];
|
$r['_log_in'] = sprintf("%0d", $r['_log_in']) . ' ' . $this->lang->words['cp_secondsago'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$r['_log_in'] = sprintf("%0d", ($r['_log_in'] / 60) ) . $this->lang->words['cp_minutesago'];
|
$r['_log_in'] = sprintf("%0d", ($r['_log_in'] / 60) ) . ' ' . $this->lang->words['cp_minutesago'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ($r['_click'] / 60) < 1 )
|
if ( ($r['_click'] / 60) < 1 )
|
||||||
{
|
{
|
||||||
$r['_click'] = sprintf("%0d", $r['_click']) . $this->lang->words['cp_secondsago'];
|
$r['_click'] = sprintf("%0d", $r['_click']) . ' ' . $this->lang->words['cp_secondsago'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$r['_click'] = sprintf("%0d", ($r['_click'] / 60) ) . $this->lang->words['cp_minutesago'];
|
$r['_click'] = sprintf("%0d", ($r['_click'] / 60) ) . ' ' . $this->lang->words['cp_minutesago'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$r['session_location'] = $r['session_location'] ? $r['session_location'] : $this->lang->words['cp_index'];
|
$r['session_location'] = $r['session_location'] ? $r['session_location'] : $this->lang->words['cp_index'];
|
||||||
@@ -320,28 +350,6 @@ class admin_core_mycp_dashboard extends ipsCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
|
||||||
// Forum and group dropdowns
|
|
||||||
//-----------------------------------------
|
|
||||||
|
|
||||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/forums/class_forums.php', 'class_forums', 'forums' );
|
|
||||||
$this->registry->setClass( 'class_forums', new $classToLoad($this->registry) );
|
|
||||||
$this->registry->getClass('class_forums')->forumsInit();
|
|
||||||
|
|
||||||
$forums = $this->registry->getClass('class_forums')->forumsForumJump( 1 );
|
|
||||||
|
|
||||||
$groups = array();
|
|
||||||
$groups_html = '';
|
|
||||||
|
|
||||||
foreach( $this->cache->getCache('group_cache') as $k => $v )
|
|
||||||
{
|
|
||||||
$groups[ $v['g_title'] ] = "<option value='{$k}'>{$v['g_title']}</option>";
|
|
||||||
}
|
|
||||||
|
|
||||||
ksort( $groups );
|
|
||||||
|
|
||||||
$groups_html = implode( "\n", $groups );
|
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Info for the stats bar
|
// Info for the stats bar
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -371,8 +379,7 @@ class admin_core_mycp_dashboard extends ipsCommand
|
|||||||
// Piece it together
|
// Piece it together
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$urls['version_check'] = IPS_VERSION_CHECK_URL . '?' . base64_encode( ipsRegistry::$vn_full.'|^|'.$this->settings['board_url'] );
|
$this->registry->output->html .= $this->html->mainTemplate( $content, $ipsNewsData, $this->getNotificationPanelEntries(), $stats );
|
||||||
$this->registry->output->html .= $this->html->mainTemplate( $content, $forums, $groups_html, $urls, $this->getNotificationPanelEntries(), $stats );
|
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Left log all on?
|
// Left log all on?
|
||||||
@@ -518,7 +525,7 @@ class admin_core_mycp_dashboard extends ipsCommand
|
|||||||
|
|
||||||
$this->registry->getClass('class_permissions')->return = true;
|
$this->registry->getClass('class_permissions')->return = true;
|
||||||
|
|
||||||
if( $this->registry->getClass('class_permissions')->checkPermission( 'acplogin_log', 'core', 'system' ) )
|
if( $this->registry->getClass('class_permissions')->checkPermission( 'acplogin_log', 'core', 'logs' ) )
|
||||||
{
|
{
|
||||||
$this->DB->build( array(
|
$this->DB->build( array(
|
||||||
'select' => '*',
|
'select' => '*',
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
* @file defaultSection.php Define the default section for the 'mycp' module
|
* @file defaultSection.php Define the default section for the 'mycp' module
|
||||||
*~TERABYTE_DOC_READY~
|
*~TERABYTE_DOC_READY~
|
||||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||||
* $License: This is NULLED!
|
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||||
* $Author: ips_terabyte $
|
* $Author: ips_terabyte $
|
||||||
* @since 20th February 2002
|
* @since 20th February 2002
|
||||||
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
|
||||||
* @version v3.2.3
|
* @version v3.3.4
|
||||||
* $Revision: 8655 $
|
* $Revision: 8655 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Admin change email/password
|
* Admin change email/password
|
||||||
* Last Updated: $Date: 2011-05-31 16:58:52 -0400 (Tue, 31 May 2011) $
|
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 5th January 2005
|
* @since 5th January 2005
|
||||||
* @version $Revision: 8932 $
|
* @version $Revision: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -131,7 +131,7 @@ class admin_core_mycp_details extends ipsCommand
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$email_check = IPSMember::load( mb_strtolower($email) );
|
$email_check = IPSMember::load( strtolower($email) );
|
||||||
|
|
||||||
if ( $email_check['member_id'] )
|
if ( $email_check['member_id'] )
|
||||||
{
|
{
|
||||||
@@ -155,11 +155,11 @@ class admin_core_mycp_details extends ipsCommand
|
|||||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
|
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
|
||||||
$han_login = new $classToLoad( $this->registry );
|
$han_login = new $classToLoad( $this->registry );
|
||||||
$han_login->init();
|
$han_login->init();
|
||||||
$han_login->changeEmail( trim( mb_strtolower( $this->memberData['email'] ) ), trim( mb_strtolower( $email ) ), $this->memberData );
|
$han_login->changeEmail( trim( strtolower( $this->memberData['email'] ) ), trim( strtolower( $email ) ), $this->memberData );
|
||||||
|
|
||||||
IPSLib::runMemberSync( 'onEmailChange', $this->memberData['member_id'], mb_strtolower( $email ), $this->memberData['email'] );
|
IPSLib::runMemberSync( 'onEmailChange', $this->memberData['member_id'], strtolower( $email ), $this->memberData['email'] );
|
||||||
|
|
||||||
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'email' => mb_strtolower( $email ) ) ) );
|
IPSMember::save( $this->memberData['member_id'], array( 'core' => array( 'email' => strtolower( $email ) ) ) );
|
||||||
|
|
||||||
ipsRegistry::getClass('adminFunctions')->saveAdminLog( sprintf( $this->lang->words['changed_email'], $email ) );
|
ipsRegistry::getClass('adminFunctions')->saveAdminLog( sprintf( $this->lang->words['changed_email'], $email ) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
<menu>
|
<menu>
|
||||||
<tabitems>
|
<tabitems>
|
||||||
<item>
|
<item>
|
||||||
<title>Панель управления</title>
|
<title>My Dashboard</title>
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Панель управления</subitemtitle>
|
<subitemtitle>My Dashboard</subitemtitle>
|
||||||
<subitemlang>dashboard</subitemlang>
|
<subitemlang>dashboard</subitemlang>
|
||||||
<subsection>dashboard</subsection>
|
<subsection>dashboard</subsection>
|
||||||
<subitemurl></subitemurl>
|
<subitemurl></subitemurl>
|
||||||
@@ -15,10 +15,10 @@
|
|||||||
</subitems>
|
</subitems>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<title>Изменить свои данные</title>
|
<title>Change My Details</title>
|
||||||
<subitems>
|
<subitems>
|
||||||
<subitem>
|
<subitem>
|
||||||
<subitemtitle>Изменение своих данных</subitemtitle>
|
<subitemtitle>Change My Details</subitemtitle>
|
||||||
<subitemlang>mydetails</subitemlang>
|
<subitemlang>mydetails</subitemlang>
|
||||||
<subsection>details</subsection>
|
<subsection>details</subsection>
|
||||||
<subitemurl></subitemurl>
|
<subitemurl></subitemurl>
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* Bad Word Filters
|
* Bad Word Filters
|
||||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: ips_terabyte $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 27th January 2004
|
* @since 27th January 2004
|
||||||
* @version $Rev: 8644 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -145,8 +145,8 @@ class admin_core_posts_badwords extends ipsCommand
|
|||||||
$this->DB->setDataType( array( 'type', 'swop' ), 'string' );
|
$this->DB->setDataType( array( 'type', 'swop' ), 'string' );
|
||||||
|
|
||||||
$this->DB->update( 'badwords', array(
|
$this->DB->update( 'badwords', array(
|
||||||
'type' => trim( $this->request['before'] ),
|
'type' => $this->request['before'], // do not trim - see bug report 34433
|
||||||
'swop' => trim( $this->request['after'] ),
|
'swop' => $this->request['after'], // do not trim - see bug report 34433
|
||||||
'm_exact' => $this->request['match']
|
'm_exact' => $this->request['match']
|
||||||
), "wid=" . $id );
|
), "wid=" . $id );
|
||||||
|
|
||||||
@@ -210,8 +210,8 @@ class admin_core_posts_badwords extends ipsCommand
|
|||||||
$this->DB->setDataType( array( 'type', 'swop' ), 'string' );
|
$this->DB->setDataType( array( 'type', 'swop' ), 'string' );
|
||||||
|
|
||||||
$this->DB->insert( 'badwords', array(
|
$this->DB->insert( 'badwords', array(
|
||||||
'type' => trim( $this->request['before'] ),
|
'type' => $this->request['before'], // do not trim - see bug report 34433
|
||||||
'swop' => trim( $this->request['after'] ),
|
'swop' => $this->request['after'], // do not trim - see bug report 34433
|
||||||
'm_exact' => $this->request['match']
|
'm_exact' => $this->request['match']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -268,7 +268,14 @@ class admin_core_posts_badwords extends ipsCommand
|
|||||||
public function badwordsImport()
|
public function badwordsImport()
|
||||||
{
|
{
|
||||||
/* Get Badwords XML */
|
/* Get Badwords XML */
|
||||||
$content = $this->registry->adminFunctions->importXml( 'ipb_badwords.xml' );
|
try
|
||||||
|
{
|
||||||
|
$content = $this->registry->adminFunctions->importXml( 'ipb_badwords.xml' );
|
||||||
|
}
|
||||||
|
catch ( Exception $e )
|
||||||
|
{
|
||||||
|
$this->registry->output->showError( $e->getMessage() );
|
||||||
|
}
|
||||||
|
|
||||||
/* Check for content */
|
/* Check for content */
|
||||||
if ( ! $content )
|
if ( ! $content )
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* Invision Power Services
|
* Invision Power Services
|
||||||
* IP.Board v3.2.3
|
* IP.Board v3.3.4
|
||||||
* BBCode Management
|
* BBCode Management
|
||||||
* Last Updated: $LastChangedDate: 2011-08-23 18:01:24 -0400 (Tue, 23 Aug 2011) $
|
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author $Author: bfarber $
|
* @author $Author: bfarber $
|
||||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||||
* @license This is NULLED!
|
* @license http://www.invisionpower.com/company/standards.php#license
|
||||||
* @package IP.Board
|
* @package IP.Board
|
||||||
* @subpackage Core
|
* @subpackage Core
|
||||||
* @link http://hatynka.in
|
* @link http://www.invisionpower.com
|
||||||
* @since 27th January 2004
|
* @since 27th January 2004
|
||||||
* @version $Rev: 9407 $
|
* @version $Rev: 10914 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'IN_ACP' ) )
|
if ( ! defined( 'IN_ACP' ) )
|
||||||
@@ -203,7 +203,7 @@ class admin_core_posts_bbcode extends ipsCommand
|
|||||||
|
|
||||||
if ( is_file( $file ) )
|
if ( is_file( $file ) )
|
||||||
{
|
{
|
||||||
$content = @file_get_contents( $file );
|
$content = file_get_contents( $file );
|
||||||
|
|
||||||
if ( $content )
|
if ( $content )
|
||||||
{
|
{
|
||||||
@@ -264,6 +264,20 @@ class admin_core_posts_bbcode extends ipsCommand
|
|||||||
*/
|
*/
|
||||||
public function bbcodeImportDo( $content, $app='core' )
|
public function bbcodeImportDo( $content, $app='core' )
|
||||||
{
|
{
|
||||||
|
/* Init vars */
|
||||||
|
$tags = array();
|
||||||
|
$return = array( 'updated' => 0, 'inserted' => 0 );
|
||||||
|
|
||||||
|
//-----------------------------------------
|
||||||
|
// Got anything?
|
||||||
|
//-----------------------------------------
|
||||||
|
$content = trim( $content );
|
||||||
|
|
||||||
|
if ( empty( $content ) )
|
||||||
|
{
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
// Get xml class
|
// Get xml class
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
@@ -277,9 +291,6 @@ class admin_core_posts_bbcode extends ipsCommand
|
|||||||
// Get current custom bbcodes
|
// Get current custom bbcodes
|
||||||
//-----------------------------------------
|
//-----------------------------------------
|
||||||
|
|
||||||
$tags = array();
|
|
||||||
$return = array( 'updated' => 0, 'inserted' => 0 );
|
|
||||||
|
|
||||||
$this->DB->build( array( 'select' => '*', 'from' => 'custom_bbcode' ) );
|
$this->DB->build( array( 'select' => '*', 'from' => 'custom_bbcode' ) );
|
||||||
$this->DB->execute();
|
$this->DB->execute();
|
||||||
|
|
||||||
|
|||||||
Loaded 100 of 1567 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user