Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -303,9 +303,15 @@ class _Photopost extends \IPS\convert\Software
|
||||
|
||||
if( mb_strpos( $url->data[ \IPS\Http\Url::COMPONENT_PATH ], 'showgallery.php' ) !== FALSE )
|
||||
{
|
||||
if( !$id = \IPS\Request::i()->cat )
|
||||
{
|
||||
preg_match( '#cat/([0-9]+)#', $url->data[ \IPS\Http\Url::COMPONENT_PATH ], $matches );
|
||||
$id = isset( $matches[1] ) ? $matches[1] : NULL;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$data = (string) $this->app->getLink( \IPS\Request::i()->cat, 'gallery_categories' );
|
||||
$data = (string) $this->app->getLink( $id, 'gallery_categories' );
|
||||
$item = \IPS\gallery\Category::load( $data );
|
||||
|
||||
if( $item->can('view') )
|
||||
@@ -320,9 +326,15 @@ class _Photopost extends \IPS\convert\Software
|
||||
}
|
||||
elseif( mb_strpos( $url->data[ \IPS\Http\Url::COMPONENT_PATH ], 'showphoto.php' ) !== FALSE )
|
||||
{
|
||||
if( !$id = \IPS\Request::i()->photo )
|
||||
{
|
||||
preg_match( '#photo/([0-9]+)#', $url->data[ \IPS\Http\Url::COMPONENT_PATH ], $matches );
|
||||
$id = isset( $matches[1] ) ? $matches[1] : NULL;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$data = (string) $this->app->getLink( \IPS\Request::i()->photo, 'gallery_images' );
|
||||
$data = (string) $this->app->getLink( $id, 'gallery_images' );
|
||||
$item = \IPS\gallery\Image::load( $data );
|
||||
|
||||
if( $item->canView() )
|
||||
|
||||
Reference in new issue
Block a user