The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database Migration
#5
//If you got a notification from a different username, I had to kill off a couple of accounts that were trying to attack the site. We got a mini DOS attack today. Everything seems fine now.

The great thing is that there’s nothing wrong at all with UserSpice 3. If people want to do things procedurally, it’s a great choice. On top of that, if they get one of the later versions with the nice dashboard and the new classes, they can even do their own oop queries. I need to do a better job of documenting the upgrade process.

The general rule of thumb is…
1. All the “userspice” pages are new so you would lose any changes if you modified yours.
2. Anything you wrote on your frontend will work fine with a few caveats.
a. If you’re making calls using the old built in functions that look for the logged in user. It will need to be updated. Basically
if(isUserLoggedIn()) {
becomes
if($user->isLoggedIn()) {

b. If you are using US3 procedural ways to echo out things like the user name, you have to use the new OOP way of doing that. by default it’s
<?=$user->data()->username?> or whatever you want to echo out.

3. I meticulously rewrote every single function that US3 actually used into OOP/PDO PHP. So the biggest thing you’ll get is that if you were (and you probably weren’t) using US3’s built in functions, you might receive an object back instead of an array and might need to update a bit. For the most part, though, people seemed to build their own db classes and things like that and US4 will play nicely with those. Especially if you’re willing to call your db variable anything other than $db.
  Reply


Messages In This Thread
Database Migration - by mudmin - 01-16-2016, 10:14 PM
Database Migration - by mudmin - 02-18-2016, 12:42 AM
Database Migration - by brian - 02-18-2016, 01:30 PM
Database Migration - by astropos - 02-18-2016, 07:12 PM
Database Migration - by mudmin - 02-19-2016, 04:01 AM
Database Migration - by brian - 02-19-2016, 04:04 PM
Database Migration - by mudmin - 02-19-2016, 09:48 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)