Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F784847
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 10, 9:44 PM
Size
12 KB
Mime Type
text/x-diff
Expires
Wed, Feb 12, 9:44 PM (11 h, 33 m)
Engine
blob
Format
Raw Data
Handle
562798
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/5.0.x/tools/debug_sample.php
===================================================================
--- branches/5.0.x/tools/debug_sample.php (revision 12533)
+++ branches/5.0.x/tools/debug_sample.php (revision 12534)
@@ -1,74 +1,52 @@
<?php
/**
* @version $Id$
* @package In-Portal
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.net/license/ for copyright notices and details.
*/
// define('SILENT_LOG', 1); // Log all php errors on site to separate file (/silent_log.txt)
// define('DBG_REQUREST_LOG', '/path/to/file');// Log all user requests to site into filename specified
-// define('DBG_SITE_PATH', '/relative_path/'); // set alternative BASE_PATH for old in-portal parts (where no K4 included)
// define('DBG_ZEND_PRESENT', 0); // Set to 0 to debug debugger (because debugger automatically got disabled during zend debug sessions)
-// define('NPARSER', 1); // Use new parser to compile templates
+// define('SA_IP', '193.68.72.64/26;99.14.230.174'); // Define IP addreses, from which super admin are allowed to login
// define('DBG_CAPTURE_STATISTICS', 1); // Capture performance satistics
// define('DBG_MAX_SQL_TIME', 2); // Maximal allowed sql execution time in seconds, all sqls above this become slow sqls
$dbg_options = Array (
// !!! DEBUG MODE will be off if IP does not match !!!
'DBG_IP' => '193.68.72.64/26;99.14.230.174', // !!!REQUIRED!!! Define IP addreses, which are allowed to use debugger (semicolon separated)
'DEBUG_MODE' => 1, // Debug mode is allowed/disabled (note: set DBG_IP to use this one)
// 'DBG_LOCAL_BASE_PATH' => 'w:', // Folder name on mapped drive, where site resides
// 'DBG_TOOLBAR_BUTTONS' => 1, // Show "Show Debugger" & "Refresh Frame" buttons (on front)
// 'DBG_USE_HIGHLIGHT' => 0, // Use "highlight_string" php function for debugger output formatting
// 'DBG_RAISE_ON_WARNINGS' => 1, // Show debugger output in case of any non-fatal error
'DBG_SQL_PROFILE' => defined('IS_INSTALL') && IS_INSTALL ? 0 : 1, // Profile SQL queries
// 'DBG_SQL_EXPLAIN' => 1, // Explain every SQL query, that is retrieving data
'DBG_SQL_FAILURE' => isset($GLOBALS['pathtoroot']) && defined('IS_INSTALL') && IS_INSTALL ? 0 : 1, // treat sql errors as fatal errors except for installation process
'DBG_SHOW_HTTPQUERY' => 1, // Show http query content (parsed user submit, GPC)
'DBG_SHOW_SESSIONDATA' => 1, // Show session data (at script finish)
// 'DBG_SHOW_PERSISTENTDATA' => 1, // Show persistent session data (at script finish)
- 'DBG_EDIT_HELP' => 1, // Show help filename on help screen
-// 'DBG_HELP' => 1, // Show FCK editor when viewing help screen
-
// 'DBG_FORCE_THEME' => 1, // Use this theme_id instead of one in url
'DBG_PHRASES' => 1, // Add ability to translate phrases on the fly
-// 'DBG_PHRASES_EDIT_FRONT'=> 1, // Add ability to edit existing phrases for Front End
-// 'DBG_PHRASES_EDIT_ADMIN'=> 1, // Add ability to edit existing phrases for Admin
// 'DBG_WINDOW_WIDTH' => 700, // Set custom debugger layer width (in pixels)
// 'DBG_REDIRECT' => 1, // Show links with redirect url instead of performing it (useful in events debugging)
// 'DBG_VALIDATE_CONFIGS' => 1, // Check that config fields match ones from database
// 'DBG_SHOW_TAGS' => 1, // Show tags beeing processed
-// 'DBG_PRE_PARSE' => 1, // Show new compiled functions in debugger
// 'DBG_SHOW_TREE_PRIORITY'=> 1, // Show tree node priority
// 'DBG_SKIP_AJAX' => 1, // Don't debug AJAX requests
// 'DBG_PAYMENT_GW' => 1, // All requests to payment gateways goes in TEST MODE
// 'DBG_IMAGE_RECOVERY' => 1, // Don't replace missing images with noimage.gif
// 'DBG_SQL_MODE' => 'TRADITIONAL', // Extra control over sql syntax & data from MySQL server side
-
-// 'DBG_FAST_INSTALL' => 1, // Install Language Pack in One Step
- );
-
-// for ADODB to work: begin
- define('ADODB_OUTP', 'dbg_SQLLog');
- function dbg_SQLLog($msg, $new_line = false) { }
-// for ADODB to work: end
-
- function dbg_tableMatch($table_name,$sql)
- {
- static $prefix = '';
- $prefix = defined('TABLE_PREFIX') ? TABLE_PREFIX : GetTablePrefix();
- return strpos($sql, $prefix.$table_name) !== false;
- }
-?>
\ No newline at end of file
+ );
\ No newline at end of file
Index: branches/5.0.x/core/units/help/help_config.php
===================================================================
--- branches/5.0.x/core/units/help/help_config.php (revision 12533)
+++ branches/5.0.x/core/units/help/help_config.php (nonexistent)
@@ -1,28 +0,0 @@
-<?php
-/**
-* @version $Id$
-* @package In-Portal
-* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
-* @license GNU/GPL
-* In-Portal is Open Source software.
-* This means that this software may have been modified pursuant
-* the GNU General Public License, and as distributed it includes
-* or is derivative of works licensed under the GNU General Public License
-* or other free or open source software licenses.
-* See http://www.in-portal.net/license/ for copyright notices and details.
-*/
-
-defined('FULL_PATH') or die('restricted access!');
-
- $config = Array(
- 'Prefix' => 'h',
- 'EventHandlerClass' => Array('class'=>'HelpEventHandler','file'=>'help_event_handler.php','build_event'=>'OnBuild'),
- 'TagProcessorClass' => Array('class'=>'HelpTagProcessor','file'=>'help_tag_processor.php','build_event'=>'OnBuild'),
- 'QueryString' => Array(
- 1 => 'prefix',
- 2 => 'icon',
- 3 => 'module',
- 4 => 'title_preset',
- 5 => 'event',
- ),
- );
\ No newline at end of file
Property changes on: branches/5.0.x/core/units/help/help_config.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.3
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/5.0.x/core/units/help/help_event_handler.php
===================================================================
--- branches/5.0.x/core/units/help/help_event_handler.php (revision 12533)
+++ branches/5.0.x/core/units/help/help_event_handler.php (nonexistent)
@@ -1,41 +0,0 @@
-<?php
-/**
-* @version $Id$
-* @package In-Portal
-* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
-* @license GNU/GPL
-* In-Portal is Open Source software.
-* This means that this software may have been modified pursuant
-* the GNU General Public License, and as distributed it includes
-* or is derivative of works licensed under the GNU General Public License
-* or other free or open source software licenses.
-* See http://www.in-portal.net/license/ for copyright notices and details.
-*/
-
- defined('FULL_PATH') or die('restricted access!');
-
- class HelpEventHandler extends kDBEventHandler {
-
- /**
- * Saves help file or created new one
- *
- * @param kEvent $event
- */
- function OnSaveHelp(&$event)
- {
- $new_content = $this->Application->GetVar('HelpContent');
-
- $module = $this->Application->GetVar('h_module');
- $title_preset = $this->Application->GetVar('h_title_preset');
-
- $sql = 'SELECT Path FROM '.TABLE_PREFIX.'Modules WHERE LOWER(Name)='.$this->Conn->qstr( mb_strtolower($module) );
- $module_path = $this->Conn->GetOne($sql);
-
- $help_file = FULL_PATH.'/'.$module_path.'module_help/'.$title_preset.'.txt';
- $help_data = $this->Application->GetVar('HelpContent');
-
- $fp = fopen($help_file,'w');
- fwrite($fp,$help_data);
- fclose($fp);
- }
- }
\ No newline at end of file
Property changes on: branches/5.0.x/core/units/help/help_event_handler.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2.2.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Index: branches/5.0.x/core/units/help/help_tag_processor.php
===================================================================
--- branches/5.0.x/core/units/help/help_tag_processor.php (revision 12533)
+++ branches/5.0.x/core/units/help/help_tag_processor.php (nonexistent)
@@ -1,118 +0,0 @@
-<?php
-/**
-* @version $Id$
-* @package In-Portal
-* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
-* @license GNU/GPL
-* In-Portal is Open Source software.
-* This means that this software may have been modified pursuant
-* the GNU General Public License, and as distributed it includes
-* or is derivative of works licensed under the GNU General Public License
-* or other free or open source software licenses.
-* See http://www.in-portal.net/license/ for copyright notices and details.
-*/
-
- defined('FULL_PATH') or die('restricted access!');
-
- class HelpTagProcessor extends kDBTagProcessor {
-
- function SectionTitle($params)
- {
- $rets = explode('.', $this->Application->GetVar('h_prefix') );
- $this->Prefix = $rets[0];
- $this->Special = isset($rets[1]) ? $rets[1] : '';
- //$this->Prefix = $this->Application->GetVar('h_prefix');
-
- $title_preset_name = replaceModuleSection($this->Application->GetVar('h_title_preset'));
- $this->Application->SetVar('h_title_preset', $title_preset_name);
- $title_presets = $this->Application->getUnitOption($this->Prefix,'TitlePresets');
-
- $format = $title_presets[$title_preset_name]['format'];
- $format = preg_replace('/[ ]*( ([\'"]{1}) | ([\(]{1}) ) \#.*\# (?(2) \1 | \) )[ ]*/Ux', ' ', $format);
- $title_presets[$title_preset_name]['format'] = $format;
- $this->Application->setUnitOption($this->Prefix,'TitlePresets',$title_presets);
-
- $params['title_preset'] = $title_preset_name;
- return parent::SectionTitle($params);
- }
-
- function getModule()
- {
- $module = $this->Application->GetVar('h_module');
- if (!$module) {
- $module = $this->Application->RecallVar('module');
- }
- return $module;
- }
-
- function ShowHelp($params)
- {
- $module = $this->getModule();
-
- $module = explode(':', $module);
- $module = $module[0];
-
- $title_preset = $this->Application->GetVar('h_title_preset');
-
- $module_path = $this->Application->findModule('Name', $module, 'Path');
- $help_file = FULL_PATH.'/'.$module_path.'module_help/'.$title_preset.'.txt';
-
- if ($this->Application->isDebugMode() && constOn('DBG_EDIT_HELP')) {
- global $debugger;
- $ret = 'Help file: <b>'.$debugger->getLocalFile($help_file).'</b><hr>';
- }
- else {
- $ret = '';
- }
-
- $help_data = file_exists($help_file) ? file_get_contents($help_file) : false;
-
- if( $this->Application->isDebugMode() && constOn('DBG_HELP') )
- {
- $this->Application->Factory->includeClassFile('FCKeditor');
- $oFCKeditor = new FCKeditor('HelpContent');
-
- $oFCKeditor->BasePath = $this->Application->BaseURL('/admin/editor/cmseditor');
- $oFCKeditor->Width = '100%';
- $oFCKeditor->Height = '300';
- $oFCKeditor->ToolbarSet = 'Advanced';
- $oFCKeditor->Value = $help_data;
-
- $oFCKeditor->Config = Array(
- 'UserFilesPath' => WRITEABLE . '/user_files',
- 'ProjectPath' => $this->Application->ConfigValue('Site_Path'),
- 'CustomConfigurationsPath' => rtrim( $this->Application->BaseURL('/admin/editor/inp_fckconfig.js'), '/'),
- );
-
- $ret .= $oFCKeditor->CreateHtml();
- }
- else
- {
- $ret .= $help_data ? $help_data : $this->Application->Phrase('la_section_help_file_missing');
- }
-
- return $ret;
- }
-
- function GetIcon($params)
- {
- $icon_var = getArrayValue($params,'var_name');
- $icon = replaceModuleSection($this->Application->GetVar($icon_var));
-
- if(!$icon) $icon = getArrayValue($params,'default_icon');
- return $icon;
- }
-
- /**
- * Returns templates path for module, which is gathered from prefix module
- *
- * @param Array $params
- * @return string
- * @author Alex
- */
- function ModulePath($params)
- {
- $module_folder = trim( $this->Application->findModule('Name', $this->getModule(), 'Path'), '/');
- return '../../'.$module_folder.'/admin_templates/';
- }
- }
\ No newline at end of file
Property changes on: branches/5.0.x/core/units/help/help_tag_processor.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.12.2.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property
Event Timeline
Log In to Comment