require_once('include/threads.php');
require_once('include/Probe.php');
-function photos_init(&$a) {
+function photos_init(App $a) {
if ($a->argc > 1)
auto_redir($a, $a->argv[1]);
-function photos_post(&$a) {
+function photos_post(App $a) {
logger('mod-photos: photos_post: begin' , LOGGER_DEBUG);
return; // NOTREACHED
}
- $r = qu("SELECT count(*) FROM `photo` WHERE `album` = '%s' AND `uid` = %d",
+ $r = qu("SELECT `album` FROM `photo` WHERE `album` = '%s' AND `uid` = %d",
dbesc($album),
intval($page_owner_uid)
);
- if (! dbm::is_result($r)) {
+ if (!dbm::is_result($r)) {
notice( t('Album not found.') . EOL);
goaway($_SESSION['photo_return']);
return; // NOTREACHED
dbesc($r[0]['resource-id']),
intval($page_owner_uid)
);
- if (count($i)) {
+ if (dbm::is_result($i)) {
q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d",
dbesc(datetime_convert()),
dbesc(datetime_convert()),
-function photos_content(&$a) {
+function photos_content(App $a) {
// URLs:
// photos/name
}
- /**
+ /**
* Display one photo
*/