Apache-PageKit

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

	- Fix: Parse Accept-Charsets more pettier ( Boris Zentner )
	! If the client browser has no accept charset header or no good one,
		deliver in the default_output_charset and set the charset
		in the content_type header. ( Erik Günther )
	- Fix uri_prefix in conjunction with can_edit
		( Boris Zentner, Erik Günther ) 
1.13
	- Add scripts/pkit_rename_app.pl it helps to start new applications
                fast ( Boris Zentner )
	- Add <PKIT_COMMENT> and </PKIT_COMMENT> tags. ( Boris Zentner )
	- Fix filetest for upload_tmp_dir ( Boris Zentner )
	- Fix locale support. One message was twice in the .po files.
		( Boris Zentner )
	- Fix Encoding of Apache::PageKit::Edit. Use HTML::Entities
		and encode only '<>&"' ( Boris Zentner )	
	- Fix encoding of Apache::ErrorReport stacktrace
		( Boris Zentner, Paul Flinders )
1.12
	- PageKit now install the right version for the installed perl.
		This requires the patch command if you use perl 5.8.x.
		( Boris Zentner )

Changes  view on Meta::CPAN

		handle page_id's with parameters (Boris Zentner)
	- Fix: Cache handling on the client side more restrictive
		(Boris Zentner)
	- Fixed bug in params_as_string when value is 0 ( TJ Mather )
	- Improved error message when template not found
		and XML::LibXSLT not installed ( TJ Mather )
	- Fix: Expansion of multivalued parameters for HTML::Template
		( Paul G. Weiss )
	- FIX: Typo in HAVE_NOT_MESSAGES close tag.
		( Boris Zentner )
	- Add new option upload_tmp_dir
		see Apache::Request TEMP_DIR ( Ben Ausden )
	- Large speedup for all static pages ( Boris Zentner )
	- Add docs for the ignore_fillinform_fields methode
		(Boris Zentner)
	- Fix: remove again 0xa0 chars from FAQ.pod
		(Boris Zentner)
1.11
	- Fix early delivery of static pages (Paul G. Weiss)
	- Add Apache::PageKit::FAQ (Boris Zentner)
	- Fix: Search attributes for a page in the sections

Changes  view on Meta::CPAN

		my $class_object = $model->pkit_create(class)
		$class_object->method(params);
	- authentication code no longer sets $model->input_param('pkit_user')
		and $model->output_param('pkit_user')
	- Fixed warning messages if $^W is turned on
	- Now requires classes if they are not already loaded.  (Boris Zentner)
	- Fixed bug when calling pkit_get_orig_uri from pkit_get_default_page
	- Fixed bug when page_id is not found.
	- Now matches </PKIT_COMPONENT>, </PKIT_VAR>, </MODEL_VAR> tags
		generated by XSLT
	- Fixed bug in View.pm for checking for new uploads to $pkit_view
		directory.
	- Fixed bug in XML::XPathTemplate where queries were converted
		to lowercase. (Boris Zentner)

0.98	Mon May  7 14:37:08 2001 EST
	- Added support for XML::LibXSLT - can now generate
                pages from XML and XSL stylesheets
	- Separated out XML Template code in new module,
		XML::XPathTemplate
	- update last_activity in session for every hit -

docsrc/reference.xml  view on Meta::CPAN

      <para>
      Name for the Module, that is used to create the page_session objects.
      Defaults to <emphasis>Apache::SessionX</emphasis>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry id="config.global.post_max">
     <term>post_max</term>
     <listitem>
      <para>
Maximum size of file uploads, in bytes.  Defaults to 100,000,000 (100 MB).
      </para>
     </listitem>
    </varlistentry>
    <varlistentry id="config.global.upload_tmp_dir">
     <term>upload_tmp_dir</term>
     <listitem>
      <para>
Temporary directory for file uploads. Defaults to whatever libapreq finds usefull. 
This options is only usefull if you use libapreq &gt;= 1.0. The temporary directory
usually needs to reside on the same filesystem as the location supplied to the 
upload object's <programlisting>link</programlisting> method. See the Apache::Request 
documentation for further information.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry id="config.global.protect_static">
     <term>protect_static</term>
     <listitem>
      <para>
      If set to <emphasis>yes</emphasis> static files can also be protected with the
      require_login attribute in the SECTION or PAGE tags.

lib/Apache/PageKit.pm  view on Meta::CPAN


  my $config_dir = $pkit_root . '/Config';

  my $config = Apache::PageKit::Config->new(config_dir => $config_dir,
					    server => $server);
  $config->parse_xml;

  die "No config data for your server '$server' maybe you mistyped something?"
    unless exists $Apache::PageKit::Config::server_attr->{$config_dir}->{$server};
    
  my $upload_tmp_dir = $config->get_global_attr('upload_tmp_dir');
  if ( $upload_tmp_dir && !-d $upload_tmp_dir ) {
    die "your upload_tmp_dir ($upload_tmp_dir) did not exists";
  }

  my $cache_dir = $config->get_global_attr('cache_dir');
  my $view_cache_dir = $cache_dir ? $cache_dir . '/pkit_cache' :
    $pkit_root . '/View/pkit_cache';

  unless(-e "$view_cache_dir"){
    mkdir $view_cache_dir, 0755;
  }

lib/Apache/PageKit.pm  view on Meta::CPAN

  my $pkit_root = $r->dir_config('PKIT_ROOT');
  die "Must specify PerlSetVar PKIT_ROOT in httpd.conf file" unless $pkit_root;
  my $config_dir = $pkit_root . '/Config';
  my $content_dir = $pkit_root . '/Content';
  my $view_dir = $pkit_root . '/View';
  my $server = $r->dir_config('PKIT_SERVER');
  die "Must specify PerlSetVar PKIT_SERVER in httpd.conf file" unless $server;
  my $config = $self->{config} = Apache::PageKit::Config->new(config_dir => $config_dir,
                                                              server => $server);
  my $post_max = $self->{config}->get_global_attr('post_max') || 100_000_000;
  my $upload_tmp_dir = $self->{config}->get_global_attr('upload_tmp_dir');

  # the TEMP_DIR option is only avail since version 1.0 of libapreq
  # so we set it only on request.
  my @apr_params = ();
  push @apr_params, TEMP_DIR => $upload_tmp_dir if $upload_tmp_dir;
  my $request_class = $self->{config}->get_global_attr('request_class') || "Apache::Request::PageKit";
  my $apr = $self->{apr} = $request_class->new($r, POST_MAX => $post_max, @apr_params);
  my $model_base_class = $self->{config}->get_global_attr('model_base_class') || "MyPageKit::Common";

  $self->_check_gzip;
  
  my $model;
  eval {$model = $self->{model} = $model_base_class->new(pkit_pk => $self)};
  if($@){
    unless($model_base_class){

lib/Apache/PageKit/FAQ.pod  view on Meta::CPAN

  template_class = "HTML::Template::Expr"

For more information type perldoc HTML::Template::Expr.

=head2 5.2 I'm using loop_context_vars as descriped in the HTML::Template manual within my <CONTENT_(IF|UNLESS)> tags, but it did not work.

As an undocumented feature of HTML::Template, loop_context_vars B<must> be written in lowercase if
your template is case_sensitive. <CONTENT_...> is case sensitive. So change
__FIRST__, __LAST__, __INNER__, __ODD__ to  __first__, __last__, __inner__, __odd__.

=head2 5.3 How do I deal with uploads?

If you call C<< $model->apr->upload; >> Then this will return a single
Apache::Upload object in a scalar context or all Apache::Upload
objects in an array context. This is because C<< $model->apr >>
returns a Apache::Request object.

=head2 5.4 My Database busted after some time - What is wrong?

You did not use Apache::DBI. Load (use) Apache::DBI in your startup.pl
file. If for some reason the use of Apache::DBI is not possible,
close the connection in the pkit_cleanup methode.

lib/Apache/PageKit/View.pm  view on Meta::CPAN

    }

    # check if file is up to date
    my $file_mtime = (stat($filename))[9];
#    print "hi $filename - $cache_mtime - $file_mtime<br>";
    if($file_mtime != $cache_mtime){
      return 0;
    }

    if($filename =~ m!^$view->{view_dir}/Default/! && $pkit_view ne 'Default'){
      # check to see if any new files have been uploaded to the $pkit_view dir
      (my $check_filename = $filename) =~ s!^$view->{view_dir}/Default/!$view->{view_dir}/$pkit_view/!;
      if (-f "$check_filename"){
	return 0;
      }
    }
  }

  # record up to date!
  return 1;
}



( run in 1.330 second using v1.01-cache-2.11-cpan-b16cb0d3907 )