当前位置: 首页>>代码示例>>PHP>>正文


PHP forge_get_config函数代码示例

本文整理汇总了PHP中forge_get_config函数的典型用法代码示例。如果您正苦于以下问题:PHP forge_get_config函数的具体用法?PHP forge_get_config怎么用?PHP forge_get_config使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了forge_get_config函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: instanceUsesProjectID

 public function instanceUsesProjectID(Project $project)
 {
     return is_dir(forge_get_config('projects_path', 'mediawiki') . "/" . $project->getID());
 }
开发者ID:slamj1,项目名称:tuleap,代码行数:4,代码来源:MediawikiManager.class.php

示例2: unset

         $preferences['emailaddress']['default'] = $user->getEmail();
         unset($preferences['emailauthentication']);
         unset($preferences['password']);
         return true;
     }
 }
 $wgGroupPermissions = customizeMediawikiGroupsRights($wgGroupPermissions, $manager, $fusionforgeproject, $forbidden_permissions, $read_permissions, $write_permissions);
 $wgFavicon = '/images/icon.png';
 $wgBreakFrames = false;
 if (forge_get_config('unbreak_frames', 'mediawiki')) {
     $wgEditPageFrameOptions = false;
 }
 ini_set('memory_limit', '100M');
 // LOAD THE SITE-WIDE AND PROJECT-SPECIFIC EXTRA-SETTINGS
 if (is_file(forge_get_config('config_path') . "/plugins/mediawiki/LocalSettings.php")) {
     include forge_get_config('config_path') . "/plugins/mediawiki/LocalSettings.php";
 }
 // debian style system-wide mediawiki extensions
 if (is_file("/etc/mediawiki-extensions/extensions.php")) {
     include '/etc/mediawiki-extensions/extensions.php';
 }
 if (file_exists("{$wgUploadDirectory}/.wgLogo.png")) {
     $wgLogo = "{$wgScriptPath}/images/.wgLogo.png";
 }
 // forge global settings
 if (is_file("{$gconfig_dir}/ForgeSettings.php")) {
     include "{$gconfig_dir}/ForgeSettings.php";
 }
 // project specific settings
 if (is_file("{$project_dir}/ProjectSettings.php")) {
     include "{$project_dir}/ProjectSettings.php";
开发者ID:rinodung,项目名称:tuleap,代码行数:31,代码来源:LocalSettings.php

示例3: addForgeBackLinksToSidebar

 private function addForgeBackLinksToSidebar()
 {
     $forge_name = forge_get_config('sys_fullname');
     $added_toolbox = array(array('text' => $GLOBALS['Language']->getText('plugin_mediawiki', 'back_to_forge', array($forge_name)), 'href' => '/projects/' . $GLOBALS['group']->getUnixName()));
     if ($this->IsUserAdmin()) {
         $added_toolbox[] = array('text' => $GLOBALS['Language']->getText('global', 'Administration'), 'href' => '/plugins/mediawiki/forge_admin?group_id=' . $GLOBALS['group']->getId());
     }
     $this->data['sidebar'][$forge_name] = $added_toolbox;
 }
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:9,代码来源:Tuleap.php

示例4: content_negociated_project_home

 /**
  * Outputs project's DOAP profile
  * @param unknown_type $params
  */
 function content_negociated_project_home(&$params)
 {
     $projectname = $params['groupname'];
     $accept = $params['accept'];
     $group_id = $params['group_id'];
     if ($accept == 'application/rdf+xml') {
         // connect to FusionForge internals
         $pm = ProjectManager::instance();
         $project = $pm->getProject($group_id);
         $project_shortdesc = $project->getPublicName();
         $project_description = $project->getDescription();
         $tags_list = NULL;
         if (forge_get_config('use_project_tags')) {
             $group = group_get_object($group_id);
             $tags_list = $group->getTags();
         }
         // We will return RDF+XML
         $params['content_type'] = 'application/rdf+xml';
         // Construct an ARC2_Resource containing the project's RDF (DOAP) description
         $ns = array('rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'rdfs' => 'http://www.w3.org/2000/01/rdf-schema#', 'doap' => 'http://usefulinc.com/ns/doap#', 'dcterms' => 'http://purl.org/dc/terms/', 'schema' => 'http://schema.org/');
         $conf = array('ns' => $ns);
         $res = ARC2::getResource($conf);
         $res->setURI(util_make_url_g($projectname, $group_id));
         // $res->setRel('rdf:type', 'doap:Project');
         rdfutils_setPropToUri($res, 'rdf:type', 'doap:Project');
         $res->setProp('doap:name', $projectname);
         $res->setProp('doap:shortdesc', $project_shortdesc);
         if ($project_description) {
             $res->setProp('doap:description', $project_description);
         }
         $res->setProp('doap:homepage', $project->getHomePage());
         $tags = array();
         if ($tags_list) {
             $tags = split(', ', $tags_list);
             $res->setProp('dcterms:subject', $tags);
         }
         // Now, we need to collect complementary RDF descriptiosn of the project via other plugins
         // invoke the 'project_rdf_metadata' hook so as to complement the RDF description
         $hook_params = array();
         $hook_params['prefixes'] = array();
         foreach ($ns as $prefix => $url) {
             $hook_params['prefixes'][$url] = $prefix;
         }
         $hook_params['group'] = $group_id;
         // pass the resource in case it could be useful (read-only in principle)
         $hook_params['in_Resource'] = $res;
         $hook_params['out_Resources'] = array();
         plugin_hook_by_reference('project_rdf_metadata', $hook_params);
         // add new prefixes to the list
         foreach ($hook_params['prefixes'] as $url => $prefix) {
             if (!isset($ns[$prefix])) {
                 $ns[$prefix] = $url;
             }
         }
         // merge the two sets of triples
         $merged_index = $res->index;
         foreach ($hook_params['out_Resources'] as $out_res) {
             $merged_index = ARC2::getMergedIndex($merged_index, $out_res->index);
         }
         $conf = array('ns' => $ns, 'serializer_type_nodes' => true);
         $ser = ARC2::getRDFXMLSerializer($conf);
         /* Serialize a resource index */
         $doc = $ser->getSerializedIndex($merged_index);
         $params['content'] = $doc . "\n";
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:70,代码来源:doaprdfPlugin.class.php

示例5: dirname

    require_once "{$IP}/extensions/WikiEditor/WikiEditor.php";
    # Enables use of WikiEditor by default but still allow users to disable it in preferences
    $wgDefaultUserOptions['usebetatoolbar'] = 1;
    $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
    # Displays the Preview and Changes tabs
    $wgDefaultUserOptions['wikieditor-preview'] = 1;
    # Displays the Publish and Cancel buttons on the top right side
    $wgDefaultUserOptions['wikieditor-publish'] = 1;
}
// TuleapArtLinks Extension inclusion
require_once dirname(__FILE__) . '/../extensions/TuleapArtLinks/TuleapArtLinks.php';
$wgTuleapArtLinksGroupId = $group->getGroupId();
$mleb_manager_loader = new MediawikiMLEBExtensionManagerLoader();
$mleb_manager = $mleb_manager_loader->getMediawikiMLEBExtensionManager();
if ($mleb_manager->isMLEBExtensionAvailableForProject($group) || isset($IS_RUNNING_UPDATE) && $IS_RUNNING_UPDATE) {
    $mleb_path = forge_get_config('extension_mleb_path', 'mediawiki');
    # Babelww
    require_once $mleb_path . "/extensions/Babel/Babel.php";
    # CLDR
    require_once $mleb_path . "/extensions/cldr/cldr.php";
    # CleanChanges
    require_once $mleb_path . "/extensions/CleanChanges/CleanChanges.php";
    $wgCCTrailerFilter = true;
    $wgCCUserFilter = false;
    $wgDefaultUserOptions['usenewrc'] = 1;
    # LocalisationUpdate
    require_once $mleb_path . "/extensions/LocalisationUpdate/LocalisationUpdate.php";
    $wgLocalisationUpdateDirectory = $mleb_path . "/cache";
    # Translate
    require_once $mleb_path . "/extensions/Translate/Translate.php";
    $wgGroupPermissions['user']['translate'] = true;
开发者ID:ndjido,项目名称:tuleap,代码行数:31,代码来源:LocalSettings.php

示例6: updateMediawikiDirectory

 private function updateMediawikiDirectory(Project $project)
 {
     $logger = new BackendLogger();
     $project_id_dir = forge_get_config('projects_path', 'mediawiki') . "/" . $project->getID();
     if (is_dir($project_id_dir)) {
         return true;
     }
     $project_name_dir = forge_get_config('projects_path', 'mediawiki') . "/" . $project->getUnixName();
     if (is_dir($project_name_dir)) {
         exec("mv {$project_name_dir} {$project_id_dir}");
         return true;
     }
     $logger->error('Project Rename: Can\'t find mediawiki directory for project: ' . $project->getID());
     return false;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:15,代码来源:mediawikiPlugin.class.php

示例7: isMLEBExtensionInstalled

 public function isMLEBExtensionInstalled()
 {
     return is_dir(forge_get_config('extension_mleb_path', 'mediawiki'));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:4,代码来源:MediawikiMLEBExtensionManager.php

示例8: cron_debug

            cron_debug($err);
            cron_entry(23, $err);
            db_rollback();
            exit;
        }
        if (!db_commit()) {
            $err = "Error: DB Commit Failed: " . db_error();
            cron_debug($err);
            cron_entry(23, $err);
            exit;
        }
        cron_debug("  Creating project dir {$project_dir}.");
        mkdir($project_dir, 0775, true);
        $f = fopen("{$project_dir}/ProjectSettings.php", "w");
        fwrite($f, '<?php
// Insert your project-local configuration here
');
        fclose($f);
        chmod("{$project_dir}/ProjectSettings.php", 0775);
        $mwwrapper = forge_get_config('source_path') . "/plugins/mediawiki/bin/mw-wrapper.php";
        $dumpfile = forge_get_config('config_path') . "/mediawiki/initial-content.xml";
        if (file_exists($dumpfile)) {
            system("{$mwwrapper} {$project} importDump.php {$dumpfile}");
            system("{$mwwrapper} {$project} rebuildrecentchanges.php");
        }
    }
}
// Local Variables:
// mode: php
// c-file-style: "bsd"
// End:
开发者ID:pombredanne,项目名称:tuleap,代码行数:31,代码来源:create-wikis.php

示例9: doesDirectoryExist

 /**
  * @return boolean
  */
 private function doesDirectoryExist()
 {
     $name_with_id = forge_get_config('projects_path', 'mediawiki') . '/' . $this->project_id;
     $name_with_shortname = forge_get_config('projects_path', 'mediawiki') . '/' . $this->project_name;
     if (is_dir($name_with_id)) {
         $this->project_name_dir = $name_with_id;
         $dir_exists = true;
     } elseif (is_dir($name_with_shortname)) {
         $this->project_name_dir = $name_with_shortname;
         $dir_exists = true;
     } else {
         $this->project_name_dir = $name_with_id;
         $dir_exists = false;
     }
     return $dir_exists;
 }
开发者ID:slamj1,项目名称:tuleap,代码行数:19,代码来源:MediawikiInstantiater.class.php

示例10: mysymlink

            mysymlink($from, $to);
        }
    }
    closedir($dh);
}
// link LocalSettings.php from forge_get_config('source_path')/plugins/mediawiki/etc/plugins/mediawiki/LocalSettings.php
$from = forge_get_config('source_path') . "/plugins/mediawiki/www/LocalSettings.php";
$to = "{$master_path}/LocalSettings.php";
mysymlink($from, $to);
// create skin directory
$todir = "{$master_path}/skins";
if (!is_dir($todir)) {
    mkdir($todir);
}
// link FusionForge skin file
$fromdir = forge_get_config('source_path') . "/plugins/mediawiki/mediawiki-skin";
$from = "{$fromdir}/FusionForge.php";
$to = "{$todir}/FusionForge.php";
mysymlink($from, $to);
// create skin subdir
$todir = "{$todir}/fusionforge";
if (!is_dir($todir)) {
    mkdir($todir);
}
// link fusionforge.css files
$fromdir = "{$fromdir}/fusionforge";
$from = "{$fromdir}/fusionforge.css";
$to = "{$todir}/fusionforge.css";
mysymlink($from, $to);
// link the rest of the files from monobook skin
$fromdir = "{$src_path}/skins/monobook";
开发者ID:pombredanne,项目名称:tuleap,代码行数:31,代码来源:mw-plugin-init.php

示例11: content_negociated_projects_list

 /**
  * Outputs the public projects list as ADMS.SW for /projects
  * @param unknown_type $params
  */
 function content_negociated_projects_list(&$params)
 {
     $accept = $params['accept'];
     if ($accept == 'application/rdf+xml') {
         // We will return RDF+XML
         $params['content_type'] = 'application/rdf+xml';
         // Construct an ARC2_Resource containing the project's RDF (DOAP) description
         $ns = array('rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'rdfs' => 'http://www.w3.org/2000/01/rdf-schema#', 'doap' => 'http://usefulinc.com/ns/doap#', 'dcterms' => 'http://purl.org/dc/terms/', 'admssw' => 'http://purl.org/adms/sw/', 'adms' => 'http://www.w3.org/ns/adms#');
         $conf = array('ns' => $ns);
         $res = ARC2::getResource($conf);
         $res->setURI(util_make_url("/projects"));
         // $res->setRel('rdf:type', 'doap:Project');
         rdfutils_setPropToUri($res, 'rdf:type', 'admssw:SoftwareRepository');
         //$res->setProp('doap:name', $projectname);
         $res->setProp('adms:accessURL', util_make_url("/softwaremap/"));
         $forge_name = forge_get_config('forge_name');
         $ff = new FusionForge();
         $res->setProp('dcterms:description', 'Public projects in the ' . $ff->software_name . ' Software Map on ' . $forge_name);
         $res->setProp('rdfs:label', $forge_name . ' public projects');
         $res->setProp('adms:supportedSchema', 'ADMS.SW v1.0');
         // same as for trove's full list
         $projects = get_public_active_projects_asc();
         $proj_uris = array();
         foreach ($projects as $row_grp) {
             $proj_uri = util_make_url_g(strtolower($row_grp['unix_group_name']), $row_grp['group_id']);
             $proj_uris[] = $proj_uri;
         }
         if (count($proj_uris)) {
             rdfutils_setPropToUri($res, 'dcterms:hasPart', $proj_uris);
         }
         $conf = array('ns' => $ns, 'serializer_type_nodes' => true);
         $ser = ARC2::getRDFXMLSerializer($conf);
         /* Serialize a resource index */
         $doc = $ser->getSerializedIndex($res->index);
         $params['content'] = $doc . "\n";
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:41,代码来源:admsswPlugin.class.php

示例12: phpinfo

    // indicate byte-level equality of content.  (Due to DEBUG timing output, etc...)
    //
    // (If DEBUG if off, this may be a strong validator, but I'm going
    // to go the paranoid route here pending further study and testing.)
    // access hits and edit stats in the footer violate strong ETags also.
    if (1 or DEBUG) {
        $validators['%weak'] = true;
    }
    $request->setValidators($validators);
    $request->handleAction();
    if (DEBUG and DEBUG & _DEBUG_INFO) {
        phpinfo(INFO_VARIABLES | INFO_MODULES);
    }
    $request->finish();
}
if (!FUSIONFORGE || forge_get_config('installation_environment') != 'production') {
    if (defined('E_STRICT') and E_ALL & E_STRICT) {
        // strict php5?
        error_reporting(E_ALL & ~E_STRICT);
    } else {
        error_reporting(E_ALL);
    }
    // php4
} else {
    error_reporting(E_ERROR);
}
// don't run the main loop for special requests (test, getimg, xmlrpc, soap, ...)
if (!defined('PHPWIKI_NOMAIN') or !PHPWIKI_NOMAIN) {
    main();
}
// Local Variables:
开发者ID:hugcoday,项目名称:wiki,代码行数:31,代码来源:main.php

示例13: util_make_base_url

/**
 * Construct the base URL http[s]://forge_name[:port]
 *
 * @param       string  $prefix (optional) : 'http' or 'https' to force it
 * @return	string base URL
 */
function util_make_base_url($prefix = '')
{
    $url = util_url_prefix($prefix);
    $url .= forge_get_config('web_host');
    if (forge_get_config('https_port') && forge_get_config('https_port') != 443) {
        $url .= ":" . forge_get_config('https_port');
    }
    return $url;
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:15,代码来源:utils.php

示例14: dirname

 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
/** This script will automatically create the image upload
   directories for all mediawiki instances.

   It is intended to be started in a cronjob with root permissions.
   */
require_once dirname(__FILE__) . '/../../../www/env.inc.php';
require_once $gfcommon . 'include/pre.php';
require_once $gfcommon . 'include/cron_utils.php';
if (forge_get_config('enable_uploads', 'mediawiki')) {
    $upload_dir_basename = "images";
    $projects_path = forge_get_config('projects_path', 'mediawiki');
    # Owner of files - apache
    $dir_owner = forge_get_config('apache_user');
    $dir_group = forge_get_config('apache_group');
    # Get all projects that use the mediawiki plugin
    $project_res = db_query_params("SELECT g.unix_group_name from groups g, group_plugin gp, plugins p where g.group_id = gp.group_id and gp.plugin_id = p.plugin_id and p.plugin_name = \$1;", array("mediawiki"));
    if (!$project_res) {
        $err = "Error: Database Query Failed: " . db_error();
        cron_debug($err);
        cron_entry(23, $err);
        exit;
    }
    # Loop over all projects that use the plugin
    while ($row = db_fetch_array($project_res)) {
        $project = $row['unix_group_name'];
        $project_dir = "{$projects_path}/{$project}";
        cron_debug("Checking {$project}...");
        // Create the image directory if necessary
        $upload_dir = "{$project_dir}/{$upload_dir_basename}";
开发者ID:pombredanne,项目名称:tuleap,代码行数:31,代码来源:create-imagedirs.php

示例15: exit

 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
/** This script will destroy a mediawiki instance of a specific project.     */
if ($argc < 2) {
    echo "Usage " . $argv[0] . " <project>\n";
    exit(0);
}
require_once dirname(__FILE__) . '/../../../www/env.inc.php';
require_once $gfcommon . 'include/pre.php';
$projects_path = forge_get_config('projects_path', 'mediawiki');
array_shift($argv);
foreach ($argv as $project) {
    echo "Removing project wiki of {$project}.\n";
    $project_dir = "{$projects_path}/{$project}";
    echo "  Deleting project subdir {$project_dir}.\n";
    if (!is_dir($project_dir)) {
        echo "{$project_dir} does not exist!\n";
    } else {
        system("rm -rf {$project_dir}");
    }
    $schema = "plugin_mediawiki_{$project}";
    strtr($schema, "-", "_");
    echo "  Dropping database schema {$schema}.\n";
    $res = db_query_params("DROP SCHEMA {$schema} CASCADE", array());
    if (!$res) {
开发者ID:pombredanne,项目名称:tuleap,代码行数:31,代码来源:mw-drop-wikis.php


注:本文中的forge_get_config函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。