View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05114Bug reportsImport/Exportpublic2011-05-04 19:50
Reporterjadephoenix1988 Assigned Todionet  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.90+ 
Fixed in Version1.91 
Summary05114: cmdline_importsurvey bug
Description

called in the commandline with
php.exe path_to_php/cmdline_importsurvey.php full_path_to_lss/limesurvey_survey_77381.lss admin password

Additional Information

Fatal Error: Call to a member function gT() on a non-object in .../login_check.php in line 180

TagsNo tags attached.
Attached Files
common.patch (811 bytes)   
Index: common.php
===================================================================
--- common.php	(revision 10007)
+++ common.php	(working copy)
@@ -120,7 +120,10 @@
 // Uncomment the following line for debug purposes
 // echo $slashlesspath." - ".$slashlesshome;
 
-if (strcasecmp($slashlesshome, $slashlesspath) == 0) {
+// Detect command line usage
+if (!empty($argc) && basename($argv[0]) == "cmdline_importsurvey.php") {
+    $sourcefrom="admin";
+} else if (strcasecmp($slashlesshome, $slashlesspath) == 0) {
     if (strcasecmp($slashlesshome."install", $slashlesspath) != 0)
     {
         $sourcefrom="admin";
@@ -255,7 +258,7 @@
 
 if ($sourcefrom == "admin")
 {
-    require_once('admin_functions.php');
+    require_once($homedir.'/admin_functions.php');
 } 
 
 // Check if the DB is up to date
common.patch (811 bytes)   
Bug heat4
Complete LimeSurvey version number (& build)9642
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL
Server OS (if known)Windows Server 2008
Webserver software & version (if known)Apache
PHP Version5.3.5

Users monitoring this issue

There are no users monitoring this issue.

Activities

dionet

dionet

2011-04-16 23:30

reporter   ~14833

That error was triggered when cmdline_importsurvey.php was called outside limesurvey/admin/ folder. Fixed after adding a condition in common.php

c_schmitz

c_schmitz

2011-04-17 16:22

administrator   ~14834

Looks good, please apply.

Issue History

Date Modified Username Field Change
2011-04-15 16:51 jadephoenix1988 New Issue
2011-04-15 23:05 c_schmitz Assigned To => dionet
2011-04-15 23:05 c_schmitz Status new => assigned
2011-04-16 23:26 dionet File Added: common.patch
2011-04-16 23:30 dionet Note Added: 14833
2011-04-16 23:30 dionet Assigned To dionet => c_schmitz
2011-04-17 16:22 c_schmitz Note Added: 14834
2011-04-17 16:22 c_schmitz Assigned To c_schmitz => dionet
2011-04-17 21:46 dionet Status assigned => resolved
2011-04-17 21:46 dionet Resolution open => fixed
2011-05-04 19:50 c_schmitz Status resolved => closed
2011-05-04 19:50 c_schmitz Fixed in Version => 1.91