| 1 |
<?php |
<?php |
| 2 |
|
/** |
| 3 |
|
* @package Mambo Open Source |
| 4 |
|
* @copyright (C) 2005 - 2006 Mambo Foundation Inc. |
| 5 |
|
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL |
| 6 |
|
* |
| 7 |
|
* Mambo was originally developed by Miro (www.miro.com.au) in 2000. Miro assigned the copyright in Mambo to The Mambo Foundation in 2005 to ensure |
| 8 |
|
* that Mambo remained free Open Source software owned and managed by the community. |
| 9 |
|
* Mambo is Free Software |
| 10 |
|
*/ |
| 11 |
|
|
| 12 |
/** |
/** |
| 13 |
* Mambo basic error object |
* Mambo basic error object |
| 323 |
$f = @fopen($this->rootPath.'/configuration.php','rb'); |
$f = @fopen($this->rootPath.'/configuration.php','rb'); |
| 324 |
if ($f) { |
if ($f) { |
| 325 |
while ($f AND !feof($f)) { |
while ($f AND !feof($f)) { |
| 326 |
$line = fgets($f, 256); |
$line = fgets($f); |
| 327 |
$altered = str_replace('$', '$this->', $line); |
$altered = str_replace('$', '$this->', $line); |
| 328 |
if ($altered != $line) $code .= $altered; |
if ($altered != $line) $code .= $altered; |
| 329 |
} |
} |
| 487 |
if ($pos !== false) $link = substr( $link, $pos+1 ). '&Itemid='.$this->Itemid; |
if ($pos !== false) $link = substr( $link, $pos+1 ). '&Itemid='.$this->Itemid; |
| 488 |
parse_str( $link, $temp ); |
parse_str( $link, $temp ); |
| 489 |
/** this is a patch, need to rework when globals are handled better */ |
/** this is a patch, need to rework when globals are handled better */ |
| 490 |
foreach ($temp as $k=>$v) $_GET[$k] = $v; |
foreach ($temp as $k=>$v) $_GET[$k] = $_REQUEST[$k] = $v; |
| 491 |
if (isset($temp['option'])) $option = $temp['option']; |
if (isset($temp['option'])) $option = $temp['option']; |
| 492 |
else return ''; |
else return ''; |
| 493 |
} |
} |
| 811 |
* Make a pathway string for display |
* Make a pathway string for display |
| 812 |
*/ |
*/ |
| 813 |
function makePathway () { |
function makePathway () { |
|
$last = count($this->_names) - 1; |
|
|
if ($last == 0) return ''; |
|
| 814 |
$mainframe =& mosMainFrame::getInstance(); |
$mainframe =& mosMainFrame::getInstance(); |
| 815 |
|
$customs = $mainframe->getCustomPathWay(); |
| 816 |
|
$last = count($this->_names) - 1; |
| 817 |
|
if ($last == 0 AND count($customs == 0)) return ''; |
| 818 |
$result = "<span class='pathway'>"; |
$result = "<span class='pathway'>"; |
| 819 |
$config =& mamboCore::getMamboCore(); |
$config =& mamboCore::getMamboCore(); |
| 820 |
$rootpath = $config->rootPath(); |
$rootpath = $config->rootPath(); |
| 826 |
else $img = '>'; |
else $img = '>'; |
| 827 |
} |
} |
| 828 |
foreach ($this->_names as $i=>$name) { |
foreach ($this->_names as $i=>$name) { |
| 829 |
if ($i === $last) $result .= "$name"; |
if ($i === $last AND count($customs) == 0) $result .= "$name</span>"; |
| 830 |
|
elseif (strstr($this->_urls[$i], 'view')) $result .= ""; |
| 831 |
else { |
else { |
| 832 |
$sefurl = sefRelToAbs($this->_urls[$i]); |
$sefurl = sefRelToAbs($this->_urls[$i]); |
| 833 |
$result .= "<a href='$sefurl' class='pathway'>$name</a>"; |
$result .= "<a href='$sefurl' class='pathway'>$name</a>"; |
| 834 |
$result .= " $img "; |
$result .= " $img "; |
| 835 |
} |
} |
| 836 |
} |
} |
|
$customs = $mainframe->getCustomPathWay(); |
|
| 837 |
foreach ($customs as $custom) $result .= $custom; |
foreach ($customs as $custom) $result .= $custom; |
| 838 |
$result .= '</span>'; |
if (count($customs)) $result .= '</span>'; |
| 839 |
return $result; |
return $result; |
| 840 |
} |
} |
| 841 |
|
|
| 1874 |
$selected = $newbot->register(); |
$selected = $newbot->register(); |
| 1875 |
$this->_botRegister($newbot, $selected, $i); |
$this->_botRegister($newbot, $selected, $i); |
| 1876 |
} |
} |
| 1877 |
|
unset($newbot); |
| 1878 |
} |
} |
| 1879 |
} |
} |
| 1880 |
$total++; |
$total++; |
| 2535 |
|
|
| 2536 |
function liveBookMark () { |
function liveBookMark () { |
| 2537 |
// support for Firefox Live Bookmarks ability for site syndication |
// support for Firefox Live Bookmarks ability for site syndication |
| 2538 |
|
$live_bookmark = 0; |
| 2539 |
$c_handler =& mosComponentHandler::getInstance(); |
$c_handler =& mosComponentHandler::getInstance(); |
| 2540 |
$params = $c_handler->getParamsByName('Syndicate'); |
$params =& $c_handler->getParamsByName('Syndicate'); |
| 2541 |
|
if (!is_null($params)){ |
| 2542 |
$live_bookmark = $params->get( 'live_bookmark', 0 ); |
$live_bookmark = $params->get( 'live_bookmark', 0 ); |
| 2543 |
|
} |
| 2544 |
|
|
| 2545 |
if ($live_bookmark) { |
if ($live_bookmark) { |
| 2546 |
// custom bookmark file name |
// custom bookmark file name |
| 2547 |
$bookmark_file = $params->get( 'bookmark_file', $live_bookmark ); |
$bookmark_file = $params->get( 'bookmark_file', $live_bookmark ); |