aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2015-02-01 12:23:30 +0100
committerThomas Citharel <tcit@tcit.fr>2015-02-01 12:23:30 +0100
commit8f209e8a268e198bb449021c30fc783d69ee9818 (patch)
tree97f61995494371b762619bfc314bca5766fe6e46 /inc/poche/Poche.class.php
parent308fca6b78a30729bd0a2cf34bc7a67bd7b81362 (diff)
parentfae15c9f84394f905e5237a1afc10364aeb42dd0 (diff)
downloadwallabag-8f209e8a268e198bb449021c30fc783d69ee9818.tar.gz
wallabag-8f209e8a268e198bb449021c30fc783d69ee9818.tar.zst
wallabag-8f209e8a268e198bb449021c30fc783d69ee9818.zip
Merge branch 'dev' into savewithtags
Diffstat (limited to 'inc/poche/Poche.class.php')
-rwxr-xr-xinc/poche/Poche.class.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 81a18c86..f9928145 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -337,6 +337,27 @@ class Poche
337 $this->messages->add('s', _('The tag has been successfully deleted')); 337 $this->messages->add('s', _('The tag has been successfully deleted'));
338 Tools::redirect(); 338 Tools::redirect();
339 break; 339 break;
340
341 case 'reload_article' :
342 Tools::logm('reload article');
343 $id = $_GET['id'];
344 $entry = $this->store->retrieveOneById($id, $this->user->getId());
345 Tools::logm('reload url ' . $entry['url']);
346 $url = new Url(base64_encode($entry['url']));
347 $this->action('add', $url);
348 break;
349
350 /* For some unknown reason I can't get displayView() to work here (it redirects to home view afterwards). So here's a dirty fix which redirects directly to URL */
351 case 'random':
352 $id = 0;
353 while ($this->store->retrieveOneById($id,$this->user->getId()) == null) {
354 $count = $this->store->getEntriesByViewCount($view, $this->user->getId());
355 $id = rand(1,$count);
356 }
357 Tools::logm('get a random article');
358 Tools::redirect('?view=view&id=' . $id);
359 //$this->displayView('view', $id);
360 break;
340 default: 361 default:
341 break; 362 break;
342 } 363 }