blob: 5b4c8f80194308adeb634c7d835f21ea92b8cd07 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<?php
namespace Zotlabs\Update;
class _1140 {
function run() {
$r = q("select * from clients where true");
$x = false;
if($r) {
foreach($r as $rr) {
$m = q("INSERT INTO xperm (xp_client, xp_channel, xp_perm) VALUES ('%s', %d, '%s') ",
dbesc($rr['client_id']),
intval($rr['uid']),
dbesc('all')
);
if(! $m)
$x = true;
}
}
if($x)
return UPDATE_FAILED;
return UPDATE_SUCCESS;
}
}
|