Ability to mass-set-permission

olya
olya's picture

Joined: 2002-10-15
Posts: 3
Posted: Tue, 2002-10-15 05:29

I've attempted to write a hack that would add all of the users (except "Everbody") to a certain permissions field:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
if (isset($allUid) &amp;&amp; strchr($submit_read, ">")) {
$gallery->album->setRead($allUid, 1);
$changed++;
} else if (isset($readUid) &amp;&amp; strchr($submit_read, "<")) {
$gallery->album->setRead($readUid, 0);
$changed++;
} else if (isset($readUid) &amp;&amp; strchr($submit_read, "All")) {

foreach ($gallery->userDB->getUidList() as $uid) {
$tmpUser = $gallery->userDB->getUserByUid($uid);

$gallery->album->setRead($tmpUser);
$changed++;
}</TD></TR></TABLE><!-- BBCode End -->

that doesnt seem to be working. any ideas?

- olya