Exemplo n.º 1
0
 public function __construct(&$db)
 {
     $this->db = EasyDiscussInstaller::getDbo();
 }
Exemplo n.º 2
0
    public function postflight($type, $parent)
    {
        $message = $this->message;
        $status = $this->status;
        // if this is a uninstallation process, do not execute anything.
        if ($type == 'install' || $type == 'update' || $type == 'discover_install') {
            require_once $this->sourcePath . '/admin/install.default.php';
            // fix invalid admin menu id with Joomla 1.6 or above
            EasyDiscussInstaller::fixMenuIds();
            //check menu items.
            EasyDiscussInstaller::checkMenu();
        }
        ob_start();
        ?>

		<style type="text/css">
		/**
		 * Messages
		 */

		#easydiscuss-message {
			color: red;
			font-size:13px;
			margin-bottom: 15px;
			padding: 5px 10px 5px 35px;
		}

		#easydiscuss-message.error {
			border-top: solid 2px #900;
			border-bottom: solid 2px #900;
			color: #900;
		}

		#easydiscuss-message.info {
			border-top: solid 2px #06c;
			border-bottom: solid 2px #06c;
			color: #06c;
		}

		#easydiscuss-message.warning {
			border-top: solid 2px #f90;
			border-bottom: solid 2px #f90;
			color: #c30;
		}
		</style>

		<table width="100%" border="0">
			<tr>
				<td>
					<div><img src="http://stackideas.com/images/easydiscuss/success_32.png" /></div>
				</td>
			</tr>
			<?php 
        foreach ($message as $msgString) {
            $msg = explode(":", $msgString);
            switch (trim($msg[0])) {
                case 'Fatal Error':
                    $classname = 'error';
                    break;
                case 'Warning':
                    $classname = 'warning';
                    break;
                case 'Success':
                default:
                    $classname = 'info';
                    break;
            }
            ?>
					<tr>
						<td><div id="easydiscuss-message" class="<?php 
            echo $classname;
            ?>
"><?php 
            echo $msg[0] . ' : ' . $msg[1];
            ?>
</div></td>
					</tr>
					<?php 
        }
        ?>
		</table>

		<?php 
        $html = ob_get_contents();
        @ob_end_clean();
        echo $html;
        return $status;
    }