예제 #1
0
파일: Install.php 프로젝트: Sywooch/forums
 protected static function removePortalWidgets()
 {
     $portalModel = new WidgetPortal_Model_Portal();
     $templates = $portalModel->getPortalWidgetPositions();
     $db = XenForo_Application::get('db');
     $db->query("DELETE FROM xf_widget WHERE position IN (" . $db->quote($templates) . ")");
 }
예제 #2
0
파일: Widget.php 프로젝트: Sywooch/forums
    public function getAllFrontendEditableWidgets()
    {
        $editable = WidgetPortal_Model_Portal::getportalEditableWidgets();
        return $this->fetchAllKeyed('
			SELECT *
				FROM xf_widget as widget
			    WHERE 1=1 AND
			    class IN (' . $this->_getDb()->quote($editable) . ')
		', 'widget_id');
    }