Index: trunk/core/units/general/cat_dbitem_export.php
===================================================================
diff -u -r3642 -r3648
--- trunk/core/units/general/cat_dbitem_export.php (.../cat_dbitem_export.php) (revision 3642)
+++ trunk/core/units/general/cat_dbitem_export.php (.../cat_dbitem_export.php) (revision 3648)
@@ -266,6 +266,12 @@
else {
$this->filePointer = fopen($this->getImportFilename(), 'r');
}
+
+ // skip UTF-8 BOM Modifier
+ $first_chars = fread($this->filePointer, 3);
+ if (bin2hex($first_chars) != 'efbbbf') {
+ fseek($this->filePointer, 0);
+ }
}
/**
Index: trunk/globals.php
===================================================================
diff -u -r3534 -r3648
--- trunk/globals.php (.../globals.php) (revision 3534)
+++ trunk/globals.php (.../globals.php) (revision 3648)
@@ -1611,23 +1611,25 @@
static $import_scripts = Array();
if( count($import_scripts) == 0 )
{
- $sql = 'SELECT * FROM '.GetTablePrefix().'ImportScripts ORDER BY is_id';
- $db =&GetADODBConnection();
+
+ $sql = 'SELECT imp.* , m.LoadOrder
+ FROM '.TABLE_PREFIX.'ImportScripts imp
+ LEFT JOIN '.TABLE_PREFIX.'Modules m ON m.Name = imp.is_Module
+ ORDER BY m.LoadOrder';
+
+ $db =& GetADODBConnection();
$rs = $db->Execute($sql);
- if( $rs && $rs->RecordCount() > 0 )
- {
- while(!$rs->EOF)
- {
+ if ($rs && $rs->RecordCount() > 0) {
+ while (!$rs->EOF) {
$rec =& $rs->fields;
- $import_scripts[] = Array( 'label' => $rec['is_label'], 'url' => $rec['is_script'],
+ $import_scripts[ $rec['is_id'] ] = Array( 'label' => $rec['is_label'], 'url' => $rec['is_script'],
'enabled' => $rec['is_enabled'], 'field_prefix' => $rec['is_field_prefix'],
'id' => $rec['is_string_id'], 'required_fields' => $rec['is_requred_fields'],
'module' => strtolower($rec['is_Module']) );
$rs->MoveNext();
}
}
- else
- {
+ else {
$import_scripts = Array();
}
}
Index: trunk/core/kernel/utility/debugger.php
===================================================================
diff -u -r3527 -r3648
--- trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 3527)
+++ trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 3648)
@@ -393,7 +393,13 @@
function appendRequest()
{
- $script = $_SERVER['PHP_SELF'];
+ if (isset($_SERVER['SCRIPT_FILENAME'])) {
+ $script = $_SERVER['SCRIPT_FILENAME'];
+ }
+ else {
+ $script = $_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'];
+ }
+
$this->appendHTML('ScriptName: '.$this->getFileLink($script,1,basename($script)).' ('.dirname($script).')');
$this->appendHTML('DomViewer: ');
Index: trunk/admin/install/inportal_schema.sql
===================================================================
diff -u -r3635 -r3648
--- trunk/admin/install/inportal_schema.sql (.../inportal_schema.sql) (revision 3635)
+++ trunk/admin/install/inportal_schema.sql (.../inportal_schema.sql) (revision 3648)
@@ -640,6 +640,7 @@
is_field_prefix varchar(50) NOT NULL default '',
is_requred_fields varchar(255) NOT NULL default '',
is_enabled tinyint(1) unsigned NOT NULL default '0',
+ is_type varchar(10) NOT NULL default '',
PRIMARY KEY (is_id)
)
Index: trunk/admin/install/upgrades/inportal_upgrade_v1.1.6.sql
===================================================================
diff -u -r3635 -r3648
--- trunk/admin/install/upgrades/inportal_upgrade_v1.1.6.sql (.../inportal_upgrade_v1.1.6.sql) (revision 3635)
+++ trunk/admin/install/upgrades/inportal_upgrade_v1.1.6.sql (.../inportal_upgrade_v1.1.6.sql) (revision 3648)
@@ -7,4 +7,7 @@
UPDATE ItemTypes SET Prefix = 'c' WHERE SourceTable = 'Category';
UPDATE ItemTypes SET Prefix = 'u' WHERE SourceTable = 'PortalUser';
+ALTER TABLE ImportScripts ADD is_type VARCHAR(10) NOT NULL;
+UPDATE ImportScripts SET is_type = 'db';
+
UPDATE Modules SET Version = '1.1.6' WHERE Name = 'In-Portal';
\ No newline at end of file
Index: trunk/admin/browse.php
===================================================================
diff -u -r3617 -r3648
--- trunk/admin/browse.php (.../browse.php) (revision 3617)
+++ trunk/admin/browse.php (.../browse.php) (revision 3648)
@@ -219,7 +219,6 @@
" ImagePath="">
">
- " ImagePath="">
" ImagePath="">
">
Index: trunk/admin/import/step2.php
===================================================================
diff -u -r2853 -r3648
--- trunk/admin/import/step2.php (.../step2.php) (revision 2853)
+++ trunk/admin/import/step2.php (.../step2.php) (revision 3648)
@@ -39,15 +39,18 @@
}
else
{
- $click_url = $adminURL."/import/step3.php".$var;
+ $application =& kApplication::Instance();
+ $click_url = $application->HREF('import_redirect', '', null, 'index4.php'); // $adminURL."/import/step3.php".$var;
$onClick = "ImportRedirect('import_form', ChoiseMade('import_form','choose'), '$click_url');";
}
$objCatToolBar->Add("moveright",'la_ToolTip_NextStep','#',$MouseOver,$MouseOut,$onClick,"tool_next_f3.gif");
// header
$title = admin_language("la_performing_import")." - ".admin_language("la_Step")." 2";
int_header($objCatToolBar,NULL,$title);
-
+
+ $objSession->SetVariable("ReturnScript", 'browse.php'); // return to catalog if import is made
+
?>