Jump to content
CFVA

Schedule export problem [SOLVED]

Recommended Posts

When exporting the schedule from the Admin Centre option, it is exporting the daysofweek column with a preceding SPACE i.e. " 0123456" not "0123456". This gives the problem that when imported back SATURDAY is always missing from the schedule, as it imports " 012345"

Any ideas please as it is really annoying have to edit the whole column everytime

Edited by LakerVirtual
SOLVED

Share this post


Link to post
Share on other sites

I do not believe that this is the issue but can you try the following solution? Open your admin/modules/Import/Import.php, on lines 305-306 you should have something like this:

$line = "{$s->code},{$s->flightnum},{$s->depicao},{$s->arricao},"."{$s->route},{$s->registration},{$s->flightlevel},{$s->distance}," .
                "{$s->deptime},{$s->arrtime},{$s->flighttime},{$s->notes},"."{$s->price},{$s->flighttype},{$s->daysofweek},{$s->enabled},{$s->week1},{$s->week2},{$s->week3},{$s->week4}";

As you can see, I have remove all the spaces between all the elements and especially the {$s->daysofweek}. Could you please attach your Import.php file?

The most practical way is running a mysql command through phpMyAdmin as soon as you import your schedules that will automatically select all the days of the week.

UPDATE phpvms_schedules SET daysofweek='0123456', week1='0123456', week2='0123456', week3='0123456', week4='0123456' WHERE 1;

Just do not forget to replace "phpvms_" with your own database tables prefix if you are using a different one.

Share this post


Link to post
Share on other sites
18 hours ago, servetas said:

I do not believe that this is the issue but can you try the following solution? Open your admin/modules/Import/Import.php, on lines 305-306 you should have something like this:


$line = "{$s->code},{$s->flightnum},{$s->depicao},{$s->arricao},"."{$s->route},{$s->registration},{$s->flightlevel},{$s->distance}," .
                "{$s->deptime},{$s->arrtime},{$s->flighttime},{$s->notes},"."{$s->price},{$s->flighttype},{$s->daysofweek},{$s->enabled},{$s->week1},{$s->week2},{$s->week3},{$s->week4}";

As you can see, I have remove all the spaces between all the elements and especially the {$s->daysofweek}. Could you please attach your Import.php file?

The most practical way is running a mysql command through phpMyAdmin as soon as you import your schedules that will automatically select all the days of the week.


UPDATE phpvms_schedules SET daysofweek='0123456', week1='0123456', week2='0123456', week3='0123456', week4='0123456' WHERE 1;

Just do not forget to replace "phpvms_" with your own database tables prefix if you are using a different one.

That seems to have solved it, by replacing the line of code in import.php. There were other columns that had spaces added everytime on export but all seems ok now.

Thanks for the help

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...