function _photos_order_value_change in Album Photos 7.3
Same name and namespace in other branches
- 6.2 photos.module \_photos_order_value_change()
Extends photos order value.
8 calls to _photos_order_value_change()
- photos_album_page in inc/
photos.album.inc - Album view.
- photos_data_album in inc/
photos.data.inc - Album slideshow data.
- photos_image_pager in ./
photos.module - Photos image view pager block.
- photos_page_image in inc/
photos.page.inc - Latest images page.
- photos_share in inc/
photos.page.inc - Share photos.
File
- ./
photos.module, line 2390 - Implementation of photos.module.
Code
function _photos_order_value_change($field, $sort) {
$array = array(
'weight' => 'p.wid',
'timestamp' => 'f.fid',
'comments' => 'p.comcount',
'visits' => 'p.count',
'filesize' => 'f.filesize',
);
$array1 = array(
'desc' => 'desc',
'asc' => 'asc',
);
if (isset($array[$field]) && isset($array1[$sort])) {
return array(
'column' => $array[$field],
'sort' => $array1[$sort],
);
}
}