Author Topic: Urgent: Incorrect player ordering after saving  (Read 4149 times)

Offline zul200289

  • New User
  • *
  • Posts: 6
    • View Profile
Urgent: Incorrect player ordering after saving
« on: January 05, 2011, 11:10:02 PM »
Hello there,

After choosing a team in the team management page, I saved the team and then view it again. The order of the players have changed, ie goalkeeper is a striker, defend is mid and so on. This also happens when I click Play! and used the admin panel to move the game to next week.

I'm using 1.46.

After checking the database I see that the order of the players in table team_players_order has been reversed after saving. So if I save again the order becomes correct again. I've attached the screenshots of the team management page as well as the mysql for you to see. Or you can try for yourself at http://bolafantasi.com/main/

Will need a really quick fix, urgently. I'm working on it myself as well but would prefer it if you could come up with the 'correct' method of fixing this bug. Thanks!






Offline zul200289

  • New User
  • *
  • Posts: 6
    • View Profile
Re: Urgent: Incorrect player ordering after saving
« Reply #1 on: January 05, 2011, 11:10:33 PM »
pics

Offline zul200289

  • New User
  • *
  • Posts: 6
    • View Profile
Re: Urgent: Incorrect player ordering after saving
« Reply #2 on: January 05, 2011, 11:11:02 PM »
after save

Offline zul200289

  • New User
  • *
  • Posts: 6
    • View Profile
Re: Urgent: Incorrect player ordering after saving
« Reply #3 on: January 06, 2011, 12:46:20 AM »
Have just added 2 lines of code to alleviate the problem. Have just added array_reverse() on some part of code in data_approve.php.

The player list doesn't reverse itself anymore but if it's the first time an user saves the player list is still reversed at first.

Offline zul200289

  • New User
  • *
  • Posts: 6
    • View Profile
Re: Urgent: Incorrect player ordering after saving
« Reply #4 on: January 06, 2011, 03:14:47 AM »
Have added an empty check of the array and make it so that it doesn't reverse the array if it's the user's first time.

Well the problem's settled for now. Would be glad if you could fix this in later versions. Thanks.

kiosk2

  • Guest
Re: Urgent: Incorrect player ordering after saving
« Reply #5 on: January 09, 2011, 04:01:42 PM »
Hi

Sorry for the late reply - I usually get notified about new topics but didn't for some reason.

I don't get this on my server but will try and replicate on a fresh install. Glad you got it fixed for now though.

David