Diff of /mambo/branches/4.6/includes/core.classes.php
Parent Directory
|
Revision Log
|
Patch
| revision 1698, Wed May 14 03:20:54 2008 UTC | revision 1699, Wed May 14 11:32:45 2008 UTC | |
|---|---|---|
| # | Line 1456 | Line 1456 |
| 1456 | return null; | return null; |
| 1457 | } | } |
| 1458 | ||
| 1459 | function getSectionItemId($sectionid, $gbs = 1){ | |
| 1460 | static $__sectionsItemds; | |
| 1461 | ||
| 1462 | if (isset($__sectionsItemids[$sectionid])) return $__sectionsItemids[$sectionid]; | |
| 1463 | ||
| 1464 | $_Itemid = null; | |
| 1465 | if ($_Itemid == null ) { | |
| 1466 | // Search in sections | |
| 1467 | $_Itemid = $this->getIDByTypeCid ('content_section', $sectionid); | |
| 1468 | } | |
| 1469 | if ($_Itemid == null ) { | |
| 1470 | // Search in sections | |
| 1471 | $_Itemid = $this->getIDByTypeCid ('content_blog_section', $sectionid); | |
| 1472 | } | |
| 1473 | ||
| 1474 | if ($_Itemid == null && $gbs) { | |
| 1475 | // Search in global blog section | |
| 1476 | $_Itemid = $this->getIDByTypeCid('content_blog_section', 0); | |
| 1477 | } | |
| 1478 | if ($_Itemid != null) $__sectionsItemids[$sectionid] = $_Itemid; | |
| 1479 | return $_Itemid; | |
| 1480 | } | |
| 1481 | ||
| 1482 | function getCategoryItemId($catid){ | |
| 1483 | static $__categoriesItemids; | |
| 1484 | ||
| 1485 | if (isset($__categoriesItemids[$catid])) return $__categoriesItemids[$catid]; | |
| 1486 | ||
| 1487 | $_Itemid = null; | |
| 1488 | if ($_Itemid == null) { | |
| 1489 | // Search in blog categories | |
| 1490 | $_Itemid = $this->getIDByTypeCid ('content_blog_category', $catid); | |
| 1491 | } | |
| 1492 | if ($_Itemid == null) { | |
| 1493 | // Search in categories | |
| 1494 | $_Itemid = $this->getIDByTypeCid ('content_category', $catid); | |
| 1495 | } | |
| 1496 | ||
| 1497 | if ($_Itemid != null) $__categoriesItemids[$catid] = $_Itemid; | |
| 1498 | ||
| 1499 | return $_Itemid; | |
| 1500 | } | |
| 1501 | ||
| 1502 | /** | /** |
| 1503 | * Enter description here... | * Enter description here... |
| 1504 | * | * |
|
||||||||
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

