// once daily run birthday_updates and then expire in background
$d1 = get_config('system', 'last_expire_day');
- $d2 = intval(datetime_convert('UTC','UTC','now','d'));
+ $d2 = intval(datetime_convert('UTC', 'UTC', 'now', 'd'));
if ($d2 != intval($d1)) {
*/
$dlink = normalise_link(App::get_baseurl() . '/u/' . $u[0]['nickname']);
- $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism', $item['body'], $matches,PREG_SET_ORDER);
+ $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism', $item['body'], $matches, PREG_SET_ORDER);
if ($cnt) {
foreach ($matches as $mtch) {
if (link_compare($link, $mtch[1]) || link_compare($dlink, $mtch[1])) {
*/
$dlink = normalise_link(App::get_baseurl() . '/u/' . $u[0]['nickname']);
- $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism', $item['body'], $matches,PREG_SET_ORDER);
+ $cnt = preg_match_all('/[\@\!]\[url\=(.*?)\](.*?)\[\/url\]/ism', $item['body'], $matches, PREG_SET_ORDER);
if ($cnt) {
foreach ($matches as $mtch) {
if (link_compare($link, $mtch[1]) || link_compare($dlink, $mtch[1])) {
$x = strpos($i, '-');
if ($x) {
- $res = substr($i, $x+1);
- $i = substr($i,0, $x);
+ $res = substr($i, $x + 1);
+ $i = substr($i, 0, $x);
$r = q("SELECT * FROM `photo` WHERE `resource-id` = '%s' AND `scale` = %d AND `uid` = %d",
dbesc($i),
intval($res),
// clean up categories and tags so they don't end up as orphans
$matches = false;
- $cnt = preg_match_all('/<(.*?)>/', $item['file'], $matches,PREG_SET_ORDER);
+ $cnt = preg_match_all('/<(.*?)>/', $item['file'], $matches, PREG_SET_ORDER);
if ($cnt) {
foreach ($matches as $mtch) {
file_tag_unsave_file($item['uid'], $item['id'], $mtch[1],true);
$matches = false;
- $cnt = preg_match_all('/\[(.*?)\]/', $item['file'], $matches,PREG_SET_ORDER);
+ $cnt = preg_match_all('/\[(.*?)\]/', $item['file'], $matches, PREG_SET_ORDER);
if ($cnt) {
foreach ($matches as $mtch) {
file_tag_unsave_file($item['uid'], $item['id'], $mtch[1],false);