]> git.mxchange.org Git - friendica.git/blobdiff - mod/tagrm.php
Finish t() for mod
[friendica.git] / mod / tagrm.php
index a952b613b16754a3c05b54c2b9c00ced11072f0d..fbbf3a7bbcec22404421514c9117a6c6f0944593 100644 (file)
@@ -1,9 +1,13 @@
 <?php
-
+/**
+ * @file mod/tagrm.php
+ */
 use Friendica\App;
+use Friendica\Core\L10n;
 use Friendica\Core\System;
+use Friendica\Database\DBM;
 
-require_once('include/bbcode.php');
+require_once 'include/bbcode.php';
 
 function tagrm_post(App $a) {
 
@@ -11,7 +15,7 @@ function tagrm_post(App $a) {
                goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
        }
 
-       if ((x($_POST,'submit')) && ($_POST['submit'] === t('Cancel'))) {
+       if ((x($_POST,'submit')) && ($_POST['submit'] === L10n::t('Cancel'))) {
                goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
        }
 
@@ -23,7 +27,7 @@ function tagrm_post(App $a) {
                intval(local_user())
        );
 
-       if (! dbm::is_result($r)) {
+       if (! DBM::is_result($r)) {
                goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
        }
 
@@ -43,7 +47,7 @@ function tagrm_post(App $a) {
                intval(local_user())
        );
 
-       info( t('Tag removed') . EOL );
+       info(L10n::t('Tag removed') . EOL );
        goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
 
        // NOTREACHED
@@ -72,7 +76,7 @@ function tagrm_content(App $a) {
                intval(local_user())
        );
 
-       if (! dbm::is_result($r)) {
+       if (! DBM::is_result($r)) {
                goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
        }
 
@@ -82,9 +86,9 @@ function tagrm_content(App $a) {
                goaway(System::baseUrl() . '/' . $_SESSION['photo_return']);
        }
 
-       $o .= '<h3>' . t('Remove Item Tag') . '</h3>';
+       $o .= '<h3>' . L10n::t('Remove Item Tag') . '</h3>';
 
-       $o .= '<p id="tag-remove-desc">' . t('Select a tag to remove: ') . '</p>';
+       $o .= '<p id="tag-remove-desc">' . L10n::t('Select a tag to remove: ') . '</p>';
 
        $o .= '<form id="tagrm" action="tagrm" method="post" >';
        $o .= '<input type="hidden" name="item" value="' . $item . '" />';
@@ -95,8 +99,8 @@ function tagrm_content(App $a) {
        }
 
        $o .= '</ul>';
-       $o .= '<input id="tagrm-submit" type="submit" name="submit" value="' . t('Remove') .'" />';
-       $o .= '<input id="tagrm-cancel" type="submit" name="submit" value="' . t('Cancel') .'" />';
+       $o .= '<input id="tagrm-submit" type="submit" name="submit" value="' . L10n::t('Remove') .'" />';
+       $o .= '<input id="tagrm-cancel" type="submit" name="submit" value="' . L10n::t('Cancel') .'" />';
        $o .= '</form>';
 
        return $o;