function perform()
 {
     if (!isset($_REQUEST['path'])) {
         return new response(RESPONSE_STATUS_DONT_TRACK);
     }
     if (!($node = map_url_to_node($_REQUEST['path']))) {
         return new response(RESPONSE_STATUS_DONT_TRACK);
     }
     if (!($object = fetch_one_by_node_id($node['id']))) {
         return new response(RESPONSE_STATUS_DONT_TRACK);
     }
     $dataspace =& $this->view->find_child('parent_node_data');
     $dataspace->import($object);
     return new response(RESPONSE_STATUS_DONT_TRACK);
 }
 function perform(&$request, &$response)
 {
     $request->set_status(REQUEST_STATUS_DONT_TRACK);
     if (!($path = $request->get_attribute('path'))) {
         return;
     }
     if (!($node = map_url_to_node($path))) {
         return;
     }
     if (!($object = fetch_one_by_node_id($node['id']))) {
         return;
     }
     session::set('limb_node_select_working_path', $path);
     $dataspace =& $this->view->find_child('parent_node_data');
     $dataspace->import($object);
 }
 function _process_path()
 {
     $default_path = '/root/';
     $request = request::instance();
     if (!($path = $request->get_attribute('path'))) {
         return $default_path;
     }
     if (strpos($path, '?') !== false) {
         if (!($node = map_url_to_node($path))) {
             return $default_path;
         }
         $tree =& tree::instance();
         if (!($path = $tree->get_path_to_node($node))) {
             return $default_path;
         }
     }
     return $path;
 }
 function _process_path()
 {
     $default_path = '/root/';
     if (!isset($_REQUEST['path'])) {
         return $default_path;
     } else {
         $path = $_REQUEST['path'];
     }
     if (strpos($path, '?') !== false) {
         if (!($node = map_url_to_node($path))) {
             return $default_path;
         }
         $tree =& tree::instance();
         if (!($path = $tree->get_path_to_node($node))) {
             return $default_path;
         }
     }
     return $path;
 }
 function get_node_id()
 {
     if (!$this->node_id) {
         if ($this->node_path) {
             if (!($node = map_url_to_node($this->node_path))) {
                 $node = map_current_request_to_node();
             }
         } else {
             $node = map_current_request_to_node();
         }
         $this->node_id = $node['id'];
     }
     return $this->node_id;
 }
Example #6
0
require_once LIMB_DIR . 'core/lib/db/db_table_factory.class.php';
require_once LIMB_DIR . 'core/lib/error/error.inc.php';
require_once LIMB_DIR . 'core/lib/security/user.class.php';
require_once LIMB_DIR . 'core/lib/locale/strings.class.php';
require_once LIMB_DIR . 'core/lib/http/control_flow.inc.php';
require_once LIMB_DIR . 'core/tree/limb_tree.class.php';
require_once LIMB_DIR . 'core/fetcher.class.php';
require_once LIMB_DIR . 'core/model/stats/stats_register.class.php';
require_once LIMB_DIR . 'core/model/shop/cart.class.php';
start_user_session();
debug::add_timing_point('require_done');
$recursive = false;
if (isset($_REQUEST['recursive_search_for_node']) && $_REQUEST['recursive_search_for_node']) {
    $recursive = true;
}
$node =& map_url_to_node('', $recursive);
if (!$node) {
    debug::write_error('node not found', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
    ob_end_clean();
    if (debug::is_console_enabled()) {
        echo debug::parse_html_console();
    }
    header("HTTP/1.1 404 Not found");
    exit;
}
if (isset($node['only_parent_found']) && $node['only_parent_found']) {
    if (isset($_REQUEST['action'])) {
        //only action significant when reload to found parent
        $params = '?action=' . $_REQUEST['action'];
    }
    $tree = limb_tree::instance();
  function get_node_id()
  {
    if (!$this->node_id)
    {
      if($this->request_path)
      {
        $request = request :: instance();
        $node_path = $request->get_attribute($this->request_path);

        if(!$node = map_url_to_node($node_path))
          $node = map_request_to_node();
      }
      else
        $node = map_request_to_node();

      $this->node_id = $node['id'];
    }

    return $this->node_id;
  }
Example #8
0
ob_start('process_output');
debug::add_timing_point('start');
require_once LIMB_DIR . 'core/lib/mail/send_plain_mail.php';
require_once LIMB_DIR . 'core/lib/http/http_request.inc.php';
require_once LIMB_DIR . 'core/lib/session/session.class.php';
require_once LIMB_DIR . 'core/lib/system/message_box.class.php';
require_once LIMB_DIR . 'core/lib/db/db_table_factory.class.php';
require_once LIMB_DIR . 'core/lib/error/error.inc.php';
require_once LIMB_DIR . 'core/lib/security/user.class.php';
require_once LIMB_DIR . 'core/lib/locale/strings.class.php';
require_once LIMB_DIR . 'core/lib/http/control_flow.inc.php';
require_once LIMB_DIR . 'core/tree/limb_tree.class.php';
require_once LIMB_DIR . 'core/fetcher.class.php';
start_user_session();
debug::add_timing_point('require_done');
$node =& map_url_to_node();
if (!$node) {
    debug::write_error('node not found', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
    ob_end_clean();
    if (debug::is_console_enabled()) {
        echo debug::parse_html_console();
    }
    if (defined("ERROR_DOCUMENT_404") && !isset($_GET['node_id'])) {
        reload(ERROR_DOCUMENT_404);
    } else {
        header("HTTP/1.1 404 Not found");
    }
    exit;
}
if (!($object_data =& fetch_one_by_node_id($node['id']))) {
    debug::write_error('content object not allowed or retrieved', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
 function get_node_id()
 {
     if (!$this->node_id) {
         $node = map_url_to_node();
         $this->node_id = $node['id'];
     }
     return $this->node_id;
 }