Version 2.2.0 RC-1
This commit is contained in:
1 parent
f73f8bff6d
commit
22f1b963ee
1034 files changed
+178610
-70897
No files matched your search
@@ -2,27 +2,18 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2005-10-19 17:55:22 +0100 (Wed, 19 Oct 2005) $
|
||||
| > $Revision: 57 $
|
||||
| > $Author: bfarber $
|
||||
| > $Date: 2006-10-06 10:09:22 +0100 (Fri, 06 Oct 2006) $
|
||||
| > $Revision: 611 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Skin Difference Engine
|
||||
@@ -33,7 +24,7 @@
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåâåðíûé âõîä</h1> Ó Âàñ íåò äîñòóïà ê äèðåêòèâå ýòîãî ôàéëà. Åñëè Âû ïðîâîäèëè îáíîâëåíèÿ, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü 'admin.php'.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -56,22 +47,10 @@ class ad_skin_diff
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
$this->ipsclass->admin->page_detail = "Ñðàâíèòü âàø ñòèëü.";
|
||||
$this->ipsclass->admin->page_title = "HTML Ñðàâíåíèå ñòèëåé";
|
||||
$this->ipsclass->admin->page_detail = "Compare your template set differences.";
|
||||
$this->ipsclass->admin->page_title = "Skin Template HTML Differences";
|
||||
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Skin Differences Home' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill globals - globals bad, Homer good.
|
||||
//-----------------------------------------
|
||||
|
||||
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
|
||||
|
||||
foreach ( $tmp_in as $k => $v )
|
||||
{
|
||||
unset($$k);
|
||||
}
|
||||
|
||||
//$this->ipsclass->can_use_fancy_js = 0;
|
||||
|
||||
//-----------------------------------------
|
||||
// LOAD HTML
|
||||
//-----------------------------------------
|
||||
@@ -151,7 +130,7 @@ class ad_skin_diff
|
||||
|
||||
if ( ! $current_session['diff_session_id'] )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü òåêóùóþ ñåññèþ øàáëîíà.");
|
||||
$this->ipsclass->admin->error("Could not get the current template compare session.");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -176,7 +155,7 @@ class ad_skin_diff
|
||||
// Done...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->main_msg = "Îò÷åò î ðàçëè÷èÿõ óäàëåí";
|
||||
$this->ipsclass->main_msg = "Differences report removed";
|
||||
|
||||
$this->skin_differences_list();
|
||||
}
|
||||
@@ -208,7 +187,7 @@ class ad_skin_diff
|
||||
|
||||
if ( ! $current_session['diff_session_id'] )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü òåêóùóþ ñåññèþ øàáëîíà");
|
||||
$this->ipsclass->admin->error("Could not get the current template compare session.");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -231,6 +210,11 @@ class ad_skin_diff
|
||||
|
||||
$row['diff_change_type'] ? $changed++ : $missing++;
|
||||
|
||||
$row['diff_change_content'] = str_replace( "\n", "<br>", $row['diff_change_content']);
|
||||
$row['diff_change_content'] = str_replace( "><", ">\n<" ,$row['diff_change_content']);
|
||||
$row['diff_change_content'] = preg_replace( "#(?<!(\<del|\<ins)) {1}(?!:style)#i", " " ,$row['diff_change_content']);
|
||||
|
||||
|
||||
$content .= $this->html->skin_diff_export_row( $row['diff_change_func_name'], $row['diff_change_func_group'], $row['diff_change_content'] );
|
||||
}
|
||||
|
||||
@@ -268,9 +252,13 @@ class ad_skin_diff
|
||||
|
||||
if ( ! $diff_row['diff_change_key'] )
|
||||
{
|
||||
$this->ipsclass->admin->error( "Êëþ÷ íå íàéäåí" );
|
||||
$this->ipsclass->admin->error( "No key found" );
|
||||
}
|
||||
|
||||
$diff_row['diff_change_content'] = str_replace( "\n", "<br>", $diff_row['diff_change_content']);
|
||||
$diff_row['diff_change_content'] = str_replace( "><", ">\n<" ,$diff_row['diff_change_content']);
|
||||
$diff_row['diff_change_content'] = preg_replace( "#(?<!(\<del|\<ins)) {1}(?!:style)#i", " " ,$diff_row['diff_change_content']);
|
||||
|
||||
$this->ipsclass->html = $this->html->skin_diff_view_bit( $diff_row['diff_change_func_group'], $diff_row['diff_change_func_name'], $diff_row['diff_change_content'] );
|
||||
|
||||
$this->ipsclass->admin->print_popup();
|
||||
@@ -305,7 +293,7 @@ class ad_skin_diff
|
||||
|
||||
if ( ! $current_session['diff_session_id'] )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü òåêóùóþ ñåññèþ øàáëîíà.");
|
||||
$this->ipsclass->admin->error("Could not get the current template compare session.");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -335,12 +323,12 @@ class ad_skin_diff
|
||||
|
||||
if ( ! $row['diff_change_type'] )
|
||||
{
|
||||
$diff_is = '<span style="color:red">Íîâîå</span>';
|
||||
$diff_is = '<span style="color:red">New</span>';
|
||||
$missing++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$diff_is = '<span style="color:green">Èçìåíåíî</span>';
|
||||
$diff_is = '<span style="color:green">Changed</span>';
|
||||
$changed++;
|
||||
}
|
||||
|
||||
@@ -401,7 +389,7 @@ class ad_skin_diff
|
||||
|
||||
if ( ! $skin_set['set_skin_set_id'] )
|
||||
{
|
||||
$this->ipsclass->admin->error( "Íå âûáðàí ID ñòèëÿ (çàíîâî!)" );
|
||||
$this->ipsclass->admin->error( "No skin ID passed (again)!" );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -416,7 +404,7 @@ class ad_skin_diff
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'template_diff_session', array( 'diff_session_togo' => intval( $total_bits['count'] ),
|
||||
'diff_session_done' => 0,
|
||||
'diff_session_title' => "Ñðàâíåíèå ñî ñòèëåì: ".$skin_set['set_name'],
|
||||
'diff_session_title' => "Comparion from skin set: ".$skin_set['set_name'],
|
||||
'diff_session_updated' => time(),
|
||||
'diff_session_ignore_missing' => 1 ) );
|
||||
|
||||
@@ -482,7 +470,7 @@ class ad_skin_diff
|
||||
|
||||
if ( ! $this->ipsclass->input['diff_session_title'] )
|
||||
{
|
||||
$this->ipsclass->admin->error( "Âû äîëæíû ââåñòè íàçâàíèå" );
|
||||
$this->ipsclass->admin->error( "You must enter a title" );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -495,7 +483,7 @@ class ad_skin_diff
|
||||
// Ut-oh....
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->admin->error( "Ôàéë íå áûë çàãðóæåí" );
|
||||
$this->ipsclass->admin->error( "No file was uploaded" );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -509,6 +497,11 @@ class ad_skin_diff
|
||||
$content = $this->ipsclass->admin->import_xml( $tmp_name );
|
||||
}
|
||||
|
||||
if( !$content )
|
||||
{
|
||||
$this->ipsclass->admin->error( "There was no content in the file to process" );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get number missing template bits
|
||||
//-----------------------------------------
|
||||
@@ -519,6 +512,8 @@ class ad_skin_diff
|
||||
// Create session
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->allow_sub_select = 1;
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'template_diff_session', array( 'diff_session_togo' => intval( $total_bits['count'] ),
|
||||
'diff_session_done' => 0,
|
||||
'diff_session_title' => $this->ipsclass->input['diff_session_title'],
|
||||
@@ -531,7 +526,7 @@ class ad_skin_diff
|
||||
// Get xml mah-do-dah
|
||||
//-----------------------------------------
|
||||
|
||||
require( KERNEL_PATH.'class_xml.php' );
|
||||
require_once( KERNEL_PATH.'class_xml.php' );
|
||||
$xml = new class_xml();
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -579,15 +574,17 @@ class ad_skin_diff
|
||||
|
||||
if ( ! is_array( $xml->xml_array['templateexport']['templategroup']['template'] ) )
|
||||
{
|
||||
$this->ipsclass->admin->error("Îøèáêà ñ ipb_templates.xml - ïðîäîëæèòü íåâîçìîæíî");
|
||||
$this->ipsclass->admin->error("Error with ipb_templates.xml - could not process XML properly");
|
||||
}
|
||||
|
||||
foreach( $xml->xml_array['templateexport']['templategroup']['template'] as $id => $entry )
|
||||
foreach( $xml->xml_array['templateexport']['templategroup']['template'] as $entry )
|
||||
{
|
||||
$diff_key = $diff_session_id.':'.$entry[ 'group_name' ]['VALUE'].':'.$entry[ 'func_name' ]['VALUE'];
|
||||
|
||||
if ( ! $seen[ $diff_key ] )
|
||||
{
|
||||
$this->ipsclass->DB->allow_sub_select = 1;
|
||||
|
||||
$this->ipsclass->DB->do_insert( 'templates_diff_import', array( 'diff_key' => $diff_session_id.':'.$entry[ 'group_name' ]['VALUE'].':'.$entry[ 'func_name' ]['VALUE'],
|
||||
'diff_func_group' => $entry[ 'group_name' ]['VALUE'],
|
||||
'diff_func_data' => $entry[ 'func_data' ]['VALUE'],
|
||||
@@ -620,7 +617,7 @@ class ad_skin_diff
|
||||
$pergo = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 10;
|
||||
$diff_session_id = intval( $this->ipsclass->input['diff_session_id'] );
|
||||
$done = 0;
|
||||
$img = '<img src="'.$this->ipsclass->skin_url.'/images/aff_tick_small.png" border="0" alt="-" /> ';
|
||||
$img = '<img src="'.$this->ipsclass->skin_acp_url.'/images/aff_tick_small.png" border="0" alt="-" /> ';
|
||||
|
||||
//-----------------------------------------
|
||||
// Get current session
|
||||
@@ -630,7 +627,7 @@ class ad_skin_diff
|
||||
|
||||
if ( ! $current_session['diff_session_id'] )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü òåêóùóþ ñåññèþ øàáëîíà.");
|
||||
$this->ipsclass->admin->error("Could not get the current template compare session.");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -729,11 +726,11 @@ class ad_skin_diff
|
||||
if ( ! $done )
|
||||
{
|
||||
$this->ipsclass->admin->output_multiple_redirect_hit( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js."&code=skin_diff_process&diff_session_id={$diff_session_id}&pergo=".$pergo,
|
||||
$img.' '.$current_session['diff_session_done'].' èç '. $current_session['diff_session_togo'] .' øàáëîíîâ îáðàáîòàíî...' );
|
||||
$img.' '.$current_session['diff_session_done'].' of '. $current_session['diff_session_togo'] .' template bits processed...' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->admin->output_multiple_redirect_done( "<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=skin_diff_view&diff_session_id={$diff_session_id}' target='_top'>Ïðîñìîòðåòü ðåçóëüòàòû</a>");
|
||||
$this->ipsclass->admin->output_multiple_redirect_done( "<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=skin_diff_view&diff_session_id={$diff_session_id}' target='_top'>View the differences results</a>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user