| 1425 | | /** |
| 1426 | | * Are nodes allowed to redirect users to the original requested web page instead of |
| 1427 | | * the portal? |
| 1428 | | * |
| 1429 | | * @return bool True or false |
| 1430 | | * |
| 1431 | | * @access public |
| 1432 | | */ |
| 1433 | | public function getPortalOriginalUrlAllowed() |
| 1434 | | { |
| 1435 | | return (($this->_row['allow_original_url_redirect'] == 't') ? true : false); |
| 1436 | | } |
| 1437 | | |
| 1438 | | /** |
| 1439 | | * Set if nodes are allowed to redirect users to the original requested web page |
| 1440 | | * instead of the portal? |
| 1441 | | * |
| 1442 | | * @param bool $value The new value, true or false |
| 1443 | | * |
| 1444 | | * @return bool True on success, false on failure |
| 1445 | | * |
| 1446 | | * @access public |
| 1447 | | */ |
| 1448 | | public function setPortalOriginalUrlAllowed($value) |
| 1449 | | { |
| 1450 | | // Init values |
| 1451 | | $retval = true; |
| 1452 | | |
| 1453 | | if ($value != $this->getPortalOriginalUrlAllowed()) { |
| 1454 | | $db = AbstractDb::getObject(); |
| 1455 | | $value ? $value = 'TRUE' : $value = 'FALSE'; |
| 1456 | | $retval = $db->execSqlUpdate("UPDATE networks SET allow_original_url_redirect = {$value} WHERE network_id = '{$this->getId()}'", false); |
| 1457 | | $this->refresh(); |
| 1458 | | } |
| 1459 | | |
| 1460 | | return $retval; |
| 1461 | | } |
| | 1430 | /** |
| | 1431 | * Are nodes allowed to redirect users to the original requested web page instead of |
| | 1432 | * the portal? |
| | 1433 | * |
| | 1434 | * @return bool True or false |
| | 1435 | * |
| | 1436 | * @access public |
| | 1437 | */ |
| | 1438 | public function getPortalOriginalUrlAllowed() |
| | 1439 | { |
| | 1440 | return (($this->_row['allow_original_url_redirect'] == 't') ? true : false); |
| | 1441 | } |
| | 1442 | |
| | 1443 | /** |
| | 1444 | * Set if nodes are allowed to redirect users to the original requested web page |
| | 1445 | * instead of the portal? |
| | 1446 | * |
| | 1447 | * @param bool $value The new value, true or false |
| | 1448 | * |
| | 1449 | * @return bool True on success, false on failure |
| | 1450 | * |
| | 1451 | * @access public |
| | 1452 | */ |
| | 1453 | public function setPortalOriginalUrlAllowed($value) |
| | 1454 | { |
| | 1455 | // Init values |
| | 1456 | $retval = true; |
| | 1457 | |
| | 1458 | if ($value != $this->getPortalOriginalUrlAllowed()) { |
| | 1459 | $db = AbstractDb::getObject(); |
| | 1460 | $value ? $value = 'TRUE' : $value = 'FALSE'; |
| | 1461 | $retval = $db->execSqlUpdate("UPDATE networks SET allow_original_url_redirect = {$value} WHERE network_id = '{$this->getId()}'", false); |
| | 1462 | $this->refresh(); |
| | 1463 | } |
| | 1464 | |
| | 1465 | return $retval; |
| | 1466 | } |