Skip to content
Newer
Older
100644 37 lines (30 sloc) 1.57 KB
fc93229 @philfree Initial move to git
authored
1 <?php
62171ed @philfree add the license information
authored
2 /** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/
fc93229 @philfree Initial move to git
authored
3 // Copyright 2008 - 2010 all rights reserved, SQLFusion LLC, info@sqlfusion.com
62171ed @philfree add the license information
authored
4 /** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/
fc93229 @philfree Initial move to git
authored
5
6 /**
7 * Rebuild the user contacts table
8 * User contacts are accessed from the tables by userid<iduser>_contact
9 * The contact table is updated for all the contact related operation and also the user contact table is getting updated on
10 * add/edit/delete operation of contact, tag etc.
11 * To make it more reliable the following script is used. This is rebuilt all the user contact tables.
12 * This script is intensive as the volume of contact and user increases.
13 * Wise to set the script once in a week. Also we can ignore rebuiling of user contact tables who have not logged in in certain period by passing the parameter
14 * in getUserLoggedInWithinPeriod() default is 7 days
15 * @see class/Contact.class.php
16 * @see class/ContactView.class.php
17 *
18 */
19
20 include_once("config.php");
21 $contact_view = new ContactView();
22
23 set_time_limit(36000);
24
25 $user = new User();
26 $user->getUserLoggedInWithinPeriod();
27
28 while ($user->next()) {
29 // if($user->iduser == 20 ){
30 echo "\n<br>User id:".$user->iduser." Name:".$user->firstname." ".$user->lastname;
31 $contact_view->setUser($user->iduser);
32 $contact_view->rebuildContactUserTable();
33 // }
34 }
35
36 ?>
Something went wrong with that request. Please try again.