Revision 296 (by ahitrov, 2013/03/26 17:59:01) Promosite (anthill) project source
<%args>

	$prj	=> undef

</%args>
<%init>

  return	unless $prj;
  my ($section) = $keeper->get_sections (
		class	=> 'promosuite::ProjectSection',
		status	=> 1,
		alias	=> $prj,
		limit	=> 1,
	);
  unless (ref $section) {
	warn "Секция проекта не найдена\n"		if $DEBUG;
	return;
  }

  my ($profile) = $keeper->get_documents (
		s	=> $section->id,
		class	=> 'promosuite::Project',
		status	=> 1,
		limit	=> 1,
	);
  unless (ref $profile) {
	warn "Не найден профиль проекта\n"		if $DEBUG;
	return;
  }

  $request->{project} = $prj;
  $request->{project_section} = $section;
  $request->{project_profile} = $profile;
  return 1;

</%init>