Platform
3.1
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
usercard_refreshgroup.php
Go to the documentation of this file.
1
<?php
2
/*
3
* @author Anakeen
4
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
5
* @package FDL
6
*/
7
/**
8
* Refresh groups to recompute members and mail attributes
9
*
10
* @author Anakeen 2006
11
* @version $Id: usercard_refreshgroup.php,v 1.1 2006/04/07 08:00:14 eric Exp $
12
* @license http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ Anakeen - licence CC
13
* @package FDL
14
* @subpackage
15
*/
16
/**
17
*/
18
// refreah for a classname
19
// use this only if you have changed title attributes
20
include_once (
"FDL/Class.Doc.php"
);
21
include_once (
"FDL/Lib.Dir.php"
);
22
include_once (
"FDL/Lib.Usercard.php"
);
23
24
$appl
=
new
Application
();
25
$appl
->Set(
"FDL"
,
$core
);
26
27
$force
=
GetHttpVars
(
"force"
,
""
);
// force a refresh if set to 'yes'
28
$fbar
=
GetHttpVars
(
"bar"
);
// for progress bar
29
$dbaccess
=
$appl
->GetParam(
"FREEDOM_DB"
);
30
if
(
$dbaccess
==
""
) {
31
print
"Database not found : param FREEDOM_DB"
;
32
return
;
33
}
34
$filter
= array();
35
if
(
$force
!=
'yes'
)
$filter
[] =
"grp_isrefreshed = '0'"
;
36
$tdoc
=
getChildDoc
(
$dbaccess
, 0, 0,
"ALL"
,
$filter
, 1,
"TABLE"
,
"IGROUP"
);
37
38
$tgid
= array();
39
$nd
= count(
$tdoc
);
40
print sprintf(_(
"%d group(s) to update\n"
) ,
$nd
);
41
42
foreach
(
$tdoc
as $k => $v) {
43
$tgid
[] =
getv
($v,
"us_whatid"
);
44
print
"\t"
. $v[
"title"
] .
"\n"
;
45
}
46
47
wbar
(
$nd
,
$nd
,
"processing"
);
48
if
(
$nd
> 0) {
49
print _(
"processing...\n"
);
50
refreshGroups
(
$tgid
,
true
);
51
print _(
"done\n"
);
52
}
53
wbar
(0,
$nd
,
"done"
);
54
?>
← centre documentaire
© anakeen
- published under
CC License
-
Dynacase