Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-filestorage
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-filestorage
Commits
3c5697b1
Commit
3c5697b1
authored
Feb 08, 2017
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed creation scripts for OpenACS Installer
parent
686d868c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
51 deletions
+0
-51
intranet-filestorage-create.sql
sql/postgresql/intranet-filestorage-create.sql
+0
-51
No files found.
sql/postgresql/intranet-filestorage-create.sql
View file @
3c5697b1
...
...
@@ -194,57 +194,6 @@ create table im_fs_actions (
);
---------------------------------------------------------
-- Normalize Company Pathes
--
create
or
replace
function
im_company_normalize_path
(
varchar
)
returns
varchar
as
'
DECLARE
v_path alias for $1;
path varchar;
i integer;
pos integer;
char varchar;
latin_char varchar;
pathlen integer;
spacing integer;
asc integer;
BEGIN
path =
''''
;
pathlen = char_length(v_path);
spacing = 0;
FOR i IN 1 .. pathlen LOOP
char = substring(v_path, i, 1);
-- char = convert(char,
''
UNICODE
''
,
''
LATIN1
''
);
asc = ascii(char);
pos = position(char in
''
abcdefghijklmnopqrstuvwxyz
''
||
''
ABCDEFGHIJKLMNOPQRSTUVWXYZ
''
||
''
0123456789_
''
);
-- IF char =
''
ö
''
THEN pos=1; char =
''
oe
''
END IF;
IF asc > 127 THEN
RAISE NOTICE
''
path=%, i=%, char=%, pos=%, asc=%
''
,
v_path, i, char, pos, asc;
END IF;
IF pos < 1 THEN
-- Add new char only if it is not another underscore
IF 0 = spacing THEN
path = path ||
''
_
''
;
spacing = 1;
END IF;
ELSE
path = path || char;
spacing = 0;
END IF;
END LOOP;
path = lower(path);
path = trim(both
''
_
''
from path);
return path;
end;'
language
'plpgsql'
;
select
im_company_normalize_path
(
'Profilex +newtec GmbH/'
);
---------------------------------------------------------
-- Register the component in the core TCL pages
--
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment