1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 22:27:34 +02:00

Close #75: Automated SEF string creation type not functioning on

Gallery category URLs
This commit is contained in:
SecretR
2013-01-16 12:51:03 +02:00
parent a157c0f3f9
commit fbc8386193
2 changed files with 5 additions and 2 deletions

View File

@@ -159,7 +159,7 @@ class media_cat_ui extends e_admin_ui
'media_cat_type' => array('title'=> LAN_TYPE, 'type' => 'radio', 'data'=>false, 'width' => 'auto', 'thclass' => 'left', 'validate' => true, 'nolist'=>true), 'media_cat_type' => array('title'=> LAN_TYPE, 'type' => 'radio', 'data'=>false, 'width' => 'auto', 'thclass' => 'left', 'validate' => true, 'nolist'=>true),
'media_cat_category' => array('title'=> LAN_CATEGORY, 'type' => 'text', 'data'=>'str', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>TRUE), 'media_cat_category' => array('title'=> LAN_CATEGORY, 'type' => 'text', 'data'=>'str', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>TRUE),
'media_cat_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE), 'media_cat_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE, 'required' => true),
'media_cat_sef' => array('title'=> LAN_SEFURL, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE), 'media_cat_sef' => array('title'=> LAN_SEFURL, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE),
'media_cat_diz' => array('title'=> LAN_DESCRIPTION, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=150&bb=1','readonly'=>FALSE), // Display name 'media_cat_diz' => array('title'=> LAN_DESCRIPTION, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=150&bb=1','readonly'=>FALSE), // Display name
'media_cat_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'width' => 'auto', 'data' => 'int'), 'media_cat_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'width' => 'auto', 'data' => 'int'),
@@ -217,6 +217,7 @@ class media_cat_ui extends e_admin_ui
$type = $this->getRequest()->getPosted('media_cat_type', 'image').'_'; $type = $this->getRequest()->getPosted('media_cat_type', 'image').'_';
$increment = ($this->ownerCount[$new_data['media_cat_owner']] +1); $increment = ($this->ownerCount[$new_data['media_cat_owner']] +1);
if(empty($new_data['media_cat_sef'])) $new_data['media_cat_sef'] = eHelper::title2sef($new_data['media_cat_title']);
$new_data['media_cat_category'] = $new_data['media_cat_owner'].'_'.$type.$increment; $new_data['media_cat_category'] = $new_data['media_cat_owner'].'_'.$type.$increment;
//print_a($new_data); exit; //print_a($new_data); exit;
return $new_data; return $new_data;
@@ -233,6 +234,8 @@ class media_cat_ui extends e_admin_ui
return FALSE; return FALSE;
} }
if(empty($new_data['media_cat_sef'])) $new_data['media_cat_sef'] = eHelper::title2sef($new_data['media_cat_title']);
return $new_data; return $new_data;
} }

View File

@@ -4225,7 +4225,7 @@ class eHelper
if(null === $type) if(null === $type)
{ {
$type = e107::getPref('url_sef_translate'); // FIXME - site preference $type = e107::getPref('url_sef_translate');
} }
$tp = e107::getParser(); $tp = e107::getParser();
switch ($type) switch ($type)