X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Fcreatesim.php;h=e0b5fc906be8c0e9fc79bb50d20496f8aa786cd7;hb=027c73a4a1e1509b7cacc6068dacfb4fc778c872;hp=1266a9700b674ca58f76551b5417eee55cac5667;hpb=3afcdc18f7bfd23ac780b9f27c47582c1b41bb83;p=quix0rs-gnu-social.git diff --git a/scripts/createsim.php b/scripts/createsim.php index 1266a9700b..e0b5fc906b 100644 --- a/scripts/createsim.php +++ b/scripts/createsim.php @@ -41,9 +41,12 @@ require_once INSTALLDIR.'/scripts/commandline.inc'; function newUser($i) { global $userprefix; - User::register(array('nickname' => sprintf('%s%d', $userprefix, $i), - 'password' => sprintf('password%d', $i), - 'fullname' => sprintf('Test User %d', $i))); + $user = User::register(array('nickname' => sprintf('%s%d', $userprefix, $i), + 'password' => sprintf('password%d', $i), + 'fullname' => sprintf('Test User %d', $i))); + if (!empty($user)) { + $user->free(); + } } function newNotice($i, $tagmax) @@ -73,6 +76,9 @@ function newNotice($i, $tagmax) } $notice = Notice::saveNew($user->id, $content, 'system'); + + $user->free(); + $notice->free(); } function newSub($i) @@ -106,10 +112,16 @@ function newSub($i) } subs_subscribe_to($from, $to); + + $from->free(); + $to->free(); } function main($usercount, $noticeavg, $subsavg, $tagmax) { + global $config; + $config['site']['dupelimit'] = -1; + $n = 1; newUser(0);