[interchange-cvs] interchange - heins modified 8 files

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Wed Jun 25 12:39:01 2003


User:      heins
Date:      2003-06-25 16:38:18 GMT
Modified:  code/UI_Tag row_edit.coretag
Modified:  dist/lib/UI Primitive.pm
Modified:  lib/Vend Config.pm Data.pm File.pm Search.pm Util.pm
Modified:  scripts  interchange.PL
Log:
Various minor cleanup, prevents warnings on startup.

  * Remove extra meta_record routine and change references to
    UI::Primitive::meta_record to Vend::Table::Editor::meta_record.

  * Delete {Source} value from $Vend::Cfg to save memory.

  * Remove unused stub Vend::Data::dbref.

  * Change Vend::Util::dbref to be a simple pointer to
    Vend::Data::database_exists_ref. Remove extra "my $loc".

  * Remove improperly exported parse_locale routine from Vend::Util.
    (Another parse_locale in Vend::Config, and all calls in the code
     contain package reference.)

  * Update dont_warn() routine to only include need variables/handles.

  * Remove "prime" of sort routine in Vend::Search no longer necessary
    now that Perl 5.005 is not supported.

Revision  Changes    Path
1.7       +1 -1      interchange/code/UI_Tag/row_edit.coretag


rev 1.7, prev_rev 1.6
Index: row_edit.coretag
===================================================================
RCS file: /var/cvs/interchange/code/UI_Tag/row_edit.coretag,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- row_edit.coretag	4 Jun 2003 12:52:04 -0000	1.6
+++ row_edit.coretag	25 Jun 2003 16:38:17 -0000	1.7
@@ -13,7 +13,7 @@
 	my $mdb = ::database_exists_ref($mtab);
 	$opt->{view} ||= $CGI->{ui_meta_view};
 
-	my $view = UI::Primitive::meta_record($table, $opt->{view}) || {};
+	my $view = Vend::Table::Editor::meta_record($table, $opt->{view}) || {};
 	
 	my $tm_extra = '';
 	my $ta_extra = '';



2.23      +2 -50     interchange/dist/lib/UI/Primitive.pm


rev 2.23, prev_rev 2.22
Index: Primitive.pm
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/Primitive.pm,v
retrieving revision 2.22
retrieving revision 2.23
diff -u -r2.22 -r2.23
--- Primitive.pm	18 Jun 2003 17:34:43 -0000	2.22
+++ Primitive.pm	25 Jun 2003 16:38:17 -0000	2.23
@@ -1,6 +1,6 @@
 # UI::Primitive - Interchange configuration manager primitives
 
-# $Id: Primitive.pm,v 2.22 2003/06/18 17:34:43 jon Exp $
+# $Id: Primitive.pm,v 2.23 2003/06/25 16:38:17 mheins Exp $
 
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1998-2002 Red Hat, Inc.
@@ -27,7 +27,7 @@
 
 package UI::Primitive;
 
-$VERSION = substr(q$Revision: 2.22 $, 10);
+$VERSION = substr(q$Revision: 2.23 $, 10);
 
 $DEBUG = 0;
 
@@ -47,7 +47,6 @@
 		list_glob
 		list_images
 		list_pages
-		meta_record
 		ui_acl_enabled
 		ui_check_acl
 	);
@@ -569,53 +568,6 @@
 		utime $now, $now, $base;
 	}
 	return 1;
-}
-
-
-sub meta_record {
-	my ($item, $view, $mdb) = @_;
-
-#::logDebug("meta_record: item=$item view=$view mdb=$mdb");
-	return undef unless $item;
-
-	if(! ref ($mdb)) {
-		my $mtable = $mdb || $::Variable->{UI_META_TABLE} || 'mv_metadata';
-#::logDebug("meta_record mtable=$mtable");
-		$mdb = Vend::Data::database_exists_ref($mtable)
-		or return undef;
-	}
-#::logDebug("meta_record has an item=$item and mdb=$mdb");
-
-	my $record;
-	if($view) {
-		$record = $mdb->row_hash("${view}::$item");
-	}
-	$record = $mdb->row_hash($item) if ! $record;
-#::logDebug("meta_record  record=$record");
-
-	return undef if ! $record;
-
-	# Get additional settings from extended field, which is a serialized
-	# hash
-	my $hash;
-	if($record->{extended}) {
-		$hash = Vend::Util::get_option_hash($record->{extended});
-		if(ref $hash eq 'HASH') {
-			@$record{keys %$hash} = values %$hash;
-		}
-		else {
-			undef $hash;
-		}
-	}
-
-	# Allow view settings to be placed in the extended area
-	if($view and $hash and $hash->{view}) {
-		my $view_hash = $record->{view}{$view};
-		ref $view_hash
-			and @$record{keys %$view_hash} = values %$view_hash;
-	}
-#::logDebug("return meta_record=" . ::uneval($record) );
-	return $record;
 }
 
 1;



2.119     +6 -2      interchange/lib/Vend/Config.pm


rev 2.119, prev_rev 2.118
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.118
retrieving revision 2.119
diff -u -r2.118 -r2.119
--- Config.pm	18 Jun 2003 17:34:44 -0000	2.118
+++ Config.pm	25 Jun 2003 16:38:17 -0000	2.119
@@ -1,6 +1,6 @@
 # Vend::Config - Configure Interchange
 #
-# $Id: Config.pm,v 2.118 2003/06/18 17:34:44 jon Exp $
+# $Id: Config.pm,v 2.119 2003/06/25 16:38:17 mheins Exp $
 #
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -48,7 +48,7 @@
 use Vend::File;
 use Vend::Data;
 
-$VERSION = substr(q$Revision: 2.118 $, 10);
+$VERSION = substr(q$Revision: 2.119 $, 10);
 
 my %CDname;
 my %CPname;
@@ -1167,6 +1167,8 @@
 
 	dump_structure($c, $g->{name}) if $Global::DumpStructure;
 
+	delete $c->{Source};
+
 	my $stime = scalar localtime();
 	Vend::Util::writefile(">$Global::RunDir/status.$g->{name}", "$stime\n");
 	Vend::Util::writefile(">$c->{ConfDir}/status.$g->{name}", "$stime\n");
@@ -1555,6 +1557,8 @@
 
 	dump_structure($Global::Structure, "$Global::RunDir/$Global::ExeName")
 		if $Global::DumpStructure and ! $Vend::ExternalProgram;
+
+	delete $Global::Structure->{Source};
 
 	%CDname = ();
 	return 1;



2.29      +1 -3      interchange/lib/Vend/Data.pm


rev 2.29, prev_rev 2.28
Index: Data.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Data.pm,v
retrieving revision 2.28
retrieving revision 2.29
diff -u -r2.28 -r2.29
--- Data.pm	18 Jun 2003 17:34:44 -0000	2.28
+++ Data.pm	25 Jun 2003 16:38:17 -0000	2.29
@@ -1,6 +1,6 @@
 # Vend::Data - Interchange databases
 #
-# $Id: Data.pm,v 2.28 2003/06/18 17:34:44 jon Exp $
+# $Id: Data.pm,v 2.29 2003/06/25 16:38:17 mheins Exp $
 # 
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -2316,8 +2316,6 @@
 
 	return;
 }
-
-*dbref = \&database_exists_ref;
 
 1;
 



2.11      +2 -18     interchange/lib/Vend/File.pm


rev 2.11, prev_rev 2.10
Index: File.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/File.pm,v
retrieving revision 2.10
retrieving revision 2.11
diff -u -r2.10 -r2.11
--- File.pm	18 Jun 2003 17:34:44 -0000	2.10
+++ File.pm	25 Jun 2003 16:38:17 -0000	2.11
@@ -1,6 +1,6 @@
 # Vend::File - Interchange file functions
 #
-# $Id: File.pm,v 2.10 2003/06/18 17:34:44 jon Exp $
+# $Id: File.pm,v 2.11 2003/06/25 16:38:17 mheins Exp $
 # 
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -32,7 +32,6 @@
 	absolute_or_relative
 	allowed_file
 	catfile
-	check_security
 	exists_filename
 	file_allow
 	file_modification_time
@@ -54,7 +53,7 @@
 use Vend::Util;
 use subs qw(logError logGlobal);
 use vars qw($VERSION @EXPORT @EXPORT_OK $errstr);
-$VERSION = substr(q$Revision: 2.10 $, 10);
+$VERSION = substr(q$Revision: 2.11 $, 10);
 
 sub writefile {
     my($file, $data, $opt) = @_;
@@ -505,21 +504,6 @@
 #print "file_name_is_absolute a/b/c --> " . file_name_is_absolute('a/b/c') . "\n";
 #print "file_name_is_absolute a:b/c --> " . file_name_is_absolute('a:b/c') . "\n";
 #print "file_name_is_absolute /a/b/c --> " . file_name_is_absolute('/a/b/c') . "\n";
-
-sub check_user_read {
-	my $fn = shift;
-	my $un = $Global::CatalogUser->{$Vend::Cat}
-		or return undef;
-	my ($own, $grown) = (stat($fn))[4,5];
-	return 0 unless defined $own;
-	my $uid = getpwnam($un);
-	return 1 if $uid eq $own;
-	my @members = split /\s+/, (getgrgid($grown))[3];
-	for(@members) {
-		return 1 if $un eq $_;
-	}
-	return 0;
-}
 
 my %intrinsic = (
 	ic_super => sub { return 1 if $Vend::superuser; },



2.18      +2 -3      interchange/lib/Vend/Search.pm


rev 2.18, prev_rev 2.17
Index: Search.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Search.pm,v
retrieving revision 2.17
retrieving revision 2.18
diff -u -r2.17 -r2.18
--- Search.pm	18 Jun 2003 17:34:44 -0000	2.17
+++ Search.pm	25 Jun 2003 16:38:17 -0000	2.18
@@ -1,6 +1,6 @@
 # Vend::Search - Base class for search engines
 #
-# $Id: Search.pm,v 2.17 2003/06/18 17:34:44 jon Exp $
+# $Id: Search.pm,v 2.18 2003/06/25 16:38:17 mheins Exp $
 #
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -22,7 +22,7 @@
 
 package Vend::Search;
 
-$VERSION = substr(q$Revision: 2.17 $, 10);
+$VERSION = substr(q$Revision: 2.18 $, 10);
 
 use strict;
 use vars qw($VERSION);
@@ -1147,7 +1147,6 @@
 	# Prime sort routine
 	use locale;
 	local($^W);
-	sort { $routine } ('30','31') or 1;
 
 	@$target = sort { &$routine } @$target;
 #::logDebug("target is $target: " . Vend::Util::uneval_it($target));



2.60      +3 -7      interchange/lib/Vend/Util.pm


rev 2.60, prev_rev 2.59
Index: Util.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Util.pm,v
retrieving revision 2.59
retrieving revision 2.60
diff -u -r2.59 -r2.60
--- Util.pm	18 Jun 2003 17:34:44 -0000	2.59
+++ Util.pm	25 Jun 2003 16:38:17 -0000	2.60
@@ -1,6 +1,6 @@
 # Vend::Util - Interchange utility functions
 #
-# $Id: Util.pm,v 2.59 2003/06/18 17:34:44 jon Exp $
+# $Id: Util.pm,v 2.60 2003/06/25 16:38:17 mheins Exp $
 # 
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -58,7 +58,6 @@
 	logGlobal
 	logOnce
 	logtime
-	parse_locale
 	random_string
 	readfile
 	readin
@@ -88,7 +87,7 @@
 use Vend::File;
 use subs qw(logError logGlobal);
 use vars qw($VERSION @EXPORT @EXPORT_OK);
-$VERSION = substr(q$Revision: 2.59 $, 10);
+$VERSION = substr(q$Revision: 2.60 $, 10);
 
 my $Eval_routine;
 my $Eval_routine_file;
@@ -115,9 +114,7 @@
 	;
 
 ## This is an alias for a commonly-used function
-sub dbref {
-	return Vend::Data::database_exists_ref(@_);
-}
+*dbref = \&Vend::Data::database_exists_ref;
 
 ## This is a character class for HTML::Entities
 $ESCAPE_CHARS::std = "^\n\t !\#\$%\'-;=?-Z\\\]-~";
@@ -470,7 +467,6 @@
 	}
 
 	return $amount if $noformat;
-	my $loc;
 	my $sep;
 	my $dec;
 	my $fmt;



2.75      +6 -22     interchange/scripts/interchange.PL


rev 2.75, prev_rev 2.74
Index: interchange.PL
===================================================================
RCS file: /var/cvs/interchange/scripts/interchange.PL,v
retrieving revision 2.74
retrieving revision 2.75
diff -u -r2.74 -r2.75
--- interchange.PL	18 Jun 2003 17:34:47 -0000	2.74
+++ interchange.PL	25 Jun 2003 16:38:18 -0000	2.75
@@ -3,7 +3,7 @@
 #
 # Interchange version 4.9.8
 #
-# $Id: interchange.PL,v 2.74 2003/06/18 17:34:47 jon Exp $
+# $Id: interchange.PL,v 2.75 2003/06/25 16:38:18 mheins Exp $
 #
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -54,6 +54,7 @@
 	($Global::VendRoot = $ENV{MINIVEND_ROOT})
 		if defined $ENV{MINIVEND_ROOT};
 
+	no warnings 'void';
 	## This should only happen in "make test"
 	if($Global::VendRoot =~ m{/blib$}) {
 		shift @INC;
@@ -331,27 +332,10 @@
 
 sub dontwarn {
 
-# STATICPAGE
-	$File::Find::name +
-	$File::Find::prune +
-	$File::Find::prune +
-	<DATA> + 
-# END STATICPAGE
-	$Global::AdminSub +
-	$Global::DomainTail +
-	$Global::FullUrl +
-    $Global::HitCount +
-    $Global::ProfilesName +
-    $Global::Profiles +
-    $Global::LockoutCommand +
-    $Global::LockoutCommand +
-	$Global::IpHead +
-	$Vend::CheckHTML +
-	$Vend::Action +
-	$Vend::CC3 +
-	$CGI::server_name +
-	$CGI::content_type +
-	$CGI::http_host +
+	$Global::Shadow +
+	$Vend::JobsJob +
+	$Vend::Interpolate::MAIL +
+	$Vend::Server::RUNDIR +
 
 	1;
 }