function photos_photos_access in Album Photos 6.2
Same name and namespace in other branches
- 8.5 photos.module \photos_photos_access()
- 8.4 photos.module \photos_photos_access()
- 7.3 photos.module \photos_photos_access()
- 6.0.x photos.module \photos_photos_access()
File
- ./
photos.module, line 267
Code
function photos_photos_access() {
if (variable_get('photos_access_photos', 0)) {
if (arg(0) == 'photos' && arg(1) != 'get' && is_numeric(arg(2))) {
switch (arg(1)) {
case 'album':
case 'sub-album':
case 'zoom':
case 'sub-slide':
return arg(2);
case 'image':
return $GLOBALS['photos'][arg(2) . '_pid'];
}
}
if (arg(0) == 'photos' && arg(1) == 'data' && is_numeric(arg(3))) {
return arg(3);
}
}
}