Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Uni Osnabrück
Stud.IP
Commits
5a83ec8c
Commit
5a83ec8c
authored
11 months ago
by
Elmar Ludwig
Browse files
Options
Downloads
Patches
Plain Diff
drop obsolete scripts, fix typo
parent
b8ed864f
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
cli/cleanup_visits.php
+1
-1
1 addition, 1 deletion
cli/cleanup_visits.php
cli/rssmail.php
+0
-53
0 additions, 53 deletions
cli/rssmail.php
cli/update_faq.sh
+0
-14
0 additions, 14 deletions
cli/update_faq.sh
with
1 addition
and
68 deletions
cli/cleanup_visits.php
+
1
−
1
View file @
5a83ec8c
...
@@ -9,4 +9,4 @@ $stmt = $db->prepare('DELETE FROM object_user_visits WHERE visitdate < ?');
...
@@ -9,4 +9,4 @@ $stmt = $db->prepare('DELETE FROM object_user_visits WHERE visitdate < ?');
$stmt
->
execute
([
$threshold
]);
$stmt
->
execute
([
$threshold
]);
$stmt
=
$db
->
prepare
(
'DELETE FROM forum_visits WHERE visitdate < ?'
);
$stmt
=
$db
->
prepare
(
'DELETE FROM forum_visits WHERE visitdate < ?'
);
$stmt
->
execute
([
$
$
threshold
]);
$stmt
->
execute
([
$threshold
]);
This diff is collapsed.
Click to expand it.
cli/rssmail.php
deleted
100755 → 0
+
0
−
53
View file @
b8ed864f
#!/usr/bin/php
<?php
/*
* mail.php - forward Stud.IP news from RSS feed via e-mail
*
* Copyright (C) 2012 Elmar Ludwig
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*/
$TIMESTAMP_FILE
=
__DIR__
.
'/rssmail.lastrun'
;
$timestamp
=
(
int
)
@
filemtime
(
$TIMESTAMP_FILE
);
$RSS_URL
=
'https://studip.uni-osnabrueck.de/rss.php?id=91c5e0f445279c005ea9687726209da0'
;
$xmlns_dc
=
"http://purl.org/dc/elements/1.1/"
;
$mail_to
=
'virtuos-vorstand@list.serv.uni-osnabrueck.de'
;
$subject
=
'Aktuelle News aus dem Zentrum virtUOS'
;
$headers
=
[
'MIME-Version: 1.0'
,
'Content-Type: text/plain; charset=UTF-8'
,
'Content-Transfer-Encoding: 8bit'
,
'From: virtUOS News <virtuos@uni-osnabrueck.de>'
];
$mail
=
''
;
$footer
=
"Diese Mail ist eine automatische Zusammenstellung der aktuellen "
.
"News des Zentrum virtUOS <http://www.virtuos.uni-osnabrueck.de>.
\n
"
;
$rss
=
new
SimpleXMLElement
(
$RSS_URL
,
LIBXML_COMPACT
,
true
);
function
strip_tags_br
(
$text
)
{
return
strip_tags
(
str_replace
(
'<br>'
,
"
\n
"
,
$text
));
}
foreach
(
$rss
->
channel
->
item
as
$item
)
{
$time
=
strtotime
(
$item
->
pubDate
);
if
(
$time
>
$timestamp
)
{
$mail
.
=
sprintf
(
"%s
\n\n
%s
\n
(geschrieben von %s am %s)
\n\n\n
"
,
$item
->
title
,
strip_tags_br
(
$item
->
description
),
$item
->
children
(
$xmlns_dc
)
->
contributor
,
strftime
(
'%d.%m.%Y'
,
$time
));
}
}
if
(
$mail
!==
''
)
{
mail
(
$mail_to
,
$subject
,
"
$mail$footer
"
,
join
(
"
\r\n
"
,
$headers
));
touch
(
$TIMESTAMP_FILE
);
}
This diff is collapsed.
Click to expand it.
cli/update_faq.sh
deleted
100755 → 0
+
0
−
14
View file @
b8ed864f
#!/bin/sh
PATH
=
/bin:/usr/bin
;
export
PATH
RSS_CACHE_DIR
=
/data/studip_uni/tmp
FAQ_URL
=
https://zentrum.virtuos.uni-osnabrueck.de/studip_faq/faq.xml
if
wget
-qO
"
$RSS_CACHE_DIR
/faq.tmp"
"
$FAQ_URL
"
;
then
if
grep
-q
'<rss version="2.0"'
"
$RSS_CACHE_DIR
/faq.tmp"
;
then
mv
"
$RSS_CACHE_DIR
/faq.tmp"
"
$RSS_CACHE_DIR
/faq.xml"
fi
fi
touch
"
$RSS_CACHE_DIR
/faq.xml"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment