includes/functions.php
changeset 963 b572ce1114f1
parent 953 323c4cd1aa37
child 978 ed84b24b8e07
equal deleted inserted replaced
962:ceeecb160aec 963:b572ce1114f1
   916   $code = $plugins->setHook('send_page_footers');
   916   $code = $plugins->setHook('send_page_footers');
   917   foreach ( $code as $cmd )
   917   foreach ( $code as $cmd )
   918   {
   918   {
   919     eval($cmd);
   919     eval($cmd);
   920   }
   920   }
       
   921 }
       
   922 
       
   923 /**
       
   924  * Show the "this is a redirector" notice
       
   925  * @param string Target Page ID
       
   926  * @param string Target Namespace
       
   927  */
       
   928 
       
   929 function display_redirect_notice($page_id, $namespace)
       
   930 {
       
   931   global $db, $session, $paths, $template, $plugins; // Common objects
       
   932   global $lang, $output;
       
   933   
       
   934   $url = makeUrlNS($namespace, $page_id, false, true);
       
   935   $ns = namespace_factory($page_id, $namespace);
       
   936   $page_data = $ns->get_cdata();
       
   937   
       
   938   $title = $page_data['name'];
       
   939   
       
   940   $cls = $ns->exists() ? '' : 'class="wikilink-nonexistent" ';
       
   941     
       
   942   $a = '<a ' . $cls . 'href="' . $url . '">' . $title . '</a>';
       
   943   $redir_html = '<br /><div class="mdg-infobox">
       
   944           <table border="0" width="100%" cellspacing="0" cellpadding="0">
       
   945             <tr>
       
   946               <td valign="top">
       
   947                 <img alt="Cute wet-floor icon" src="' . cdnPath . '/images/redirector.png" />
       
   948               </td>
       
   949               <td valign="top" style="padding-left: 10px;">
       
   950                 ' . $lang->get('page_msg_this_is_a_redirector', array( 'redirect_target' => $a )) . '
       
   951               </td>
       
   952             </tr>
       
   953           </table>
       
   954         </div>
       
   955         <br />
       
   956         <hr style="margin-left: 1em; width: 200px;" />';
       
   957   
       
   958   $output->add_after_header($redir_html);
   921 }
   959 }
   922 
   960 
   923 /**
   961 /**
   924  * Essentially an return code reader for a socket. Don't use this unless you're writing mail code and smtp_send_email doesn't cut it. Ported from phpBB's smtp.php.
   962  * Essentially an return code reader for a socket. Don't use this unless you're writing mail code and smtp_send_email doesn't cut it. Ported from phpBB's smtp.php.
   925  * @param socket A socket resource
   963  * @param socket A socket resource