11
iliakros
Re: SmartSection category permissions deleted
  • 2009/11/4 12:02

  • iliakros

  • Just popping in

  • Posts: 21

  • Since: 2009/11/3


They are both working

I choose the last one, because it is the smallest modification

le="color: #000000"><?php if ($categoryid = $this->db->getInsertId()) { $category->assignVar('categoryid', $this->db->getInsertId()); } $category->assignVar('categoryid', $categoryid); return true;

12
ghia
Re: SmartSection category permissions deleted
  • 2009/11/4 12:55

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Oops, I was maybe not clear enough by:
Quote:
or the if should set the variable.
le="color: #000000"><?php $categoryid = $this->db->getInsertId();
Was meant to be:
le="color: #000000"><?php if ($category->isNew()) { $categoryid = $this->db->getInsertId(); } $category->assignVar('categoryid', $categoryid); return true;
Your code could run in trouble when altering existing categories.

13
iliakros
Re: SmartSection category permissions deleted
  • 2009/11/4 13:18

  • iliakros

  • Just popping in

  • Posts: 21

  • Since: 2009/11/3


Oh Thanks, I didn't get that

14
Anonymous
Re: SmartSection category permissions deleted
  • 2010/2/4 23:17

  • Anonymous

  • Posts: 0

  • Since: 0


Is it fixed by replace:

$category->assignVar('categoryid', $this->db->getInsertId());

with:

$categoryid = $this->db->getInsertId();

?

15
ghia
Re: SmartSection category permissions deleted
  • 2010/2/5 3:17

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I think so and it seems to have worked for iliakros.

16
Anonymous
Re: SmartSection category permissions deleted
  • 2010/2/5 11:22

  • Anonymous

  • Posts: 0

  • Since: 0


Not working for me.

XOOPS 2.4.4
Smartsection 2.14
PHP 5

I saw modified smartsection based on publisher features here, but can't download it.



17
Anonymous
Re: SmartSection category permissions deleted
  • 2010/2/6 2:30

  • Anonymous

  • Posts: 0

  • Since: 0


ok .. I got modified smartsection by UnderDog and didn't work after conver it from icms to xoops, also publisher module have same permissions bug.

I notice in publisher when import from news module, permissions are saved while importing from smartsection have permissions cleared.

Where permissions values saved in db ?

18
ghia
Re: SmartSection category permissions deleted
  • 2010/2/6 9:14

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


In group_permission.

For smartsection, are sure they were present (and not got deleted)? Because if they are not there, you can not import them either.

19
chefry
Re: SmartSection category permissions deleted
  • 2010/6/20 11:15

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


Mowaffaq,

was that modified smartsection to inport from publisher to smartsection?
or to import from smartsection to publisher?