Recyle Bin MOD entschlacken

Kleine Codeänderungen oder Mini-MODs
Keine Anfragen!!! -- No requests!!!

Moderator: Supporter

Recyle Bin MOD entschlacken

Beitragvon AmigaLink » 18. Mai 2006 00:26

Dem Recycle Bin MOD merkt man an das er im Prinzip nur eine modifizierte Version des Original phpBB Codes, zum Verschieben von Themen, ist. Er beherbergt nämlich noch den Code zum hinterlassen von Shadow Topics, welcher aber garnicht benötigt wird. :?
Code: Alles auswählen
#
#----------[ OPEN ]-------------------------------------
#

bin.php

#
#----------[ FIND & DELETE ]----------------------------
#

            if ( isset($HTTP_POST_VARS['move_leave_shadow']) )
            {
               // Insert topic in the old forum that indicates that the forum has moved.
               $sql = "INSERT INTO " . TOPICS_TABLE . " (forum_id, topic_title, topic_poster, topic_time, topic_status, topic_type, topic_vote, topic_views, topic_replies, topic_first_post_id, topic_last_post_id, topic_moved_id)
                  VALUES ($old_forum_id, '" . addslashes(str_replace("\'", "''", $row[$i]['topic_title'])) . "', '" . str_replace("\'", "''", $row[$i]['topic_poster']) . "', " . $row[$i]['topic_time'] . ", " . TOPIC_MOVED . ", " . POST_NORMAL . ", " . $row[$i]['topic_vote'] . ", " . $row[$i]['topic_views'] . ", " . $row[$i]['topic_replies'] . ", " . $row[$i]['topic_first_post_id'] . ", " . $row[$i]['topic_last_post_id'] . ", $topic_id)";
               if ( !$db->sql_query($sql) )
               {
                  message_die(GENERAL_ERROR, 'Could not insert shadow topic', '', __LINE__, __FILE__, $sql);
               }
            }

#
#----------[ OPEN ]-------------------------------------
#

modcp.php

#
#----------[ FIND ]-------------------------------------
#

   // Start add - Bin Mod
   case 'recycle':

#
#----------[ FIND & DELETE ]----------------------------
#

                  if ( isset($HTTP_POST_VARS['move_leave_shadow']) )
                  {
                     // Insert topic in the old forum that indicates that the forum has moved.
                     $sql = "INSERT INTO " . TOPICS_TABLE . " (forum_id, topic_title, topic_poster, topic_time, topic_status, topic_type, topic_vote, topic_views, topic_replies, topic_first_post_id, topic_last_post_id, topic_moved_id)
                        VALUES ($old_forum_id, '" . addslashes(str_replace("\'", "''", $row[$i]['topic_title'])) . "', '" . str_replace("\'", "''", $row[$i]['topic_poster']) . "', " . $row[$i]['topic_time'] . ", " . TOPIC_MOVED . ", " . POST_NORMAL . ", " . $row[$i]['topic_vote'] . ", " . $row[$i]['topic_views'] . ", " . $row[$i]['topic_replies'] . ", " . $row[$i]['topic_first_post_id'] . ", " . $row[$i]['topic_last_post_id'] . ", $topic_id)";
                     if ( !$db->sql_query($sql) )
                     {
                        message_die(GENERAL_ERROR, 'Could not insert shadow topic', '', __LINE__, __FILE__, $sql);
                     }
                  }

#
#----------[ SAVE AND CLOSE ALL FILES ]-----------------
#
# EoM
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

Beitragvon oxpus » 18. Mai 2006 09:26

Oh ja, wer braucht die an dieser Stelle :P
Danke für den Code...
Kein Support ausserhalb der Foren!
No support outside the forums!
Benutzeravatar
oxpus
Partner
 
Beiträge: 610
Registriert: 14. Okt 2004 11:55
Wohnort: Bad Wildungen (halt so'n kleines Kurkaff)

Beitragvon AmigaLink » 18. Mai 2006 11:00

Ist mir komischerweise, beim einbau, sofort aufgefallen. :D
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

Beitragvon oxpus » 18. Mai 2006 12:19

Nun, ich hatte damals weder den einen noch den anderen MOD im Kopf, bzw. installiert ;)
Kein Support ausserhalb der Foren!
No support outside the forums!
Benutzeravatar
oxpus
Partner
 
Beiträge: 610
Registriert: 14. Okt 2004 11:55
Wohnort: Bad Wildungen (halt so'n kleines Kurkaff)


Zurück zu phpBB2 Snippets



Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 9 Gäste

cron