Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Antoine
ae2
Commits
e1e8bc20
Commit
e1e8bc20
authored
Aug 09, 2007
by
Feu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
galaxy hourly
parent
a83254f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
galaxy.php
galaxy.php
+1
-1
phpcron/hourly.php
phpcron/hourly.php
+18
-2
No files found.
galaxy.php
View file @
e1e8bc20
...
...
@@ -366,7 +366,7 @@ $cts->puts("<div class=\"viewer\" id=\"viewer\">
<div class=
\"
map
\"
id=
\"
map
\"
><img src=
\"
var/mini_galaxy.png
\"
/>
<div class=
\"
position
\"
id=
\"
position
\"
></div></div></div><script>init_galaxy(
$goX
,
$goY
,
\"\"
);</script>"
);
$cts
->
add_paragraph
(
"<a href=
\"
var/galaxy.png
\"
>Tout galaxy sur une seule image</a>"
);
//
$cts->add_paragraph("<a href=\"var/galaxy.png\">Tout galaxy sur une seule image</a>");
$frm
=
new
form
(
"galaxygo"
,
$topdir
.
"galaxy.php"
,
true
,
"GET"
,
"Aller vers une personne"
);
$frm
->
add_entity_smartselect
(
"id_utilisateur"
,
"Nom/Surnom"
,
new
utilisateur
(
$site
->
db
));
...
...
phpcron/hourly.php
View file @
e1e8bc20
...
...
@@ -18,18 +18,34 @@ require_once($topdir. "include/lib/magpierss/rss_fetch.inc.php");
$site
=
new
site
();
// Tâche 1 : mettre à jour le cache
// Tâche 1
[planet]
: mettre à jour le cache
$req
=
new
requete
(
$site
->
db
,
"SELECT `url` FROM `planet_flux` WHERE `modere`='1'"
);
while
(
list
(
$url
)
=
$req
->
get_row
()
)
$rs
=
fetch_rss
(
$url
);
// Tâche 1 : nettoyage du cache
// Tâche 1
[planet]
: nettoyage du cache
$cache
=
opendir
(
MAGPIE_CACHE_DIR
);
while
(
$file
=
readdir
(
$cache
))
if
(
is_file
(
MAGPIE_CACHE_DIR
.
$file
)
&&
filemtime
(
MAGPIE_CACHE_DIR
.
$file
)
<
(
time
()
-
MAGPIE_CACHE_AGE
)
)
unlink
(
MAGPIE_CACHE_DIR
.
$file
);
closedir
(
$cache
);
// Tâche 2 [galaxy] : màj, et cycles
require_once
(
$topdir
.
"include/galaxy.inc.php"
);
$galaxy
=
new
galaxy
(
$site
->
db
,
$site
->
dbrw
);
$galaxy
->
update
();
for
(
$i
=
0
;
$i
<
45
;
$i
++
)
// Environs 1100 cycles/jours
$galaxy
->
cycle
(
!
isset
(
$_REQUEST
[
"bypasscollision"
]));
$galaxy
->
mini_render
(
$topdir
.
"var/mini_galaxy.png"
);
?>
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